[Insight-users] how to convert the pixeltype of a image

shiwei swingsw89 at 163.com
Mon Sep 2 21:35:49 EDT 2013


Tanks for your answer!However when I did what you have told, it still have some problem below:


itk::ExceptionObject<0031e508>

Description:itk::Error:TIFFimageIO:TIFF supports unsigned/signed char,unsigned short/signed short only.


As I said before, I want to use some tiff images ,however  TIFF support unsigned/signed char,unsigned short/signed short only, so I'm still asking if there is a way to convert the uchar or ushort type to double for delica use? Thank you!





At 2013-09-02 20:09:33,"Bill Lorensen" <bill.lorensen at gmail.com> wrote:
>When you define your read, just template it over the image type you
>want the reader to produce.
>typedef itk::Image< double, 2 >         ImageType;
>typedef itk::ImageFileReader<ImageType> ReaderType;
>ReaderType::Pointer reader = ReaderType::New();
>
>
>On Sun, Sep 1, 2013 at 10:41 PM, shiwei <swingsw89 at 163.com> wrote:
>> Hi, When I was dealing with some tiff images, it only have two kinds of
>> pixeltype to choose: char and short. However,I need to convert the pixeltype
>> to double for delica use, I'm wondering whether ITK has a way to convert the
>> pixeltype to double? Thank you!
>>
>>
>>
>> _____________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Kitware offers ITK Training Courses, for more information visit:
>> http://www.kitware.com/products/protraining.php
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-users
>>
>
>
>
>-- 
>Unpaid intern in BillsBasement at noware dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20130903/0848e164/attachment.htm>


More information about the Insight-users mailing list