[Insight-users] Using arbitrary interface as initalization for fast-marching filter
Dan Mueller
dan.muel at gmail.com
Tue Jan 13 07:53:25 EST 2009
Hi Amar,
ITK can indeed handle this situation. You should take the entire
binary image as the initial front (otherwise the front will expand
into the binary image as well as away). Here is a patch to
itkFastMarchingImageFilter which I use to set the trial points from an
image:
template <class TLevelSet, class TSpeedImage>
void
FastMarchingImageFilter<TLevelSet,TSpeedImage>
::SetTrialPointsFromImage( LabelImagePointer image )
{
// Setup
typedef ImageRegionConstIteratorWithIndex< LabelImageType > IteratorType;
NodeContainer::Pointer nodes = NodeContainer::New();
nodes->Initialize();
IteratorType it( image, image->GetLargestPossibleRegion() );
// Walk image
unsigned int count = 0;
for (it.GoToBegin(); !it.IsAtEnd(); ++it)
{
if (it.Get() > NumericTraits< LabelPixelType >::Zero)
{
NodeType node;
node.SetIndex( it.GetIndex() );
nodes->InsertElement( count++, node );
}
}
// Set nodes
this->SetTrialPoints( nodes );
this->Modified();
}
Hope this helps.
Regards, Dan
2009/1/13 Amar Singh <amar.singh at gmx.de>:
> Hello,
>
> I am quite new to level-sets and I have a question concerning the fast-marching filter. The fast-marching method moves an interface in the normal direction.
> I understand that I can set an arbitrary speed image ( F(x)in the Eikonal equation). But are there other methods than specifying the initial interface through seeds? I would like to propagate the border of a binary image. Shall I take all the points of the border as seeds to do that or is it not really possible to do it in ITK?
>
> Any help is highly appreciated.
>
> Thank you very much.
>
> Regards
> Amardeep
>
>
> --
> Sensationsangebot verlängert: GMX FreeDSL - Telefonanschluss + DSL
> für nur 16,37 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K1308T4569a
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
More information about the Insight-users
mailing list