[ITK] pixeltype define and template lost in python warped ITK

gowith king gowithking at googlemail.com
Mon Sep 15 13:04:36 EDT 2014


Hi, my Itk friends,
      I am using python warped ITK to write my first itk process to
analysis series of  mhd images, I test my procedure in slicer4 first to
make sure it works well. Then I start the programming. However, two problem
block me for a whole day.

   -      The imagetype of itk.Image.UC3 should be used for 16 bit image in
   all the itk instructions. But in my case it only has a range of 0-255. Then
   I take itk.Image.F3, then it get a range of '-3.40282346639e+38
   3.40282346639e+38' . The grey value of my image is 0-9000 . How could I
   read it proprietorially?



   -      I need to get a label map with simply threshold method, and then
   make few statistics with LabelStatisticsImageFilter. So the
   BinaryImageToLabelMapFilter is taken. but then the key error occurs:

 LabelFilter = itk.BinaryImageToLabelMapFilter[IUC3].New()
  File "/usr/local/lib/ITK-4.7/Python/itkTemplate.py", line 263, in
__getitem__
    (str(parameters), self.__name__))
KeyError: "itkTemplate : No template [<class 'itkImagePython.itkImageUC3'>]
for the itk::BinaryImageToLabelMapFilter class"


       What should I do to achieve the LabelStatisticsImageFilter ?
      Thank you in advance[?]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140915/b28bc3bd/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 330.gif
Type: image/gif
Size: 96 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/community/attachments/20140915/b28bc3bd/attachment-0002.gif>


More information about the Community mailing list