[Insight-users] Re: Read/ Display Dicom

Luis Ibanez luis.ibanez at kitware.com
Mon, 19 Apr 2004 14:11:19 -0400


Hi Alam,

Thanks for the additional details on your
visualization problem.

Note that if you generated the Mesh points
from the image, the coordinates of those
points should match the physical coordinates
of the image.  You could use methods such
as TransformIndexToPhysicalCoordinates in the
itk::Image in order to double check if points
in the Mesh match the image coordinates.

If you want to move the image origin to another
position, you could use the ChangeInformationImageFilter.
However, this is *very dangerous*, specially if you are
actually using your application for assisting diagnosis,
or for guiding an intervention.  In terms of visualization,
you should rather manipulates the camera coordinates,
instead of relocating the object in space.

It will help you to take a piece of paper, and draw on it
a schematic representation of the scanner, with the patient
on it, and draw the coordinate system of the image as supper
imposed in the geometry of the scanner/patient. Hang this
paper close to your screen and make sure that your revisit
the settings every time you receive and image from a different
scanner.


  Regards,


     Luis


-------------------------
Alam, Mohammed wrote:

> Thanks Luis 
> 
> I will try your suggestion. However I have a 3d Mesh made by dicom
> of(512, 512, 30). When I try to save the 3d Mesh the origin of the mesh
> is (0,0,0) and thus all points saved are +ve of the origin. However I
> would like the origin to be moved to (256,256,15) so I may get the mesh
> centered.
> 
> I did try to set the origin of the input as 256,256,30, but it doesnot
> apply  in the mesh :)
> 
> -----Original Message-----
> From: Luis Ibanez [mailto:luis.ibanez at kitware.com] 
> Sent: Monday, April 19, 2004 1:07 PM
> To: IQTIDAR ALAM
> Cc: insight-users at itk.org
> Subject: Re: Read/ Display Dicom
> 
> 
> 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
>>
> 
> 
> 
> 
>