Hi Pietro,<br><br>Could you please post to the list the line of code<br>(and even better, include the 10 lines above and <br>below this line) so we can see it in context ?<br><br>There is something suspicious in your message,<br>
since, it should be trivial to cast a non-const pointer<br>to a const pointer.  Please make sure that you copy<br>paste the error message in your email exactly as<br>you get it from the compiler.<br><br><br>  Thanks<br><br>
<br>     Luis<br><br><br>-------------------------------------<br><div class="gmail_quote">On Thu, May 24, 2012 at 7:53 AM, Pietro Nardelli <span dir="ltr">&lt;<a href="mailto:pie.nardelli@gmail.com" target="_blank">pie.nardelli@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Sorry Luis,<br>
<br>
I have another quetion: I&#39;m trying to create a pipeline which uses a<br>
cropped volume (obtained by using the RegionOfInterestImageFilter) as<br>
input of a connected threshold filter. Building it, though, I get an<br>
error: it says that it cannot convert parameter 1 from<br>
&#39;itk::Image&lt;TPixel,VImageDimension&gt; *&#39; to &#39;const<br>
itk::Image&lt;TPixel,VImageDimension&gt; *&#39;.<br>
<br>
What might it be? Any Idea?<br>
<br>
Thank you again<br>
<br>
Pietro<br>
<br>
2012/5/24 Luis Ibanez &lt;<a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>&gt;:<br>
<div class="HOEnZb"><div class="h5">&gt; HI Pietro,<br>
&gt;<br>
&gt; It depends where in your application you are extracting the region.<br>
&gt;<br>
&gt; If you are doing it in the code that deals with visualization and the<br>
&gt; resulting region is only going to be used for display, then the VTK<br>
&gt; filter will do just fine.<br>
&gt;<br>
&gt; On the other hand, if you are doing this in the middle of a pipeline<br>
&gt; and the extracted region is going to be used for subsequent<br>
&gt; processing, you probably should prefer the ITK Region of Interest<br>
&gt; filter:<br>
&gt;<br>
&gt; <a href="http://www.itk.org/Doxygen/html/classitk_1_1RegionOfInterestImageFilter.html" target="_blank">http://www.itk.org/Doxygen/html/classitk_1_1RegionOfInterestImageFilter.html</a><br>
&gt;<br>
&gt; since it preserves the orientation (direction cosines) of the image,<br>
&gt; and properly sets the origin in physical coordinates of the output<br>
&gt; image region.  This are very important attributes if you are using<br>
&gt; the resulting image in registration, or if you plan to correlate it<br>
&gt; spatially to the input image.<br>
&gt;<br>
&gt;     Hope this helps,<br>
&gt;<br>
&gt;          Luis<br>
&gt;<br>
&gt;<br>
&gt; ------------------------------------<br>
&gt; On Wed, May 23, 2012 at 12:08 PM, Pietro Nardelli &lt;<a href="mailto:pie.nardelli@gmail.com">pie.nardelli@gmail.com</a>&gt;<br>
&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Sorry guys,<br>
&gt;&gt;<br>
&gt;&gt; I have another question: I&#39;m using the class Region of interest to<br>
&gt;&gt; crop a volume of a DICOM dataset, but I found out that in VTK there is<br>
&gt;&gt; the class Extract ROI which seems very similar. Does anyone know what<br>
&gt;&gt; the difference between the 2 classes? Which is the best one?<br>
&gt;&gt;<br>
&gt;&gt; Thank you,<br>
&gt;&gt;<br>
&gt;&gt; Pietro<br>
&gt;&gt; _____________________________________<br>
&gt;&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;&gt;<br>
&gt;&gt; Visit other Kitware open-source projects at<br>
&gt;&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;&gt;<br>
&gt;&gt; Kitware offers ITK Training Courses, for more information visit:<br>
&gt;&gt; <a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
&gt;&gt;<br>
&gt;&gt; Please keep messages on-topic and check the ITK FAQ at:<br>
&gt;&gt; <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
&gt;&gt;<br>
&gt;&gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt; <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
&gt;<br>
&gt;<br>
</div></div></blockquote></div><br>