[ITK Community] [Insight-developers] PROPOSAL FOR IMAGEIO: class to get image attributes before reading image

Simon Alexander skalexander at gmail.com
Thu Nov 21 14:00:49 EST 2013


I do this sort of thing using itk::ImageIOFactory::CreateImageIO

after using the method ReadImageInformation(), you have access to the
underlying


GetComponentType(), GetPixelType(), etc.

hope that helps


On Thu, Nov 21, 2013 at 1:52 PM, Williams, Norman K <
norman-k-williams at uiowa.edu> wrote:

> Is there a way to do this I'm missing? There are times when it's important
> to know the ITK pixel type and ImageDimension before reading an image
> file.  In particular, I'm writing a reader to be called from Matlab, and
> it would be good to at least create an image with the same ImageDimension
> as the on-disk file.
>
> This would (I guess) call itk::ImageIOFactory::CreateImageIO to get the
> appropriate ImageIO object, then set the filename and call
> itk::ImageIOFactory::ReadImageInformation.  This would work except for
> multi-file images like DICOM -- the fly in everyone's ImageIO ointment.
>
> I know how to do this; the question is where should it live? Should it be
> a method of itkImageFileReader? Or its own thing?
>
>
>
>
>
> ________________________________
> Notice: This UI Health Care e-mail (including attachments) is covered by
> the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is
> confidential and may be legally privileged.  If you are not the intended
> recipient, you are hereby notified that any retention, dissemination,
> distribution, or copying of this communication is strictly prohibited.
>  Please reply to the sender that you have received the message in error,
> then delete it.  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://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-developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20131121/955b3663/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://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-developers


More information about the Community mailing list