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

Vaaksiainen vaaksiainen at gmail.com
Mon Dec 10 10:26:53 EST 2012


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


More information about the Insight-users mailing list