[Insight-developers] MetaIO and vector images
Stephen Aylward
Stephen.Aylward at Kitware.com
Tue Mar 17 10:32:48 EDT 2009
Please do not make that change.
You are making an arbitrary change that is not motivated by need and
that breaks backward compatibility.
In your bug report you write:
--- snip ---
ElementNumberOfChannels = 3
ElementType = MET_UCHAR
When this is read, MetaIO interprets the file with a pixel type of
scalar and number of components of 3. This seems like an odd
ambiguity.
--- snip ---
This in no way seems odd or ambiguous. What you are suggesting is
ambiguous because the same notion will be repeated twice in the data -
a user will have to change the number of channels and the element type
to indicate an array. The current solution indicates an array by
simply changing the number of elements. Having a single method for
indicating an array reduces the chance on inconsistencies developing.
Additionally, your change is not consistent with the notion of
elementType - you are mixing the concept of element type with pixel
type. They are not the same.
Additionally, your suggestion eliminates the possibility of storing a
multi-channel file with vector data in each channel.
The current implementation is more general.
Additionally, you are breaking breaking backward compatibility...the
change you are suggesting is going to produce images that cannot be
read by programs compiled with previous versions of the library.
Why do you want to do this?
s
On Tue, Mar 17, 2009 at 10:11 AM, Bradley Lowekamp
<blowekamp at mail.nih.gov> wrote:
> Hello,
> This is in regards to the following bug I encountered:
>
> http://www.itk.org/Bug/view.php?id=8732
> Does anyone see any problems with changing MetaIO so that when it writes
> multi components pixel types, that it writes them an array type ie
> ElementType = META_UCHAR_ARRAY. This is just a change to itkMetaImageIO
> class, and not the library.
> I am also still trying to figure out what it mean's to be a scalar pixel
> type, with multiple components. This is how the reader would currently
> report written vector images.
> Brad
>
> ========================================================
>
> Bradley Lowekamp
>
> Lockheed Martin Contractor for
>
> Office of High Performance Computing and Communications
>
> National Library of Medicine
>
> blowekamp at mail.nih.gov
>
>
--
Stephen R. Aylward, Ph.D.
Chief Medical Scientist
Kitware, Inc. - North Carolina Office
http://www.kitware.com
(518) 371-3971 x300
More information about the Insight-developers
mailing list