[Insight-users] Re: Read/ Display Dicom

Luis Ibanez luis.ibanez at kitware.com
Mon, 19 Apr 2004 13:07:12 -0400


Hi Iqtidar,

Maybe a bit of information of how
you display the images will help  :-)

Chances are that you have a display problem,
not an ITK problem.

ITK origin is independent of the method
you use for displaying the images.

If you want to interpret the pixel buffer in ITK,
this is how it goes: The fastest changing index in
the memory buffer is associated to the X coordinate.
The second fastest is associated to the Y coordinate.
The third fastest is associated to the Z coordinate
... and so on in N-Dimensions.

Note that these are real physical space coordinates,
not screen coordinates. Screen coordinates usually
have the origin in the top-left of the screen.

If you want to see ITK images displayed correctly,
you must make sure that your visualization code place
the origin of coordinate in the bottom-left of the screen,
the positive X axis pointing to the right of the screen
and the positive Y axis pointing to the top of the screen.

The sanity test is very simple: Just set the pixel with
index (0,0) to a maximum intensity, then pass the image
through your visualization code, if you see the bright
pixel on the bottom left, everything is fine; but if you
see the bright pixel on the top-left, then your
visualization code is upside-down.



   Regards,


      Luis


----------------------
IQTIDAR ALAM wrote:

> Hello
> 
> I am having trouble reading and displaying Dicom Images. The 
> images are being displayed Inverted. ITK origin is Top_Left 
> corner, however my images are showing origin as Bottom_left 
> corner.
> 
> Can any please tell me what i am doing wrong or how to make 
> changes to it.
> 
> Thanks
>