[vtkusers] GDCM2 + VTK: wrong slice order?

Paul Melis paul at science.uva.nl
Mon Dec 8 08:34:22 EST 2008


Mathieu Malaterre wrote:
> On Mon, Dec 8, 2008 at 1:18 PM, Paul Melis <paul at science.uva.nl> wrote:
>   
>> Hello,
>>
>> I'm using VTK 5.2 together with GDCM 2.0.10 to read in a set of MR slices in
>> DICOM format. I was under the impression that the vtkGDCMImageReader would
>> sort the files given to it (through SetFileNames()) at least by looking at
>> the "Image Position (Patient)" tag.
>>     
>
> No. Where did you read that ?
>   
Well, I found posts on mailing lists here and there, like
http://www.cmake.org/pipermail/insight-users/2006-April/017479.html
in which a poster makes a similar statement about ordering (and your 
reply did not tell him otherwise :)).

> When all else fails, read the instructions:
>   
I did, just not the GDCM sources.
> Ref:
> http://gdcm.sourceforge.net/html/vtkGDCMImageReader_8h-source.html
>
> 00021 // .SECTION Implementation note: when reading a series of 2D
> slices, user is
> 00022 // expected to provide an ordered list of filenames. No sorting
> will be applied afterward.
>   
Right, that's helpful.
> See gdcm::IPPSorter for a common sorting scheme.
>   
Thanks for the tip!
> 2cts
>   
Paul



More information about the vtkusers mailing list