[Insight-users] region growing from local maxima

Ara.T.Howard Ara.T.Howard at noaa.gov
Wed Oct 5 09:33:50 EDT 2005


On Wed, 5 Oct 2005, Gaetan Lehmann wrote:

>>    - local extrema, maxes in particular
>
> local maxima is quite easy to compute for integer types.

for you maybe ;-)

> According to Soille's book, regional maxima is:
>
> RMax(f) = f - ReconstructionByDilation(f, f-1)
>
> This should be something like that with itk (itype is your image type):
>
> typedef itk::ReconstructionByDilationImageFilter< itype, itype > ReconsType;
> typedef itk::ShiftScaleImageFilter< itype, itype > ShiftType;
> typedef itk::SubtractImageFilter< itype, itype, itype > SubtractType;
>
> ShiftType::Pointer shift = ShiftType::New();
> shift->SetInput( previousFilter->GetOutput() );
> shift->SetShift( -1 );
>
> ReconsType::Pointer recons = ReconsType::New();
> recons->SetMaskImage( previousFilter->GetOutput() );
> recons->SetMarkerImage( shift->GetOutput() );
> // you can choose connectivity. Default is 4-connected (in 2D)
> // fully connected = 8-connected in 2D
> recons->SetFullyConnected( true );
>
> SubtractType::Pointer subtract = SubtractType::New();
> subtract->SetInput1( previousFilter->GetOutput() );
> subtract->SetInput2( recons->GetOutput() );
>
> // substract->GetOutput() is a binary image where background have value 0 and 
> local maxima have value = 1
> ...

o.k. - i'll give that a whirl then.  i need to get the python modules compiled
to do this playing around - the edit/compile/run cycle is killing me now!  ;-)

regards.

-a
-- 
===============================================================================
| email :: ara [dot] t [dot] howard [at] noaa [dot] gov
| phone :: 303.497.6469
| Your life dwells amoung the causes of death
| Like a lamp standing in a strong breeze.  --Nagarjuna
===============================================================================



More information about the Insight-users mailing list