[Insight-developers] Modifying MaskImageFilter to work on VectorImage

Cory Quammen cquammen at cs.unc.edu
Mon Apr 11 01:30:58 EDT 2011


David and Luis,

I have posted a potential solution on github.

https://github.com/cquammen/ITK/commit/a92bcc79f267d79f48abb7358881c4b2323ae01d

I will post it to gerrit if you don't see any showstoppers.

Thanks,
Cory

On Sun, Apr 10, 2011 at 5:50 PM, Luis Ibanez <luis.ibanez at kitware.com> wrote:
> Hi David,
>
> We have been discussing this problem with Julien Malik from the
> Orfeo Toolbox team.
>
> In summary, there is a function in the NumericTraits that is intended
> to deal with management of size in containers of variable size
> such as the VariableLengthVector and the std::vector.
>
> Regarding your questions, please see below.
>
> On Thu, Apr 7, 2011 at 7:50 PM, David Doria <daviddoria at gmail.com> wrote:
>> We have been having some discussion on the best way to allow MaskImageFilter
>> to work on VectorImage (with pixels of type VariableLengthVector) . The
>> problem is that the length of a VariableLengthVector is not defined at
>> compile time. This means that in the MaskInput functor, the
>> member m_OutsideValue cannot be initialized.
>>
>> Brad has identified two problems,
>>
>> 1) How do we initialized the member variable in the functor?
>>
>
> We usually add "Set" methods to the functor,
> the add "Set" methods to the Filter itself,
> and they simply call the "Set" methods of the functor.
>
>> This seems to be the main issue I'm not sure how to address.
>>
>> 2) When do we detect the size of the vector image, and use reasonable
>> defaults?
>>
>
>
> At run time,
> by asking them for their "GetNumberOfComponents()
> from the vector image.
>
> Reasonable default (otherwise) is "1".
>
>> We think this could be done in BeforeThreadedGenerateData.
>>
>
> Yes, that's a good place.
>
> The GenerateInputInformation() or
> GenerateOutputInformation() may
> be good places as well.
>
>
>> The complete conversation is here:
>>
>> http://review.source.kitware.com/#change,1338
>> Any thoughts are welcome!
>> Thanks,
>>
>> David
>>
>> _______________________________________________
>> 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://kitware.com/products/protraining.html
>>
>> 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://www.itk.org/mailman/listinfo/insight-developers
>>
>>
> _______________________________________________
> 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://kitware.com/products/protraining.html
>
> 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://www.itk.org/mailman/listinfo/insight-developers
>



-- 
Cory Quammen
Computer Integrated Systems for Microscopy and Manipulation (CISMM)
Department of Computer Science
University of North Carolina at Chapel Hill
http://www.cs.unc.edu/~cquammen


More information about the Insight-developers mailing list