[vtkusers] how to change image order

David Gobbi david.gobbi at gmail.com
Tue Dec 22 07:22:31 EST 2009


On Tue, Dec 22, 2009 at 2:48 AM, Mathieu Malaterre
<mathieu.malaterre at gmail.com> wrote:
> On Mon, Dec 21, 2009 at 6: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.
>
> Looks like a pretty cool feature for your vtkImage proposal ? An image
> does not need to be contiguous, thus allowing user to shuffle each
> slices around ?
>
> Mathieu

Hey, I never thought of that!  But yes, if an image is stored with a
different memory pointer for each slice, then reordering the series on
the fly is easy.

   David



More information about the vtkusers mailing list