[ITK-users] sanity check, please

Tammy Diprima tammy.diprima at stonybrook.edu
Tue Sep 13 10:30:23 EDT 2016


Dear Friends,

I've got a tiff image, which, when I read it in with ITK example "
ReadUnknownImageType", pixel type is short.

The following is correct for reading in that image, right?
    typedef itk::Image<short, 2> ShortImageType;

    typedef itk::ImageFileReader<ShortImageType> ReaderType;

    ReaderType::Pointer reader = ReaderType::New();
    reader->SetFileName(filename);
    reader->Update();

    ShortImageType::Pointer inputImage = reader->GetOutput();

I'm asking because example TIFFImageIO shows creating an image in
memory *(rather
than reading it from a file)*, but then it *writes* it as itk::TIFFImageIO.

So I'm confused.  Do I need to read it as TIFFImageIO?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20160913/ba1cab39/attachment.html>


More information about the Insight-users mailing list