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"><<a href="mailto:pie.nardelli@gmail.com" target="_blank">pie.nardelli@gmail.com</a>></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'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>
'itk::Image<TPixel,VImageDimension> *' to 'const<br>
itk::Image<TPixel,VImageDimension> *'.<br>
<br>
What might it be? Any Idea?<br>
<br>
Thank you again<br>
<br>
Pietro<br>
<br>
2012/5/24 Luis Ibanez <<a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>>:<br>
<div class="HOEnZb"><div class="h5">> HI Pietro,<br>
><br>
> It depends where in your application you are extracting the region.<br>
><br>
> If you are doing it in the code that deals with visualization and the<br>
> resulting region is only going to be used for display, then the VTK<br>
> filter will do just fine.<br>
><br>
> On the other hand, if you are doing this in the middle of a pipeline<br>
> and the extracted region is going to be used for subsequent<br>
> processing, you probably should prefer the ITK Region of Interest<br>
> filter:<br>
><br>
> <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>
><br>
> since it preserves the orientation (direction cosines) of the image,<br>
> and properly sets the origin in physical coordinates of the output<br>
> image region. This are very important attributes if you are using<br>
> the resulting image in registration, or if you plan to correlate it<br>
> spatially to the input image.<br>
><br>
> Hope this helps,<br>
><br>
> Luis<br>
><br>
><br>
> ------------------------------------<br>
> On Wed, May 23, 2012 at 12:08 PM, Pietro Nardelli <<a href="mailto:pie.nardelli@gmail.com">pie.nardelli@gmail.com</a>><br>
> wrote:<br>
>><br>
>> Sorry guys,<br>
>><br>
>> I have another question: I'm using the class Region of interest to<br>
>> crop a volume of a DICOM dataset, but I found out that in VTK there is<br>
>> the class Extract ROI which seems very similar. Does anyone know what<br>
>> the difference between the 2 classes? Which is the best one?<br>
>><br>
>> Thank you,<br>
>><br>
>> Pietro<br>
>> _____________________________________<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.php" target="_blank">http://www.kitware.com/products/protraining.php</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>
><br>
</div></div></blockquote></div><br>