Luca:<br><br>Please read the thread: <br> <a href="http://public.kitware.com/pipermail/insight-users/2005-April/012724.html">http://public.kitware.com/pipermail/insight-users/2005-April/012724.html</a><br><br>ITK's first byte on disk is origin as with medical images. With VTK, the first byte of the last row on disk is the first byte on memory.
<br>In effect, the y axis is flipped taking images from ITK <--> VTK.<br>(The difference between the computer graphics and the medical co-ordinate systems)<br>
<br>There are multiple ways of getting around this. You can use vtkImageFlip to flip your image, Or use vtkCamera::SetUserTransform with scale values of (1, -1, 1). I'd recommend actually flipping the image, so that querying pixel positions with GetScalarPointer(x,y,z) in ITK and VTK return the same values. Or you might shoot yourself in the foot accidentally.
<br><br>--<br>karthik<br><br><div><span class="gmail_quote">On 4/3/07, <b class="gmail_sendername">Luca Tersi</b> <<a href="mailto:lucatersi@gmail.com">lucatersi@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>I'm trying to build an FLTK application to register a 2D fluoroscopic DICOM image (.dcm) with a CT 3D cad model of a joint. The image should be in the background, and the user should be able to move the CAD with arrows or mouse. I'm at the beginning and at the moment I'm just reading the image with ITK and showing it using vtkImageMapper, vtkActor2D and vtkFlRenderWindowInteractor. Unfortunately the image appears upside-down and to dark. Do you know why? I tryed also to use vtkImageActor: the color is ok, but the image is still upside down and it rotates with the camera (I don't want this!! only the CAD model will have to rotate..).
<br>Thanks<br>Luca <br clear="all"><span class="sg"><br>-- <br>Luca Tersi<br>Biomedical Engineer<br>--------------------------------------<br>Phone: +39 349 8492262<br>E-Mail : <br><a href="mailto:lucatersi@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
lucatersi@gmail.com</a>
<br><a href="mailto:luca.tersi@studio.unibo.it" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">luca.tersi@studio.unibo.it</a>
</span><br>_______________________________________________<br>Insight-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Insight-users@itk.org">Insight-users@itk.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">
http://www.itk.org/mailman/listinfo/insight-users</a><br><br></blockquote></div><br>