[Insight-users] bug in Morphology with parabolic structuring elements?

Oleksandr Dzyubak adzyubak at gmail.com
Fri Sep 17 11:22:45 EDT 2010



Hi Richard,

I just made a quick test based on a properties of the scalable structuring 
functions: Opening(x, 0) = Closing(x,0) = OriginalImage(x).

The results are below.

Closing(x, 0) = OriginalImage(x)
Closing(x, 1.0) = Blank
Closing(x, 0.1) = Blank
Closing(x, 0.01) = Blank
Closing(x, 0.001) = Blank
Closing(x, 0.0001) = Blank

As to me, looks like a bug.

Regards,

Alex


Richard Beare wrote:
> 
> Hi,
> 
> The bright edge was definitely a bug - I forgot to change the way the
> "SafeBorder" was implemented for a closing. I think that is fixed now.
> Note that if your image already has a natural boundary then you can
> turn this off with the SetSafeBorder
> 
> The streaks that you're seeing that aren't related to the border are
> correct, I think. That sort of thing happens if the image structure
> matches the scale of the structuring element.
> 
> The blank image problem is less obvious, but I can think of a couple
> of things to check.
> 
> Does the input image have voxel spacing information? If so, does the
> scale of the structuring element seem appropriate. If the scale was
> very large then the bug with the edge safety would lead to an image
> with every voxel set to the maximum.
> 
> Anyway, the changes are committed, so we can test it out.
> 
> PS dilateBinary had been moved to dilateBinary3D
> 
> On Fri, Sep 17, 2010 at 1:48 AM, Oleksandr Dzyubak <adzyubak at gmail.com>
> wrote:
>>
>> Hi Richard,
>>
>> Many thanks for you prompt response.
>> I successfully downloaded the latest version from the link you provided.
>> I see that you greatly updated your package. Now you have 47 files vs 31
>> in
>> the submission!
>> In your Cmake file there was a typo giving me the error below.
>>
>>  CMake Error in CMakeLists.txt:
>>   Cannot find source file "dilateBinary.cxx".  Tried extensions .c .C
>> .c++
>>   .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx
>>
>> So to get rolling, I just commented out the "dilateBinary.cxx" file from
>> my
>> building list.
>>
>> Yes, you are right. Now testClose works but in a way I did not expect it
>> to
>> (see uploaded result).
>>
>> Closed cthead1 Image.
>> http://old.nabble.com/file/p29729933/close_cthead1_x1_y05.png
>> close_cthead1_x1_y05.png
>>
>> I observe couple "artifacts" there (which do not appear in testOpen! ):
>> "White Border" and "Severe Streaks".
>>
>> However real Mystery starts later when I try to apply your Open-Close
>> algorithms to my images.
>> To demonstrate the problem, I also uploaded the input, opened, and closed
>> images.
>>
>> Input Image.
>> http://old.nabble.com/file/p29729933/SheppLogan_Proj_720.jpg
>> SheppLogan_Proj_720.jpg
>>
>> Opened Image.
>> http://old.nabble.com/file/p29729933/open_SheppLogan_Proj_720.jpg
>> open_SheppLogan_Proj_720.jpg
>>
>> Closed Image.
>> http://old.nabble.com/file/p29729933/close_SheppLogan_Proj_720.jpg
>> close_SheppLogan_Proj_720.jpg
>>
>> As you can see, testOpen still works but testClose does not.
>> Is that what you also observe in your tests or it is just me?
>>
>> Regards,
>>
>> Alex
>>
>>
>> Richard Beare wrote:
>>>
>>> Hi,
>>> There have been a few updates that aren't in the IJ version. You can
>>> get the latest version using
>>>
>>> darcs get
>>> http://voxel.jouy.inra.fr/darcs/contrib-itk/parabolicMorphology
>>>
>>> The biggest changes are classes for fast circular and spherical
>>> erosions and dilations on binary images.
>>>
>>>
>>> I've added testClose, in the way that you described, and it seems to
>>> run sensibly on the cthead test image. It is possible that there is a
>>> bug in the IJ version that I've fixed since.
>>>
>>>
>>> On Thu, Sep 16, 2010 at 6:06 AM, Oleksandr Dzyubak <adzyubak at gmail.com>
>>> wrote:
>>>>
>>>> Dear ITK users,
>>>>
>>>> Recently I tried classes "Morphology with parabolic structuring
>>>> elements"
>>>> by
>>>> Richard Beare.
>>>> Since it is not available in the ITK lib yet,
>>>> I downloaded the submission version from the link below.
>>>>
>>>> http://www.insight-journal.org/browse/publication/228
>>>>
>>>> BTW, on the submission page there is a recommendation which basically
>>>> does
>>>> not work.
>>>> *************
>>>> Please use this identifier to cite or link to this publication:
>>>> http://hdl.handle.net/1926/1370
>>>> *******
>>>> If I click on the provided link,
>>>> it gives (me at least) the error message "You cannot access this item!"
>>>>
>>>> In submission everything compiles well and provided examples work.
>>>> I am, in particular, interested in "Open-Close" morphological
>>>> operations.
>>>> Richard provided an example testOpen.cxx which works
>>>> and produces reasonable results.
>>>> Thus, I took it as basis to build testClose.cxx.
>>>>
>>>> To make my life easier, I included
>>>> #include "itkParabolicCloseImageFilter.h"
>>>>
>>>> and substituted
>>>> typedef itk::ParabolicOpenImageFilter< IType,IType > FilterType;
>>>> with
>>>>  typedef itk::ParabolicCloseImageFilter< IType,IType > FilterType;
>>>>
>>>> After those manipulations, I was able to succesfully compile my code
>>>> testClose.cxx.
>>>> However, as opposed to testOpen.cxx code,
>>>> in the output image all the pixels have the same value 3.4E38.
>>>>
>>>> Is this a bug or I am doing something terribly wrong?
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Alex
>>>>
>>>> _____________________________________
>>>> Powered by www.kitware.com
>>>>
>>>> Visit other Kitware open-source projects at
>>>> http://www.kitware.com/opensource/opensource.html
>>>>
>>>> Kitware offers ITK Training Courses, for more information visit:
>>>> http://www.kitware.com/products/protraining.html
>>>>
>>>> Please keep messages on-topic and check the ITK FAQ at:
>>>> http://www.itk.org/Wiki/ITK_FAQ
>>>>
>>>> Follow this link to subscribe/unsubscribe:
>>>> http://www.itk.org/mailman/listinfo/insight-users
>>>>
>>> _____________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Kitware offers ITK Training Courses, for more information visit:
>>> http://www.kitware.com/products/protraining.html
>>>
>>> Please keep messages on-topic and check the ITK FAQ at:
>>> http://www.itk.org/Wiki/ITK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.itk.org/mailman/listinfo/insight-users
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/bug-in-Morphology-with-parabolic-structuring-elements--tp29722504p29729933.html
>> Sent from the ITK - Users mailing list archive at Nabble.com.
>>
>> _____________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Kitware offers ITK Training Courses, for more information visit:
>> http://www.kitware.com/products/protraining.html
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-users
>>
> _____________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
> 
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
> 
> 

-- 
View this message in context: http://old.nabble.com/bug-in-Morphology-with-parabolic-structuring-elements--tp29722504p29739627.html
Sent from the ITK - Users mailing list archive at Nabble.com.



More information about the Insight-users mailing list