[Dcmlib] Re: [Fwd: Re: Images Axial Acquisition order]
Mathieu Malaterre
mathieu.malaterre at kitware.com
Thu Jul 21 14:51:03 CEST 2005
> I think we initialy made a lot of stupid things, in vtkGdcmReader.
> - BuildFileListFromPattern is probabely 100% unused, because almost no
> dicom file name in the world can be built from a pattern
Yes and no. It's like saying why do we ever look at ImageNumber they are
hardly ever used... I have seen cases where the filename respect a
patern. Furthermore we can also resort the filename that respect the
pattern, the pattern never meant: "This is the order we will read the
files"...
Anyway I agree this does not seem very usefull.
> - AddFileName leads to an unusable unsorted set of files
Ok I have 500 files. I know I am interested in 100 of them let say:
150-250. How do I tell vtkGdcmReader I am only interested in those
(remember we still don't have selection by volume(*)).
> - When the files are read, vtkGdcmReaderforgets immediately they were
> Dicom files (whe delete gdcm::File)
evil...
> - when the volume is read, it's too late to transform its planes.
yes and no. ITK has a low level notion of orientation directly in the
itk::Image definition. It's just that VTK does not. BUT to display a
vtk::Image, we use Actor that have a notion of Orientation. So yes the
orientation is really application level, and gdcm shall never ever try
to reorganize pixel to apply a transformation ! This is not our goal,
this is not our main focus.
So please no code to shuffle pixel around in gdcm.
> I think we have to allow user (you) to pass vtkGdcmReader a function
> that describes the transformations he wants to apply on each image
> immediately after reading.
More than a transformation I would rather see a 'Style'. As you describe
in a previous mail there is a more Dentist one, a more conventional for
XYZ...
So I would rather see the transformation being as a subclass of
gdcm::Transformation. Something like:
gdcm::Transformation t;
t->SetModeToDentist();
or
t->SetMode( gdcm::Dentist );
vtkGdcmReader->SetTransformation( t->GetOutput() )
Mathieu
(*) In VTK to read 100 slices from a serie we would do:
reader = bla
reader->SetFilePattern()
reader->SetExtent(0,511, 0, 511, 100, 250);
^^^^^^^^
And then the reader understand the user is only interested in a
subvolume of the serie and therefore will only read the necessarie
files. It's just a matter of notation (plus we don't have implemented
the Extent notion).
More information about the Dcmlib
mailing list