[Insight-users] Example on morphological image enhancement

Lino Ramirez ramirez at ece.ualberta.ca
Fri Dec 31 14:24:21 EST 2004


Hi Luis,

Following your recommendation about using functors (to avoid the need of
an internal image) in the morphological image enhancement example that I
submitted to ITK, I made some changes. I created a couple of functors
(itkConstrainedValueDifferenceImageFilter.h and
itkConstrainedValueAdditionImageFilter.h). I called them constrained
because their output minimum and maximum are in the range of the minimum
and maximum of the input image 1. I re-wrote the image enhancement example
using these functors and the filters that I submitted yesterday. All the
files can be found in the webpage

http://www.ece.ualberta.ca/~ramirez/itk/MorphologicalFiltering/

I don’t know if the functors would be of interest to the ITK users. If you
think they are, you can include them in the toolkit.

Happy New Year!

Lino

> Hi Luis,
>
> Here are the grayscale opening and closing filters. I also added tests for
> the new filters in the files itkMathematicalMorphologyImageFilterTest.cxx
> and itkBasicFiltersPrintTest.cxx. Please note that I am not using the CVS
> version of ITK (I am using ITK 1.8). Therefore, the file
> itkBasicFiltersPrintTest.cxx does not contain some of the tests that were
> added recently. So, you may have to copy the lines I added (they are
> identified in the file) and paste them in the CVS version of
> itkBasicFiltersPrintTest.cxx.
>
> Please let me know if you have any question.
>
> Happy New Year!
>
> Lino
>
>>
>> Hi Lino,
>>
>> This is great !
>>
>> Thanks for contributing this example to ITK.
>>
>> It has been committed into the directory
>>
>>      Insight/Examples/Filtering/
>>         MorphologicalImageEnhancement.cxx
>>
>>
>> The section between lines 170-200 can  be converted by
>> creating a Functor filter. In that way there is no need
>> to create the internal image.
>>
>> It will be great to include in the repository the Opening
>> and Closing filters that you implemented. Please send them
>> and we will commit them to the repository. You may want to
>> add your information in the "\author" Doxygen tag of the
>> respective classes.
>>
>>
>>
>> Regards,
>>
>>
>>     Luis
>>
>>
>> -------------------
>> Lino Ramirez wrote:
>>
>>> Hello All,
>>>
>>> I wrote a small example on morphological image enhancement following an
>>> example I found in the Image Processing toolbox of MATLAB. You can find
>>> the example at
>>>
>>> http://www.ece.ualberta.ca/~ramirez/itk/ImageEnhancement/
>>>
>>> The executable and some example outputs using structuring elements of
>>> different sizes can be found at
>>>
>>> http://www.ece.ualberta.ca/~ramirez/itk/ImageEnhancement-bin/
>>>
>>> The usage is
>>> MorphologicalImageENhancement.exe inputImageFile outputImageFile radius
>>>
>>> where "radius" is the radius of an itkBinaryBallStructuringElement
>>>
>>> If you think it could be useful for other ITK users, I would like to
>>> contribute it to ITK. Moreover, in writing the code, I had to implement
>>> a
>>> Gray Scale Opening (erosion followed by a dilation) and Closing
>>> (dilation
>>> followed by an erosion) (Note: they are no the geodesic ones that are
>>> already implemented in ITK) and a Top Hat (original image – opening)
>>> and
>>> Bottom Hat (closing – original image) operations. If you think these
>>> operations should be in ITK, I could try to implement them as filters.
>>>
>>> Any feedback about the example will be really appreciated
>>>
>>> Have a nice day
>>>
>>> Lino
>>>
>>> P.S. I also have available the example using the geodesic morphological
>>> filters available in ITK
>>>
>>> _______________________________________________
>>> 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