[Insight-users] Dilation several times

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Tue Oct 31 16:41:57 EST 2006


Hi Barbara,

You should try something like

   ImageType::Pointer img = previousFilter->GetOutput();
   for( int i=0; i<3; i++ )
     {
     dilate->SetInput( img );
     dilate->Update();
     img = dilate->GetOutput();
     img->DisconnectPipeline();
     }

Note that Richard Beare and I have also contributed some more efficient  
dilation/erosion/opening/closing filters to the insight journal. They  
should be more performant, and still let you use the pipeline architecture  
of ITK - that's not the case here.
http://insight-journal.org/InsightJournalManager/view_reviews.php?back=publications.php%3Fjournalid%3D6%26order%3Drating%26revision_display%3Dcombined&pubid=124

Regards,

Gaetan

Le Tue, 31 Oct 2006 21:52:57 +0100, bkrausz <bkrausz at web.de> a écrit:

>
> Hi,
>
> how can I apply a morph-operator like dilation several times? I tried
> for(int i=0;i<3;i++){
> 		dilate->SetInput(dilate->GetOutput());
> }
>
> but I got the following error: JPEGImageIO(0x84fe5c8): JPEG Writer can  
> only
> write 2-dimensional images
>
>
> Barbara



-- 
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr


More information about the Insight-users mailing list