[Insight-users] Get the number of components per pixel without reading image
David Doria
daviddoria at gmail.com
Wed Nov 28 17:00:26 EST 2012
Without reading the image, it is possible to determine some
information about the image:
e.g. the number of dimensions:
itk::ImageIOBase::Pointer imageIO =
itk::ImageIOFactory::CreateImageIO(
filename.c_str(), itk::ImageIOFactory::ReadMode);
return imageIO->GetNumberOfDimensions();
I want to determine the number of components per pixel in the same
manner (i.e. a normal RGB image would return 3). Is that possible? I
didn't see any function name in ImageIOBase that indicated such a
functionality.
Thanks,
David
More information about the Insight-users
mailing list