[Insight-users] Trouble with getting the output ofFastMarchingImageFilter

Luis Ibanez luis.ibanez at kitware.com
Mon Dec 12 12:36:38 EST 2005


Hi Gafly,

You can prevent the external values of the time-crossing
map from being set to infinite by setting the StoppingValue
of the FastMarching algorithm with the following method
invocation:


   fastMarching->SetStoppingValue( 200 );

Please see the manual page of this filter at:
http://www.itk.org/Insight/Doxygen/html/classitk_1_1FastMarchingImageFilter.html#a6


An easy way to estimate the Stopping Value is by using the
largest diameter of the object that you anticipate to segment,
and dividing this diameter by the maximum value of your speed
image. That will give you the anticipated time needed for the
level set to reach the borders of the object.


You will see examples on the use of this method
in the ITK Software Guide:


   http://www.itk.org/ItkSoftwareGuide.pdf




  Regards,



     Luis



-------------
ÇØ°² wrote:
> hi,Iván Macía:
>         at last i found  the output time crossing map from fastmarchingfliter is infinite at places the growing never reach.  Your code and my code both work well. when i debug the code yesterday, i found the first hundreds of pixel to be infinite, and i thought no data was outputted. sorry for my confusion and thank Iván Macía for you kindly help. Regards! 
>      
> 
> ======= 2005-12-05 22:39:14 =======
> 
> 
>>Hi,
>>
>>Possibly the problem is that you are creating a new image when you don't
>>need to and possibly the regions are not correctly set. Try if this works :
>>
>>ConstIteratorType constIterator3( fastMarching->GetOutput(),
>>fastMarching->GetOutput()->GetRequestedRegion() );
>>
>>float timedata[imageWidth*imageHeight];
>>InternalImageType::PixelType pixel;
>>int i;
>>for(constIterator3.GoToBegin(),i=0;!constIterator3.IsAtEnd();
>>++constIterator3,i++)
>>{
>> pixel = constIterator3.Get();
>> timedata[i] = (float)pixel; 
>>}
>>
>>
>>Another approach for copying the output using itk images is the following :
>>
>>InternalImageType::Pointer image = ImageType::New();      
>>
>>image->SetRegions( fastMarching->GetOutput()->GetRequestedRegion());
>>image->Allocate();
>>
>>ConstIteratorType inputIt( reader->GetOutput(),
>>fastMarching->GetOutput()->GetRequestedRegion() );
>>IteratorType     outputIt( image ,
>>fastMarching->GetOutput()->GetRequestedRegion() );
>>
>>for ( inputIt.GoToBegin(), outputIt.GoToBegin(); !inputIt.IsAtEnd();
>>++inputIt, ++outputIt )
>>{
>> outputIt.Set( inputIt.Get() );
>>}
>>
>>
>>Hope that helps
>>
>>Iván
>>
>>
>>-----Mensaje original-----
>>De: insight-users-bounces+imacia=vicomtech.es at itk.org
>>[mailto:insight-users-bounces+imacia=vicomtech.es at itk.org] En nombre de ÇØ°²
>>Enviado el: lunes, 05 de diciembre de 2005 8:48
>>Para: ibanez luis
>>CC: insight-users
>>Asunto: [Insight-users] Trouble with getting the output
>>ofFastMarchingImageFilter
>>
>>
>>hi,luis and  itk users:
>>
>>   when working with the FastMarchingImageFilter, i try to get the output
>>time crossing image. i write the simple codes as below "
>>   InternalImageType::Pointer internalImage3 = InternalImageType::New();
>>	internalImage3 = fastMarching->GetOutput();
>>	ConstIteratorType
>>constIterator3(internalImage3,internalImage3->GetRequestedRegion());
>>
>>	float timedata[imageWidth*imageHeight];
>>   InternalImageType::PixelType pixel;
>>   int i;
>>	for(constIterator3.GoToBegin(),i=0;!constIterator3.IsAtEnd();
>>++constIterator3,i++)
>>	{
>>		pixel = constIterator3.Get();
>>		timedata[i] = (float)pixel; 
>>	}
>>"
>>    The whole image processing pipeline has been update successfully
>>before, and the output binary images suggest the filters work well. but when
>>come to these codes, the pixel variable simply get noting.  
>>    Any help will be appreciated.     Thank you for your help and best
>>regards!
>>
>>
>>
>>
>>
>>	
>>
>>
>>-- 
>>No virus found in this incoming message.
>>Checked by AVG Free Edition.
>>Version: 7.1.362 / Virus Database: 267.13.10/190 - Release Date: 01/12/2005
>>
>>   
>>
>>-- 
>>No virus found in this outgoing message.
>>Checked by AVG Free Edition.
>>Version: 7.1.362 / Virus Database: 267.13.10/190 - Release Date: 01/12/2005
>>
> 
> 
> = = = = = = = = = = = = = = = = = = = =
> 			
> ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡qafly at fimmu.com
> ¡¡¡¡¡¡¡¡¡¡¡¡¡¡
> 
> 
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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