[Insight-users] Fast binary morphology dilation

Gaetan Lehmann gaetan.lehmann at jouy.inra.fr
Wed Jun 1 05:55:39 EDT 2005


Hi James,

I can't use FastIncrementalBinaryDilateImageFilter. I get the following  
error :

In file included from  
/usr/include/InsightToolkit/BasicFilters/itkFastIncrementalBinaryDilateImageFilter.h:258,
                  from /home/glehmann/tmp/itk-test/myProject.cxx:6:
/usr/include/InsightToolkit/BasicFilters/itkFastIncrementalBinaryDilateImageFilter.txx:49:  
error: declaration of `void  
itk::FastIncrementalBinaryDilateImageFilter<TInputImage, TOutputImage,  
TKernel>::GenerateInputRequestedRegion() throw  
(itk::InvalidRequestedRegionError)' throws different exceptions
/usr/include/InsightToolkit/BasicFilters/itkFastIncrementalBinaryDilateImageFilter.h:209:  
error: than previous declaration `void  
itk::FastIncrementalBinaryDilateImageFilter<TInputImage, TOutputImage,  
TKernel>::GenerateInputRequestedRegion()'
/usr/include/InsightToolkit/BasicFilters/itkFastIncrementalBinaryDilateImageFilter.txx:  
In member function `void  
itk::FastIncrementalBinaryDilateImageFilter<TInputImage, TOutputImage,  
TKernel>::AnalyzeKernel()':
/usr/include/InsightToolkit/BasicFilters/itkFastIncrementalBinaryDilateImageFilter.txx:143:  
error: expected `;' before "px"
/usr/include/InsightToolkit/BasicFilters/itkFastIncrementalBinaryDilateImageFilter.txx:145:  
error: `px' undeclared (first use this function)
/usr/include/InsightToolkit/BasicFilters/itkFastIncrementalBinaryDilateImageFilter.txx:145:  
error: (Each undeclared identifier is reported only once for each function  
it appears in.)
/usr/include/InsightToolkit/BasicFilters/itkFastIncrementalBinaryDilateImageFilter.txx:183:  
error: expected `;' before "tmpSEImage"
/usr/include/InsightToolkit/BasicFilters/itkFastIncrementalBinaryDilateImageFilter.txx:184:  
error: `tmpSEImage' undeclared (first use this function)
/usr/include/InsightToolkit/BasicFilters/itkFastIncrementalBinaryDilateImageFilter.txx:292:  
error: to refer to a type member of a template parameter, use `typename  
TInputImage::PixelType'
/usr/include/InsightToolkit/BasicFilters/itkFastIncrementalBinaryDilateImageFilter.txx:  
In member function `void  
itk::FastIncrementalBinaryDilateImageFilter<TInputImage, TOutputImage,  
TKernel>::GenerateData()':
/usr/include/InsightToolkit/BasicFilters/itkFastIncrementalBinaryDilateImageFilter.txx:417:  
error: expected `;' before "tmpImage"
/usr/include/InsightToolkit/BasicFilters/itkFastIncrementalBinaryDilateImageFilter.txx:420:  
error: expected `;' before "outputRequestedRegion"
/usr/include/InsightToolkit/BasicFilters/itkFastIncrementalBinaryDilateImageFilter.txx:422:  
error: expected `;' before "tmpRequestedRegion"
/usr/include/InsightToolkit/BasicFilters/itkFastIncrementalBinaryDilateImageFilter.txx:429:  
error: `tmpRequestedRegion' undeclared (first use this function)
/usr/include/InsightToolkit/BasicFilters/itkFastIncrementalBinaryDilateImageFilter.txx:433:  
error: `tmpImage' undeclared (first use this function)
/usr/include/InsightToolkit/BasicFilters/itkFastIncrementalBinaryDilateImageFilter.txx:455:  
error: `outputRequestedRegion' undeclared (first use this function)
/usr/include/InsightToolkit/BasicFilters/itkFastIncrementalBinaryDilateImageFilter.txx:745:  
error: expected `;' before "it"
/usr/include/InsightToolkit/BasicFilters/itkFastIncrementalBinaryDilateImageFilter.txx:746:  
error: `it' undeclared (first use this function)
/usr/include/InsightToolkit/BasicFilters/itkFastIncrementalBinaryDilateImageFilter.txx:780:  
error: expected `;' before "vecIt"
/usr/include/InsightToolkit/BasicFilters/itkFastIncrementalBinaryDilateImageFilter.txx:801:  
error: `vecIt' undeclared (first use this function)
/usr/include/InsightToolkit/BasicFilters/itkFastIncrementalBinaryDilateImageFilter.txx:  
In member function `void  
itk::FastIncrementalBinaryDilateImageFilter<TInputImage, TOutputImage,  
TKernel>::AnalyzeKernel() [with TInputImage = main(int, char**)::IType,  
TOutputImage = main(int, char**)::IType, TKernel = main(int,  
char**)::StructEltType]':
/usr/include/InsightToolkit/BasicFilters/itkFastIncrementalBinaryDilateImageFilter.txx:115:    
instantiated from `void  
itk::FastIncrementalBinaryDilateImageFilter<TInputImage, TOutputImage,  
TKernel>::SetKernel(const TKernel&) [with TInputImage = main(int,  
char**)::IType, TOutputImage = main(int, char**)::IType, TKernel =  
main(int, char**)::StructEltType]'
/home/glehmann/tmp/itk-test/myProject.cxx:42:   instantiated from here
/usr/include/InsightToolkit/BasicFilters/itkFastIncrementalBinaryDilateImageFilter.txx:143:  
error: dependent-name `TKernel::PixelType' is parsed as a non-type, but  
instantiation yields a type
/usr/include/InsightToolkit/BasicFilters/itkFastIncrementalBinaryDilateImageFilter.txx:143:  
note: say `typename TKernel::PixelType' if a type is meant
/usr/include/InsightToolkit/BasicFilters/itkFastIncrementalBinaryDilateImageFilter.txx:115:    
instantiated from `void  
itk::FastIncrementalBinaryDilateImageFilter<TInputImage, TOutputImage,  
TKernel>::SetKernel(const TKernel&) [with TInputImage = main(int,  
char**)::IType, TOutputImage = main(int, char**)::IType, TKernel =  
main(int, char**)::StructEltType]'
/home/glehmann/tmp/itk-test/myProject.cxx:42:   instantiated from here
/usr/include/InsightToolkit/BasicFilters/itkFastIncrementalBinaryDilateImageFilter.txx:183:  
error: dependent-name  
`itk::FastIncrementalBinaryDilateImageFilter<TInputImage, TOutputImage,  
TKernel>::AnalyzeKernel()::BoolImageType::Pointer' is parsed as a  
non-type, but instantiation yields a type
/usr/include/InsightToolkit/BasicFilters/itkFastIncrementalBinaryDilateImageFilter.txx:183:  
note: say `typename  
itk::FastIncrementalBinaryDilateImageFilter<TInputImage, TOutputImage,  
TKernel>::AnalyzeKernel()::BoolImageType::Pointer' if a type is meant
make[1]: *** [myProject.o] Erreur 1
make: *** [default_target] Erreur 2

The same code with BinaryDilateImageFilter instead of  
FastIncrementalBinaryDilateImageFilter compiles without problem on the  
same system (linux, gcc 3.4.1, cmake 2.0.5).
Also, I can't find test for this filter in fresh cvs check out.
Can you help me to solve this problem ?

Regards

Gaetan.




On Mon, 04 Apr 2005 16:42:40 +0200, Miller, James V (Research)  
<millerjv at crd.ge.com> wrote:

> I just found my test that I was using (a hacked version of
> MathematicalMorphologyBinaryFilters.cxx). This test passes if
> I replace the BinaryDilateImageFilter with a  
> FastIncrementalBinaryDilateImageFilter.
>
> It also didn't crash when I set it up to run on a subregion
> (using the streaming mechanism) and produce the correct subregion
> result.
>
> I checked in the versions of the FastIncrementalBinaryDilateImageFilter
> that I have.  If Jerome sees this and has newer versions, we can supplant
> what I just checked in.
>
> The FastIncrementalBinaryDilateImageFilter is much faster than the
> BinaryDilateImageFilter and is more general than the ObjectMorphology
> filters.  However, the FastIncrementalBinaryDilateImageFilter does
> support multithreading.  But the speed increase is would justify that
> we supplant the BinaryDilateImageFilter with this filter.
>
> We should still contruct a version that will do erosion.
>
> Jim
>
>
>
> -----Original Message-----
> From: insight-users-bounces at itk.org
> [mailto:insight-users-bounces at itk.org]On Behalf Of Miller, James V
> (Research)
> Sent: Monday, April 04, 2005 10:15 AM
> To: Peter Cech; Luis Ibanez; Insight-users (E-mail);
> jerome.schmid at ircad.u-strasbg.fr
> Subject: RE: [Insight-users] Fast binary morphology dilation
>
>
> I still have this code.  My last modification is dated September 15th.
>
> I lost a mailbox a few weeks ago, so I lost some of the message thread
> I had with  Jerome Schmid who wrote the code.  I believe I had made some
> changes to Jerome's original code to support streaming.
>
> I think Jerome might have made another set of changes to this code
> but I am not sure whether the version I have right now is his latest
> version.
>
> I would be motivated to check this in today since I am about to get a
> new computer and I do not trust our computer deployment process will
> keep my copy around.  I think I lost the test/example that I was using
> to test this program.
>
> Jim
>
>
>
>
> -----Original Message-----
> From: insight-users-bounces at itk.org
> [mailto:insight-users-bounces at itk.org]On Behalf Of Peter Cech
> Sent: Sunday, April 03, 2005 2:05 PM
> To: Luis Ibanez
> Subject: Re: [Insight-users] Fast binary morphology dilation
>
>
> On Sun, Apr 03, 2005 at 11:12:02 -0400, Luis Ibanez wrote:
>> Could you please be more specific regarding the email
>> message that you are quoting ?
>>
>>
>> If you can provide at least the date of that email (adding
>> the author will be even better), that will help us to track
>> this issue. The mailing-list receives between 250 and 400
>> emails a month, this makes difficult to remember every single
>> issue, unless they are reported in the bug tracker. Thanks a
>> lot for your understanding in this matter.
>
> Sorry, I deleted too much. Here are the cited headers:
>
> -----Message d'origine-----
> De : Miller, James V (Research) [mailto:millerjv at crd.ge.com]
> Envoyé : mercredi 15 septembre 2004 22:52
> À : 'jerome schmid'
> Objet : RE: [Insight-users] Fast binary morphology dilation
>
>
> It was sent to list indirectly with this reply:
>
> http://public.kitware.com/pipermail/insight-users/2004-September/010447.html
>
>
> There was some early code in that thread, after addin some typename
> keywords, it compiled and is working. I'm working with rather big 3D
> data sets, so it takes 10-30 minutes with current
> BinaryDilateImageFilter (having several objects I cannot use
> DilateObjectMorphologyImageFilter). However with the fast dilate filter
> it took always under one minute. Quite impressive speedup. It would be
> pity if it got forgotten.
>
> Regards,
>
> Peter Cech
>
>
>> [...]
>
>
>> -------------------
>> Peter Cech wrote:
>>
>> >>I think I have a little clean up/testing to do and then I will check  
>> it
>> >>into
>> >>ITK.  I haven't quite decided whether to supplant the current filters  
>> or
>> >>not.
>> >
>> >
>> >Any update on this? The last version of BinaryDilateImageFilter in CVS
>> >is from April 2004 and I was unable to locate any new filter for binary
>> >dilation.
>> >
>> >Regards,
>> >Peter Cech
>> >_______________________________________________
>> >Insight-users mailing list
>> >Insight-users at itk.org
>> >http://www.itk.org/mailman/listinfo/insight-users
>> >
>> >
>>
>>
>>
>> _______________________________________________
>> Insight-users mailing list
>> Insight-users at itk.org
>> http://www.itk.org/mailman/listinfo/insight-users
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>



-- 
Gaetan Lehmann <gaetan.lehmann at jouy.inra.fr>
Tel: +33 1 34 65 29 66
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
Web: http://voxel.jouy.inra.fr


More information about the Insight-users mailing list