<font size="2"><font face="verdana,sans-serif">Thanks for suggestions.</font></font><div><font class="Apple-style-span" face="verdana, sans-serif"><br></font></div><div><font size="2"><font face="verdana,sans-serif"></font></font><font class="Apple-style-span" face="verdana, sans-serif">I think I will go the resampling way. Since the resampled image will only be used for visualization (the end of the processing pipeline), the information loss is not really important.</font></div>
<div><font class="Apple-style-span" face="verdana, sans-serif"><br></font></div><div><font class="Apple-style-span" face="verdana, sans-serif">Regards,</font></div><div><font class="Apple-style-span" face="verdana, sans-serif">Dženan<br>
</font><div><br><div class="gmail_quote">2011/4/12 Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Dženan,<br><br>vtk and itk have different coordinate systems. itk treats images such that the first row of pixels on disk is the first row of pixels in memory. This is the normal imaging convention. vtk places the last row of pixels on disk as the first row of pixels in memory. This is normal graphics convention.<br>
<br>To get the two coordinate systems to agree, use either itkFlipImageFilter or vtkImageFlip to flip the y-axis.<br><br>vtk does not store the orientation of an image. itk does. If your images have a non-identity orientation (direction), then you should resample the image before passing it to vtk.<br>
<br>Bill<br><br><div class="gmail_quote"><div><div></div><div class="h5">2011/4/12 Dženan Zukić <span dir="ltr"><<a href="mailto:dzenanz@gmail.com" target="_blank">dzenanz@gmail.com</a>></span><br></div></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
<div><div></div><div class="h5">
<font size="2"><font face="verdana,sans-serif">Hi ITK programmers!</font></font><div><div><font face="verdana, sans-serif" size="2"><br></font></div><div><font size="2"><font face="verdana,sans-serif"><a href="http://www.itk.org/Wiki/ITK" target="_blank">ITK wiki</a> state</font></font>s "a beta of ITK4 will be available by the end of March 2011". Could you please update that info (since it is no longer true).</div>
<div><font size="2"><br></font></div><div><font size="2">And a question: do you plan to fix itk::ImageToVTKImageFilter so it works properly, i.e. physical coordinates in ITK and world coordinates in VTK are equal, if you haven't done so already?</font></div>
<div><font size="2"><br></font></div><div><font size="2">Problem example: I load a dataset using ITK readers, apply some filters to it (denoising, rescaling), pass it through ImageToVTKImageFilter and add it into the scene using vtkGPUVolumeRayCastMapper. I also do segmentation using ITK's physical coordinates, create polygonal meshes of segmented objects, also add them to the scene and behold: they are in completely different places (if ITK_IMAGE_BEHAVES_AS_ORIENTED_IMAGE is set to TRUE)!</font></div>
<div><font size="2"><br></font></div><div><font size="2">The workaround is to set ITK_IMAGE_BEHAVES_AS_ORIENTED_IMAGE to FALSE, but then real image orientation is lost (I don't need it yet but I plan to use it).</font></div>
<div><font size="2"><br></font></div><div><font size="2">This problem would be understandable if ITK and VTK were made by 2 different companies (but it is not the case).<br></font></div></div><div><font size="2"><br></font></div>
<div><font size="2">Regards,</font></div><div><font size="2">Dženan</font></div>
<br></div></div>_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a 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>
</blockquote></div><br></div></div>