[Insight-users] Re: Level set: Time vs. Iteration

Amadeus W. M. amadeus84 at cablespeed.com
Fri Aug 5 15:01:41 EDT 2005


On Tue, 02 Aug 2005 23:10:17 -0700, Sah Rayman wrote:

> My question is, is there a way to specify the time, T,
> instead of number of iterations, for my
> SegmentationLevelSetImageFilter?
> 
> Here is my understanding of how L.S. in ITK works: 
> 1. for each iteration, it calculates deltaT according
> to CFL. ( BTW, is it 0.25 for 2D and 0.125 for 3D?)
> 2. phi_new = phi_old + deltaT * deltaPhi;
> ...

I looked at the code in itkLevelSetFunction.txx and it seems right, itk
computes deltaT at each iteration. 

> I can easily specify the number of iterations by:
> SegmentationLevelSetImageFilter::SetNumberOfIterations().
> 
> However, in my case, the time parameter makes more
> sense, e.g. I know the zero level set goes about 4
> pixels after 4 time units if the propogation is 1
> everywhere.
> 
> So is it possible that I tell ITK to go 1.5 time unit,
> and then ITK automatically run 1.5/0.25=6 iterations?
> 
> Or, if the above is unavailable, is there a way I can
> know how many time has elapsed ( \sum deltaT) after N
> iterations?

That's what I'd do too, but you'd have to introduce a new variable, e.g.
float TotalTime, which you set to 0 at the beginning of the segmentation
and do TotalTime += deltaT after each iteration. Stop when
TotalTime<MaxTime. Yes, you'd have to modify the source code for that.
You can define a new Halt function, say TimeHalt(), based on the time
criterion, and have the user select one or the other at run time.




More information about the Insight-users mailing list