[Insight-users] Problem with reading binary image

David Doria daviddoria at gmail.com
Wed Mar 30 14:26:01 EDT 2011


On Wed, Mar 30, 2011 at 2:04 PM, xiu jiang <xjiang01 at hotmail.com> wrote:

>
> Hi, all
>
> I'm trying to read TIFF image which contains the pixel value of only 1 and
> 0 and use it as a binary image. But I found the pixel  value is changed from
> 1 and 0 to 198 and 160 after I read it. Is there anybody who can tell me how
> to fix this problem? below is the code.
>
> typedef itk::ImageFileReader< ImageType > ReaderType;
> ReaderType::Pointer reader = ReaderType::New();
> std::string filename = inputDirectoryName;
> reader->SetFileName( filename );
> reader->Update();
> return reader->GetOutput();;
>
> Thanks,
> Xiu
>

What is your ImageType?

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110330/5b8d6c54/attachment.htm>


More information about the Insight-users mailing list