<div dir="ltr"><div><div><div><div>Ok, thanks but my question was more like How can I know which input image type requires a particular filter?<br></div>For example: itk::GradientMagnitudeImageFilter requires the input image to have a float pixel type (as described in the software guide). Where can I find this kind of informations? <br>
<br></div>Thank you.<br><br></div>Cheers,<br></div>Elena<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/12/12 Mauro Maiorca <span dir="ltr"><<a href="mailto:mauromaiorca@gmail.com" target="_blank">mauromaiorca@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Elena,<div><br></div><div>have a look at the ITK software guide (<a href="http://www.itk.org/ItkSoftwareGuide.pdf" target="_blank">http://www.itk.org/ItkSoftwareGuide.pdf</a>), chapter 4 (User's guide -> Data Representation -> Image), it might answer your question.</div>

<div><br></div><div>Section 4.1.1 shows how to create a 3D image with unsigned short pixel data, in summary you have to define your image type as:</div><div><div>typedef itk::Image< unsigned short, 3 > ImageType;<br>

</div><div>If you want to create an image with unsigned int pixel data, you have to replace "unsigned short" with "unsigned int", i.e.</div><div>typedef itk::Image< unsigned int, 3 > ImageType;<br>

</div><div><br></div><div>You can play with the examples that you can find either in your ITK source directory (Examples/DataRepresentation/Image/Image1.cxx, etc etc) or online (<a href="https://github.com/Kitware/ITK/blob/master/Examples/DataRepresentation/Image/Image1.cxx" target="_blank">https://github.com/Kitware/ITK/blob/master/Examples/DataRepresentation/Image/Image1.cxx</a> etc etc)</div>

<div><br></div><div>If you want to cast image types (for example converting from unsigned short to unsigned int), have a look at section "6.3 Casting and Intensity Mapping" of the ITK software guide.</div>
<div><br></div><div>Hope it helps.</div><div><br></div><div>cheers,</div><div>Mauro</div><div><br></div><div><br></div><div><br></div></div></div><div class="gmail_extra"><br>
<br><div class="gmail_quote"><div><div class="h5">On Thu, Dec 12, 2013 at 8:19 PM, elena bresciani <span dir="ltr"><<a href="mailto:elena.bresciani87@gmail.com" target="_blank">elena.bresciani87@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
<div dir="ltr"><div><div><div><div>Hi to everybody,<br><br></div>I have a (probably really silly) question about which kind of input image pixel type does a filter require.<br>Is it wrote in the doxygen documentation? If yes, where? <br>


<br></div>I'm obviously a beginner and I can't understand well how to read the documentation...<br><br></div>Thank you in advance,<br><br></div>Elena<br><div><div><div><div><br><br></div></div></div></div></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.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></blockquote></div><br></div>
</blockquote></div><br></div>