[Insight-developers] itkImageSeriesFileReader Bug/Issue

Hauke Heibel heibel at cs.tum.edu
Sun Oct 21 08:50:17 EDT 2007


Hi there,

 

I tried to read a set of DICOM files with the itkImageSeriesFileReader where
the DICOMs were 3D volumes (e.g. width x height x slices). As long as the
third dimension sticks to one everything works fine. The reader assumes that
all files have the third dimension equal to one and sets the number of
slices for the output volume equal to the number of files. As long as any of
the images has a different dimension an exception is thrown telling that the
dimensions do not properly agree. The example is taken from real life. The
DICOM images I wanted to load were of XA modality and unfortunately split
into two files (why ever that happened) - actually I attended the image
acquisition and did not perceive anything strange.

 

Ok, now to the fix I went for at the moment...

 

The different scenarios we may encounter with the itkImageSeriesFileReader
are (input -> output, correct me if I am wrong):

2D ->3D

3D -> 3D

3D -> 4D

4D -> 4D

...

 

The cases of interest are those where the input and output dimensions agree.
I changed the itkImageSeriesReader.txx such that the number of slices for
the output buffer is determined in the old way if the in- and output
dimensions do not agree and by checking and accumulating each file's output
information in case that the dimensions agree. This allows different files
to be consisting of a different number of slices. 

 

The second adaption I did is to change the test for agreeing dimensions in
the GenerateData method. I left it unchanged for the case where in- and
output dimensions do not agree and I changed it to check for equality of
sliced sizes in case where the in- and output dimensions agree.

 

I attached a patch against the current CVS version.

 

Regards,

Hauke

-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 11719 bytes
Desc: not available
Url : http://www.itk.org/mailman/private/insight-developers/attachments/20071021/fa3571ca/winmail.bin


More information about the Insight-developers mailing list