[vtkusers] how to change image order

John Drescher drescherjm at gmail.com
Mon Dec 21 12:44:11 EST 2009


On Mon, Dec 21, 2009 at 12:36 PM, David Gobbi <david.gobbi at gmail.com> wrote:
> On Mon, Dec 21, 2009 at 10:31 AM, John Drescher <drescherjm at gmail.com> wrote:
>>> sorry but I don't see how vtkImageFlip could help me to, for example:
>>> I have a vtkImageData obtained from vtkGDCMImageReader, the images are
>>> sorted by the dicom instance number tag, then, I need to change the
>>> sort order key to for example, acquisition time tag and then display
>>> the images with this new order.
>>>
>>
>> Normally the with dicom CT images difference is just flipping the
>> image. However I can imagine cases where that will not work.
>>
>> John
>
> I've had exactly the same issue with DICOM (not specifically the
> GDCMReader though).  There is no filter to reorganize the vtkImageData
> slices with strides and such.  I had to read in the data
> slice-by-slice (i.e. a different reader for each slice) and use
> vtkImageAppend to put it together in the right order.
>

I believe you can also rearrange the order with the itk dicom series
reader. I mean after enumerating the series you can either use the
several defined sorting orders or manipulate the list of images
yourself. I use the sort order for one project and use instance number
instead of position.

John



More information about the vtkusers mailing list