[Insight-users] Trouble with getting the output
ofFastMarchingImageFilter
秦安
qafly at fimmu.com
Tue Dec 6 02:01:18 EST 2005
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
¡¡¡¡¡¡¡¡¡¡¡¡¡¡
-------------- next part --------------
A non-text attachment was scrubbed...
Name: face-6.gif
Type: image/gif
Size: 1225 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/insight-users/attachments/20051206/84c03e11/face-6.gif
More information about the Insight-users
mailing list