[ITK] [ITK-users] sanity check, please

Tammy Diprima tammy.diprima at stonybrook.edu
Tue Sep 13 10:58:00 EDT 2016


Thank you Matt, as always, for your support :-)

- Tammy


On 13 September 2016 at 10:42, Matt McCormick <matt.mccormick at kitware.com>
wrote:

> Hi Tammy,
>
> Yes, the code looks good and sane :-).
>
> Internally, your itk::ImageFileReader will use an itk::TIFFImageIO.
> After reading the images, the instance of the itk::ImageIO used can be
> obtained with the reader via [1]
>
>   itk::ImageIOBase::Pointer imageIO = reader->GetImageIO();
>   std::cout << imageIO << std::endl;
>
> Hope this helps,
> Matt
>
> [1] https://itk.org/Doxygen/html/classitk_1_1ImageFileReader.html#
> a9786e003237eaa37f0d46714b2ba75c1
>
> On Tue, Sep 13, 2016 at 10:30 AM, Tammy wrote:
> > 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/community/attachments/20160913/514d4063/attachment.html>
-------------- next part --------------
_____________________________________
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://public.kitware.com/mailman/listinfo/insight-users


More information about the Community mailing list