[Insight-users] Multiple seeds for Fastmarchingimagefilter
Dan Mueller
d.mueller at qut.edu.au
Mon Jul 16 19:12:17 EDT 2007
Hi OTL,
Firstly, the \index section is a LaTeX command for adding an entry in
the index. The ITK examples are designed in such a way that the ITK
Software Guide ( http://www.itk.org/ItkSoftwareGuide.pdf ) is generated
directly from the source code files - pretty cool hey?! If you open this
document (see above link) you will see the result in the Index section
at the end of the document.
Now, to edit the example code in
Examples/Segmentation/FastMarchingImageFilter.cxx to add multiple seeds
you need only insert more elements to the NodeContainer:
typedef FastMarchingFilterType::NodeContainer NodeContainer;
typedef FastMarchingFilterType::NodeType NodeType;
NodeContainer::Pointer seeds = NodeContainer::New();
InternalImageType::IndexType seedPosition1;
seedPosition1[0] = 25; // You can read this from the command line if you
want
seedPosition1[1] = 25; // You can read this from the command line if you
want
InternalImageType::IndexType seedPosition2;
seedPosition2[0] = 50; // You can read this from the command line if you
want
seedPosition2[1] = 50; // You can read this from the command line if you
want
const double seedValue = 0.0;
NodeType node1;
node1.SetValue( seedValue );
node1.SetIndex( seedPosition1 );
NodeType node2;
node2.SetValue( seedValue );
node2.SetIndex( seedPosition2 );
seeds->Initialize();
seeds->InsertElement( 0, node1 ); // Adds the first seed position
seeds->InsertElement( 1, node2 ); // Adds the second seed position
// You can add as many seeds as you want
Hope this helps!
Cheers, Dan
toluwalase lasaki wrote:
> Hello all,
>
> I'm trying to find out how I can edit the fastmarchingimagefilter code
> to allow for additional seed points. I attempted to do it by
> introducting additional arguments and modifying the part of the code
> that defines the nodes but I was unsuccessful.
> Can someone please assist me with this? Your help will be much
> appreciated.
>
> Thank you,
> OTL
>
> \index{itk::FastMarchingImageFilter!Multiple seeds}
> Also, what exactly does this mean? I'm guessing it's pointing me to
> some information in deoxygen but I can't seem to find this
> information. Any ideas?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070717/0d0190bd/attachment-0001.html
More information about the Insight-users
mailing list