Skip to content

Commit

Permalink
BUG: Support color DICOM data series (Slicer#7089)
Browse files Browse the repository at this point in the history
Without this change the vtkITK code complained that a series of
color dicom data could not be loaded.

It appears that when the check for grayscale was added it was only
tested on single instance files, not on series in multiple files.

This change invokes the correct reader based on whether it's a single
file or not.
  • Loading branch information
pieper authored Jul 14, 2023
1 parent 530b8fc commit 0983899
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Modules/Scripted/DICOMPlugins/DICOMScalarVolumePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,10 @@ def loadFilesWithSeriesReader(self, imageIOName, files, name, grayscale=True):
if grayscale:
reader = vtkITK.vtkITKArchetypeImageSeriesScalarReader()
else:
reader = vtkITK.vtkITKArchetypeImageSeriesVectorReaderFile()
if len(files) > 1:
reader = vtkITK.vtkITKArchetypeImageSeriesVectorReaderSeries()
else:
reader = vtkITK.vtkITKArchetypeImageSeriesVectorReaderFile()
reader.SetArchetype(files[0])
for f in files:
reader.AddFileName(f)
Expand Down

0 comments on commit 0983899

Please sign in to comment.