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

Bill Lorensen bill.lorensen at gmail.com
Mon Sep 2 08:09:33 EDT 2013


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


More information about the Insight-users mailing list