[Insight-users] Neighborhood max value

Neal R. Harvey harve at lanl.gov
Tue Mar 1 13:23:14 EST 2011


I'm thinking you may not want or need to go to the bother of writing
such a function. A neighbohood maximum operator is a dilation with a flat
structuring element and there already exists an operator within ITK to do
dilation. You would just need to define your structuring element appropriately
for the neighborhood in which you are interested. I can't see any existing code
that would create a square (cube for n-D) structuring element, though (there 
is code for balls and crosses), but it might not be that hard to 
create "cube" structuring element code by making some simple modifications
to the ball structuring element code. Then, all you'd need to do was use this
to create your structuring element (i.e. define the neighborhood of interest)
and then use the dilation function that already exists.

>Message: 3
>Date: Tue, 1 Mar 2011 16:38:26 +0200
>From: john smith <mkitkinsightuser at gmail.com>
>Subject: Re: [Insight-users] (no subject)
>To: David Doria <daviddoria at gmail.com>, insight-users at itk.org
>Message-ID:
>	<AANLkTimX-o4UkLVeWfitbL1b2sLo3h-TE7Okds3sxe9v at mail.gmail.com>
>Content-Type: text/plain; charset="iso-8859-1"
>
>Hello,
>
>Well, I have made all the changes and my program gives me (I think) correct
>results. But I have some questions to continue my project. As a following
>step, I want to write all my max values from every neighborhood iterator in
>a single pixel of an output image. How can organize my max values as an
>object (maybe by creating a new region iterator?), to put it through a new
>writer filter, in order to take my output image? Also, supposing that I have
>taken my output image, then this project which will be consisted of an .cxx
>and  .txt file format (for visual studio and cmake), could be considered as
>a new developed Filter?

-- 
HARVE (Neal R. Harvey)           Email: harve at lanl.gov
ISR-2                            Phone: 505 667 9077
Los Alamos National Laboratory   Fax: 505 664 0362
Los Alamos, NM 87545, USA        Mail Stop: D-436
The generation of random numbers is too important to be left to chance.



More information about the Insight-users mailing list