[Insight-developers] ImageBase->CopyInformation: Number of
components per pixel copied
Stephen R. Aylward
Stephen.Aylward at Kitware.com
Sat Sep 29 19:58:43 EDT 2007
Hi,
The CopyInformation function of ImageBase sets largestPossibleRegion,
Spacing, Origin, Directions...all good.
However, it also sets NumberOfComponentsPerPixel. Perhaps this is
inappropriate since it is not necessary for the images to have the same
pixel type for CopyInformation to work. Perhaps
NumberOfComponentsPerPixel is conceptually a pixel-type-specific piece
of information. Admittedly this is arguable, but consider a filter
that has a vector image as input and outputs a scalar image...we cannot
use the CopyInformation command.
Of course, the point is perhaps moot given the need for backward
compatibility...I cannot think of a backward-compatible solution beyond
better documentation.
Stephen
--
=============================================================
Stephen R. Aylward, Ph.D.
Chief Medical Scientist
Kitware, Inc. - Chapel Hill Office
http://www.kitware.com
Phone: (518)371-3971 x300
More information about the Insight-developers
mailing list