[vtk-developers] The FileLowerLeft flag

David Gobbi david.gobbi at gmail.com
Fri Dec 16 15:08:21 EST 2011


Hi All,

I am doing some modifications to the vtkDICOMImageReader to allow it
to keep images in their original top-to-bottom ordering.  At first I
was thinking of using the FileLowerLeft flag for this, but upon
further consideration, I think that this would be a misuse of
FileLowerLeft. It might be better to have a more explicit set of flags
for the readers and writers:

reader->SetMemoryRowOrderToFileNative()
reader->SetMemoryRowOrderToTopDown()
reader->SetMemoryRowOrderToBottomUp()

"FileNative" means keep the row ordering the same as it was in the
file.  So for DICOM, this means keep the original top-to-bottom
ordering.

"TopDown" means that if the image file uses a top-down ordering, then
VTK should load it into memory with a top-down ordering.  But if the
image uses bottom-up ordering, then flip it while reading it.

"BottomUp" will be the default.  This means that bottom-up image files
will stay bottom-up, and top-down image files will be flipped when
they are read.

Any thoughts?  I can expand this proposal into a wiki page if there is interest.

 - David



More information about the vtk-developers mailing list