MantisBT - ITK
View Issue Details
0011426ITKpublic2010-11-09 15:312010-11-18 21:09
David Doria 
kentwilliams 
normalminoralways
closedfixed 
ITK-4-A0 
ITK-4-A2 
2010-11-15
completed
0011426: MetaImageWriter pixel type limitation
I in itkImageIOBase.cxx, the Vector and CovariantVector pixel types are manually checked to be between length 2 and 7. I'm assuming this was arbitrarily chosen because of the way the pixel types are checked:

...
 else if ( ptype == typeid( Vector< T, 5 > ) )
   {
   This->SetNumberOfComponents(5);
   This->SetPixelType(ImageIOBase::VECTOR);
   This->SetComponentType(ntype);
   return true;
   }
...

Is there a way to do something more like "check the length of the vector, then set the number of components to the length" so we can allow images with arbitrary length vector pixels to be written?
Fixed by gerrit topic http://review.source.kitware.com/#change,353 [^]
No tags attached.
Issue History
2010-11-09 15:31David DoriaNew Issue
2010-11-09 15:31David DoriaSprint Status => active
2010-11-09 15:50Hans JohnsonStatusnew => assigned
2010-11-09 15:50Hans JohnsonAssigned To => kentwilliams
2010-11-11 14:51kentwilliamsNote Added: 0023184
2010-11-15 11:36kentwilliamsResolutionopen => fixed
2010-11-15 11:36kentwilliamsSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=6#r6
2010-11-16 12:02kentwilliamsNote Added: 0023289
2010-11-16 12:03kentwilliamsResolution Date => 2010-11-15
2010-11-16 12:03kentwilliamsSprint Statusactive => completed
2010-11-16 12:03kentwilliamsStatusassigned => resolved
2010-11-16 12:03kentwilliamsFixed in Version => ITK-4-A2
2010-11-18 21:09Luis IbanezStatusresolved => closed
2010-11-18 21:09Luis IbanezNote Added: 0023399

Notes
(0023184)
kentwilliams   
2010-11-11 14:51   
Short answer: No, not without a deeper revamping of the ImageIO and Pixel type system than we're likely to undertake. I'm submitting an ITKV4 patch that will allow Vector/CovariantVector/FixedArray pixel types up to a length of 12.

The problem is that given the multiplicity of type, it's very difficult to form a useful template metaprogramming solution; I can't puzzle out how to discriminate between scalar types, Vector, RGB, RGBA, etc.
(0023289)
kentwilliams   
2010-11-16 12:02   
Fixed by gerrit topic http://review.source.kitware.com/#change,353 [^]
(0023399)
Luis Ibanez   
2010-11-18 21:09   
We have decided to skip the "resolved" status and move directly to "closed".