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

Timothee Evain tevain at telecom-paristech.fr
Tue Sep 13 10:42:53 EDT 2016


Hi,

That's actually what is done when you're using the image file reader.
This filter (and it writing twin ImageFileWriter) are automatically calling the needed IO depending on the input/output format at run time.

HTH,

Tim


----- Mail original -----
De: "Tammy Diprima" <tammy.diprima at stonybrook.edu>
À: "Insight-users" <insight-users at itk.org>
Envoyé: Mardi 13 Septembre 2016 16:30:23
Objet: [ITK] [ITK-users] sanity check, please

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 ? 

_____________________________________
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

_______________________________________________
Community mailing list
Community at itk.org
http://public.kitware.com/mailman/listinfo/community
_____________________________________
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