[Insight-users] How to sort dicom files according to instance number?
Antoine DUCHAMPS
antoine.duchamps at gmail.com
Fri Apr 24 07:35:12 EDT 2009
Mathieu,
I've been searching in the itk documentation and I've found that
itk::DICOMSeriesFileNames provides some functions to set the image
ordering criterium (ImageNumber, SliceLocation, ImagePosition). However
I don't see this in itk::GDCMSeriesFileNames. So how can I specify an
ordering according to the instance number? Do I have to modify the
class?
antoine
Le jeudi 23 avril 2009 à 15:01 +0200, Antoine DUCHAMPS a écrit :
> Hi Mathieu,
>
> gdcmtar works fine and I can recover the correct volume size (128 x 128
> x 41) after spliting a 3D file into a set of 2D images.
>
> However, back to the original problem, now I obtain an image (128 x 128
> x 2367 x 1) which is still a 3D image. Now the problen seems to be the
> ordering of the 4th dimension as you commented previously. You had
> proposed me to use the instance number. My question is: at which level
> do I have to specify this? Is this a function of the ImageSeriesReader
> or a function of the gdcmImageIO?
>
> thanks!
>
> antoine
>
> PS : I don't know if it's important for the frame ordering but I get the
> following errors too:
>
> Error:
> In /home/duchamps/lib/itk-3.10.2-src/Utilities/gdcm/src/gdcmSerieHelper.cxx, line 663, function bool gdcm::SerieHelper::ImagePositionPatientOrdering(gdcm::FileList*)
> File: /home/duchamps/Data/dti_adulte/dicom_untar/2940 Distance: 68.5837
> position is not unique
>
>
>
>
> Le jeudi 23 avril 2009 à 10:04 +0200, Antoine DUCHAMPS a écrit :
> > Your cristal ball is right ! :)
> > I'll try with gdcmtar and I'll go back to you.
> > Thanks a lot!
> >
> > antoine
> >
> >
> >
> >
> >
> > Le jeudi 23 avril 2009 à 09:53 +0200, Mathieu Malaterre a écrit :
> > > On Thu, Apr 23, 2009 at 9:45 AM, Antoine DUCHAMPS
> > > <antoine.duchamps at gmail.com> wrote:
> > > > This is the output of gdcminfo* for the first volume of the sequence.
> > > >
> > > > Hope this helps,
> > > >
> > > > antoine.
> > > >
> > > > * I've used gdcminfo of gdcm 2.0.10 since I didn't find it for gdcm
> > > > 1.2.x
> > > >
> > > >
> > > > MediaStorage is 1.2.840.10008.5.1.4.1.1.4 [MR Image Storage]
> > > > TransferSyntax is 1.2.840.10008.1.2.1 [Explicit VR Little Endian]
> > > > NumberOfDimensions: 2
> > > > Dimensions: (896,896,1)
> > >
> > > So indeed your image is 896x896, no doubt about it.
> > >
> > > My cristal ball is telling me that you are dealing with SIEMENS MOSAIC
> > > file. Is this correct ? If this is correct simply use the gdcmtar
> > > (same location as gdcminfo you just used) to split your file into a
> > > valid multiframe DICOM file.
> > >
> > > http://apps.sourceforge.net/mediawiki/gdcm/index.php?title=Gdcmtar
> > >
> > > It wil properly discard any black frame out of the final multiframe DICOM file.
> > >
> > > HTH
More information about the Insight-users
mailing list