[Insight-users] More than one seed point in itk::FastMarchingImageFilter

Mr Francesco Grussu francesco.grussu at eecs.qmul.ac.uk
Tue Jun 12 06:00:46 EDT 2012


Dear all,
I am trying to modify the FastMarchingImageFilter.cxx from the ITK Guide
in order to use more than one seed point with a Fast Marching segmentation
filter from itk::FastMarchingImageFilter .

I suppose that I have to pass these seed points as Node containers
(FastMarchingFilterType::NodeContainer) but I cannot understand how to do
it exactly. Should I call the InsertElement() method of the
FastMarchingFilterType::NodeContainer object (via a its smart pointer)
more than once? To use more than one seed point, I thought to write
something like that:

******************

  typedef FastMarchingFilterType::NodeContainer           NodeContainer;
  NodeContainer::Pointer seeds = NodeContainer::New();

  InternalImageType::IndexType  seedPosition1;
  seedPosition1[0] = SEED1X; // a macro previously defined
  seedPosition1[1] = SEED1Y; // a macro previously defined

  InternalImageType::IndexType  seedPosition2;
  seedPosition2[0] = SEED2X; // a macro previously defined
  seedPosition2[1] = SEED2Y; // a macro previously defined

  const double seedValue = 0.0;

  typedef FastMarchingFilterType::NodeType                NodeType;

  NodeType node1;
  node1.SetValue( seedValue );
  node1.SetIndex( seedPosition1 );

  NodeType node2;
  node2.SetValue( seedValue );
  node2.SetIndex( seedPosition2 );

  seeds->Initialize();
  seeds->InsertElement( 0, node1 );
  seeds->InsertElement( 0, node2 );

******************

However, the segmentation I get is the same as if I had used just the
second seed point (with node2). node1 seems to be completely ignored by
the Fast Marching Filter.
Do you have any suggestions?

Thanks a lot,
regards

--Francesco



More information about the Insight-users mailing list