[Insight-users] Can BinaryDilateImageFilter be used for 3D images?
Luis Ibanez
luis.ibanez at kitware.com
Mon Jan 15 16:52:42 EST 2007
Hi Shahab,
Please read the ITK Software Guide
http://www.itk.org/ItkSoftwareGuide.pdf
In particular section 6.6.6 "Mathematical Morphology"
in pdf-page 203-209.
If you change the Dimension of this example from 2 to 3,
then the line:
StructuringElementType structuringElement;
structuringElement.SetRadius( 1 ); // 3x3 structuring element
at the bottom of pdf-page 205 will now initialize
an Structuring element of size: 3 x 3 x 3.
Note that, as Gaetan pointed out, the filter itself does
not provide any structuring element by default. It is up
to you to properly initialize one structuring element.
The source code of the corresponding example can be
found in
Insight/Examples/Filtering/
MathematicalMorphologyBinaryFilters.cxx
This filter is N-Dimensional, so you can instantiate it
for any dimension: 2D, 3D, 4D,....
Regards,
Luis
------------------------
Gaëtan Lehmann wrote:
> Le Fri, 12 Jan 2007 08:54:48 +0100, Gaëtan Lehmann
> <gaetan.lehmann at jouy.inra.fr> a écrit:
>
>>
>> Hi,
>>
>> Le Fri, 12 Jan 2007 07:07:21 +0100, Shahabuddin Ansari
>> <ansari_shahab at yahoo.com> a écrit:
>>
>>> Hello,
>>> Can we use BinaryDilateImageFilter for 3D images?
>>
>>
>> yes, and even with any other dimension
>>
>>> If yes, then would it initialize structuringElement.SetRadius( 1 ) to
>>> a 3x3x3 matrix?
>>
>>
>> exactly :-)
>>
>
> hum, that's wrong
>
> the filter initialize the structuring element with a size of 0 for all
> the dimensions. It mean that the matrix size is 1x1x1.
> And the content of the structuring element is not initialized - that's
> up to you to do that - There is a CreateStructuringElement() method in
> the BinaryBallStructuringElement class to do that.
>
> Gaetan
>
>
>
>
More information about the Insight-users
mailing list