<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Hi</div><div><br></div><div>one good way to know which types are available is to use the <span style="background-color: rgba(255, 255, 255, 0);">GetTypes method on your template (before calling New). This method way introduced in 4.7 or after, I don't remember. But it is definitively available in 4.8 rc 1.</span></div><div><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div>I am not in front on a computer so please check this out yourself. Looking at the code we wrap float combinations here:</div><div><a href="https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Segmentation/RegionGrowing/wrapping/itkConfidenceConnectedImageFilter.wrap">https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Segmentation/RegionGrowing/wrapping/itkConfidenceConnectedImageFilter.wrap</a></div><div><br></div><div>Michka</div><div><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div><br>Envoyé de mon iPhone</div><div><br>Le 12 juin 2015 à 17:03, Porter, Justin <<a href="mailto:porterj@wusm.wustl.edu">porterj@wusm.wustl.edu</a>> a écrit :<br><br></div><blockquote type="cite"><div>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">


Hey all,
<div class=""><br class="">
</div>
<div class="">I’m just getting started with ITK, and I’m using the python bindings, which are really awesome. It looks like it was a fair bit of work to get such a heavily templated library to work in Python, but it’s really nice to be able to build scripts
 in python!</div>
<div class=""><br class="">
</div>
<div class="">I set out to reimplement Slicer’s “Simple Region Growing Segmentation” using ITK-Python, but I keep getting an error when I try to define a ConfidenceConnectedImageFilter template on a 3d float (and double, too). IMG_F == itk.Image[itk.F, 3] elsewhere
 in the script.</div>
<div class=""><br class="">
</div>
<div class="">
<div class=""></div>
</div>
<blockquote type="cite" class="">
<div class="">
<div class="">Traceback (most recent call last):</div>
<div class="">  File "simple_region_growing_segmentation.py", line 169, in <module></div>
<div class="">    sys.exit(main(sys.argv))</div>
<div class="">  File "simple_region_growing_segmentation.py", line 154, in main</div>
<div class="">    args.seed)</div>
<div class="">  File "simple_region_growing_segmentation.py", line 98, in attach_connect</div>
<div class="">    ccif = ConfidenceConnectedImageFilter[IMG_F, IMG_F].New()</div>
<div class="">  File "/home/jporter/usr/local/ITK/bin/Wrapping/Generators/Python/itkTemplate.py", line 263, in __getitem__</div>
<div class="">    (str(parameters), self.__name__))</div>
<div class="">KeyError: "itkTemplate : No template (<class 'itkImagePython.itkImageF3'>, <class 'itkImagePython.itkImageF3'>) for the itk::ConfidenceConnectedImageFilter class"</div>
</div>
</blockquote>
<div class=""><br class="">
</div>
<div class="">I’m pretty sure I built the bindings appropriately to get float support:</div>
<div class=""><br class="">
</div>
<div class="">
<div class=""></div>
</div>
<blockquote type="cite" class="">
<div class="">
<div class="">cmake -DITK_USE_REVIEW=ON -DITK_WRAP_PYTHON=ON -DBUILD_SHARED_LIBS=ON -DITK_LEGACY_SILENT=ON -DITK_WRAP_float=ON -DITK_WRAP_rgb_unsigned_char=ON -DITK_WRAP_vector_double=ON -DITK_WRAP_complex_double=ON -DITK_WRAP_double=ON </div>
</div>
</blockquote>
<div class=""><br class="">
</div>
<div class="">Interestingly, I <i class="">can</i> build a CurvatureFlowImageFilter or a CastImageFilter templated against 3d floats. I can also instantiate a ConfidenceConnectedImageFilter templated against itk.UC (presumably unsigned char?). That made me
 think that it’s not possible to build a ConfidenceConnectedImageFilter templated on floats, but the <a href="http://www.itk.org/Doxygen/html/Examples_2Segmentation_2ConfidenceConnected_8cxx-example.html#_a5" class="">ConfidenceConnected</a> example segmentation
 script does just that.</div>
<div class=""><br class="">
</div>
<div class="">I’d love to hear thought/suggestions as to how I can proceed!</div>
<div class=""><br class="">
</div>
<div class="">Cheers,</div>
<div class="">Justin</div>
<span style="font-size:10.0pt;font-family:"Arial","sans-serif""><o:p></o:p></span>
<p></p>
<div></div>
<p class="MsoNormal"><o:p> </o:p></p>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="100%" align="center">
</div>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:"Arial","sans-serif";color:gray">The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended
 recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone
 or return mail.</span></p>


</div></blockquote><blockquote type="cite"><div><span>_____________________________________</span><br><span>Powered by <a href="http://www.kitware.com">www.kitware.com</a></span><br><span></span><br><span>Visit other Kitware open-source projects at</span><br><span><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a></span><br><span></span><br><span>Kitware offers ITK Training Courses, for more information visit:</span><br><span><a href="http://www.kitware.com/products/protraining.php">http://www.kitware.com/products/protraining.php</a></span><br><span></span><br><span>Please keep messages on-topic and check the ITK FAQ at:</span><br><span><a href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a></span><br><span></span><br><span>Follow this link to subscribe/unsubscribe:</span><br><span><a href="http://public.kitware.com/mailman/listinfo/insight-users">http://public.kitware.com/mailman/listinfo/insight-users</a></span><br></div></blockquote></body></html>