[Insight-users] repeated dilation
Karthik Krishnan
Karthik.Krishnan at kitware.com
Mon Aug 8 17:16:06 EDT 2005
To do this, you need to disconnect the DataObject from the pipeline
before reusing it as input.
For instance:
dilater->SetInput( image );
image = dilater->GetOutput();
dilater->Update();
// Do whatever you want to do with the image
for( int i = 0; i < NumberOfRecursiveDilations-1; i++ )
{
image->DisconnectPipeline();
dilater->SetInput( image );
image = dilater->GetOutput();
dilater->Update();
// Do whatever you want to do with the image
}
Atwood, Robert C wrote:
> Dear ITK users/developers:
>
> Can anyone explain how to repeatedly dilate a binary image a fixed
> number of times?
>
> If I set
> BinImageType::Pointer bim=BinImageType::New();
> Dilate::Pointer dilater = Dilate::New();
> ...
>
>
> bim = dilater->GetOuptut();
> dilater->SetInput(bim);
> writer->SetInput(bim);
> for (i=0;i<5;i++){
> writer->Update();
> }
>
> that doesn't work , at least I get a blank image (I didn't think it
> would...) However I can't see how to get the output of a filter into
> its own input?
>
>
>
>
>
>
>
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>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