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

gowith king gowithking at googlemail.com
Mon Sep 15 14:19:56 EDT 2014


Hi McCormick
     I think you give me a hint for the key error problem: I tried few
other types in my python such as US , UI, SI ... most of them could not
work well . another keyerror pops out for the template lose: when I try
itk.Image[itk.SI, 3]
KeyError: 'itkTemplate : No template (<itkCType signed int>, 3) for the
itk::Image class'



On Mon, Sep 15, 2014 at 8:11 PM, gowith king <gowithking at googlemail.com>
wrote:

> Hi McCormick
>      Thank you so much for your suggestion, when I use US it pops out a
> keyerror , not template for the us3 [?]. But then I change to SS it works
> well for now.
>      any suggestion for the second issue ?
>      I dig for really long time for this keyerror problem , but have no
> clue at all
>
>
> On Mon, Sep 15, 2014 at 7:54 PM, Matt McCormick <
> matt.mccormick at kitware.com> wrote:
>
>> Hi,
>>>
>>
>>
>>>
>>>    -      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?
>>>
>>> itk.Image.UC3 is an itk::Image with unsigned char pixels (range 0-255)
>> and with three dimension.  For the correspondence between mangled names and
>> basic types see [1].  For a 16 bit image use 'US' or 'SS'.
>>
>> HTH,
>> Matt
>>
>> [1]
>> http://itk.org/gitweb?p=ITK.git;a=blob;f=Wrapping/WrapBasicTypes.cmake;h=f303a1c245a541e702674f969dac8209b12f2e93;hb=HEAD
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140915/ba6912b2/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 33A.gif
Type: image/gif
Size: 581 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/community/attachments/20140915/ba6912b2/attachment-0002.gif>


More information about the Community mailing list