Hi Luis,<br><br>1 - I&#39;m using PNG format to save.<br>2 - I&#39;m using QImage from Qt (and I don&#39;t have other option by some project issues). For more details: I&#39;m just extracting the slice and creating a QImage with the width and height that&#39;s are achieved from the GetLargestPossibleRegion().GetSize() on the extracted slice. After that, I&#39;m using an image iterator to access the pixels populates the QImage.
<br><br>B) You are using an image viewer that does not take pixel<br>&nbsp;&nbsp;&nbsp;&nbsp;spacing into account.<br>&nbsp;&nbsp;&nbsp; Yes, this image viewer or the approach aren&#39;t taking pixel spacing in account. But, if I&#39;m using VTK ( vtkImageReslice ) to extract slices, I can set the output spacing and the interpolation algorithm that&#39;s will be used. I think that&#39;s are a visualization task, but think that&#39;s are more safe if I&#39;ll use an algorithm or approach from the toolkit, and not just &quot;stretch&quot; the image by Qt ways. Then, have some approach using filters inside the toolkit (like VTK does) that&#39;s take in account the spacing values and returns to me an image that&#39;s I don&#39;t be care about spacing values? Of course, this image will be used only for visualization, and the original image will be intact to other processing tasks, like segmentation or registration.
<br><br>Thank&#39;s in advance,<br><br>Wagner Sales<br><br><div><span class="gmail_quote">2007/12/13, Luis Ibanez &lt;<a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>Hi Wagner,<br><br>Two Questions:<br><br><br>1) What fileformat did you used for saving the slice images ?<br><br>2) What image viewer (software) are you using to display these<br>&nbsp;&nbsp;&nbsp;&nbsp;resulting slice image files ?<br><br>
<br><br>It is very likely that:<br><br><br>A) you choose to save the image in a file format that does not<br>&nbsp;&nbsp;&nbsp;&nbsp;support pixel spacing (e.g. PNG, JPEG...)<br><br>and/or<br><br>B) You are using an image viewer that does not take pixel
<br>&nbsp;&nbsp;&nbsp;&nbsp;spacing into account.<br><br><br>As a verification, in your slice extraction code you can<br>add the call:<br><br><br>&nbsp;&nbsp; extractFilter-&gt;Update();<br>&nbsp;&nbsp; std::cout &lt;&lt; &quot;Input volume characteristics&quot; &lt;&lt; std::endl;
<br>&nbsp;&nbsp; extractFilter-&gt;GetInput()-&gt;Print( std::cout );<br>&nbsp;&nbsp; std::cout &lt;&lt; &quot;Output slice characteristics&quot; &lt;&lt; std::endl;<br>&nbsp;&nbsp; extractFilter-&gt;GetOutput()-&gt;Print( std::cout );<br><br><br>and with this output you should be able to verify if the
<br>original spacing of the image was respected on every slice.<br><br><br>Please let us know your answers to questions (1) and (2).<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;Thanks<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Luis<br><br>------------------<br>Wagner Sales wrote:
<br>&gt; Hi all,<br>&gt;<br>&gt; I&#39;m extracting slices from DICOM datasets em multiple axis (X, Y, Z) by<br>&gt; using the ExtractImageFilter.<br>&gt; The code are really simple, and based on the example provided in ITK
<br>&gt; Software Guide.<br>&gt; The slices in Z orientation (transversal) are fine, but the other axis (<br>&gt; X and Y ) appears to be not ok. This axis have an aspect little bit<br>&gt; compressed.<br>&gt; I was saved this images by using the ImageWriter to be sure that&#39;s not a
<br>&gt; problem in visualization, and the problems occurs too.<br>&gt; I&#39;m attaching a screen shot of the tree axis to illustrate this.<br>&gt; Can anyone helps me?<br>&gt;<br>&gt; Thks in advance,<br>&gt;<br>&gt; Wagner Sales
<br>&gt; ------------------------------------------------------------------------<br>&gt;<br>&gt;<br>&gt; ------------------------------------------------------------------------<br>&gt;<br>&gt; _______________________________________________
<br>&gt; Insight-users mailing list<br>&gt; <a href="mailto:Insight-users@itk.org">Insight-users@itk.org</a><br>&gt; <a href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users
</a><br></blockquote></div><br>