[Insight-users] LevelSetEquationTermContainer->SetInput() ?

Arnaud Gelas arnaudgelas at gmail.com
Mon Dec 17 06:05:10 EST 2012


Hi Vaaksiainen,

The SetInput method of LevelSetEquationTermContainer is used and needed 
only in the case where no input images are provided to each term.
It provides the input of the container to each element...

In your case, each term provided one input image, so there is no need to 
provide an input image to the container. If you provide one in such a 
case, it would not get used anyway...

Best,
Arnaud

On 12/10/2012 04:26 PM, Vaaksiainen wrote:
> Hi,
>
> I'm beginning to use ITK Levelsets v4 (v3 and ITK in common I have
> some depth knowledge of). To me it appears interesting and promising
> framework, but it's documentation seems little unfinished least to
> say. So I ask here:
>
> Given a single levelset, I compose my levelset function using
> subclasses of itk::LevelSetEquationTermBase as follows (right?) (I
> represent the code only for its relevant parts):
>
> itk::LevelSetEquationAdvectionTerm< ... >::Pointer adv;
> itk::LevelSetEquationCurvatureTerm< ... >::Pointer curv;
>
>
> adv->SetAdvectionImage( advImage ); // itk::Image<itk::Vector<float,2>,2>
> adv->SetCoefficient( 1.0 );
>
> curv->SetInput( curvImage ); // itk::Image<float,2>
> curv->SetCoefficient( 0.5 );
>
> itk::LevelSetEquationTermContainer< ... >::Pointer termCtr;
> termCtr->SetCurrentLevelSetId( 0 );
> termCtr->AddTerm( 0, adv );
> termCtr->AddTerm( 1, curv );
>
> //
> // NOW THE QUESTION
> //
> // What image am I supposed to give for the term container?
> // In this example I have two, but I could have many others...
> // Examples (tests) all use the same image for term input, so no help there.
> //
>
> termCtr->SetInput( rand()%2 ? curvImage : advImage ); // ???!
>
>
> Thanks in advance,
>
> -Vaaksiainen
> _____________________________________
> 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://www.kitware.com/products/protraining.php
>
> 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-users



More information about the Insight-users mailing list