[Insight-developers] Compile error with UsePhysicalSpace in BinaryFunctorImageFilter

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Wed Jun 1 14:46:13 EDT 2011


Kent,

Thanks for pushing the change to gerrit. I've updated it with a small  
fix for DivideImageFilter. It builds now.

For the requested region, I think you should reimplement  
GenerateInputRequestedRegion() and request the largest possible region  
of the 2nd (and 3rd) inputs if UsePhysicalSpace is true and the  
origin, orientation and spacing are not matching the first input.

Regards,

Gaëtan




Le 1 juin 11 à 19:36, Gaëtan Lehmann a écrit :

>
> Le 1 juin 11 à 18:52, Williams, Norman K a écrit :
>
>> I have a fix for this, but I have larger problems with these  
>> filters, as
>> detailed in my last message to the ITK list.
>>
>>
>> The problem being, once I correct bugs in the test, the filters start
>> failing.  My changes to the filters, as written, will fail because  
>> of size
>> mismatches in the input images. This, unfortunately is one of the  
>> things
>> my changes were explicitly supposed to support!
>
> Please push your changes to gerrit so we can look at this last  
> problem.
>
> Gaëtan
>
>
>
>>
>> On 5/31/11 3:25 PM, "Gaëtan Lehmann" <gaetan.lehmann at jouy.inra.fr>  
>> wrote:
>>
>>>
>>> Hi Kent,
>>>
>>> I get a compilation error in WrapITK with your recent changes in
>>> BinaryFunctorImageFilter and complex pixel types - see the error at
>>> the end of the message.
>>> I'm not so sure, but I think the problem comes from the lack of
>>> casting from the output type of the interpolator to the pixel type  
>>> of
>>> the second input. Or maybe the output of the interpolator is not of
>>> the right type?
>>> BTW, is it possible to make the interpolator work with any kind of
>>> pixel? The interpolator may do some assumptions on the pixel types
>>> which are not done in BinaryFunctorImageFilter...
>>>
>>> Regards,
>>>
>>> Gaëtan
>>>
>>>
>>>
>>> In file included from /home/glehmann/src/ITK/Modules/Filtering/
>>> ImageFilterBase/include/itkBinaryFunctorImageFilter.h:267,
>>>                from /home/glehmann/src/ITK/Modules/Filtering/
>>> ImageCompare/include/itkAbsoluteValueDifferenceImageFilter.h:22,
>>>                from /home/glehmann/src/ITK/build/Wrapping/WrapITK/
>>> Typedefs/PixelMathExplicit.h:38,
>>>                from /home/glehmann/src/ITK/build/Wrapping/WrapITK/
>>> Libraries/PixelMath/itkMultiplyImageFilterExplicit.cxx:3:
>>> /home/glehmann/src/ITK/Modules/Filtering/ImageFilterBase/include/
>>> itkBinaryFunctorImageFilter.txx: In member function 'void
>>> itk::BinaryFunctorImageFilter<TInputImage1, TInputImage2,
>>> TOutputImage, TFunction>::ThreadedGenerateData(const typename
>>> TOutputImage::RegionType&, int) [with TInputImage1 =
>>> itk::Image<std::complex<float>, 3u>, TInputImage2 =
>>> itk::Image<std::complex<float>, 3u>, TOutputImage =
>>> itk::Image<std::complex<float>, 3u>, TFunction =
>>> itk::Functor::Mult<std::complex<float>, std::complex<float>,
>>> std::complex<float> >]':
>>> /home/glehmann/src/ITK/build/Wrapping/WrapITK/Libraries/PixelMath/
>>> itkMultiplyImageFilterExplicit.cxx:21:   instantiated from here
>>> /home/glehmann/src/ITK/Modules/Filtering/ImageFilterBase/include/
>>> itkBinaryFunctorImageFilter.txx:302: error: no match for call to
>>> '(itk::Functor::Mult<std::complex<float>, std::complex<float>,
>>> std::complex<float> >) (std::complex<float>, std::complex<double>&)'
>>> /home/glehmann/src/ITK/Modules/Filtering/ImageIntensity/include/
>>> itkMultiplyImageFilter.h:58: note: candidates are: TOutput
>>> itk::Functor::Mult<TInput1, TInput2, TOutput>::operator()(const
>>> TInput1&, const TInput2&) const [with TInput1 = std::complex<float>,
>>> TInput2 = std::complex<float>, TOutput = std::complex<float>]
>>> /home/glehmann/src/ITK/Modules/Filtering/ImageFilterBase/include/
>>> itkBinaryFunctorImageFilter.txx: In member function 'void
>>> itk::BinaryFunctorImageFilter<TInputImage1, TInputImage2,
>>> TOutputImage, TFunction>::ThreadedGenerateData(const typename
>>> TOutputImage::RegionType&, int) [with TInputImage1 =
>>> itk::Image<std::complex<float>, 2u>, TInputImage2 =
>>> itk::Image<std::complex<float>, 2u>, TOutputImage =
>>> itk::Image<std::complex<float>, 2u>, TFunction =
>>> itk::Functor::Mult<std::complex<float>, std::complex<float>,
>>> std::complex<float> >]':
>>> /home/glehmann/src/ITK/build/Wrapping/WrapITK/Libraries/PixelMath/
>>> itkMultiplyImageFilterExplicit.cxx:21:   instantiated from here
>>> /home/glehmann/src/ITK/Modules/Filtering/ImageFilterBase/include/
>>> itkBinaryFunctorImageFilter.txx:302: error: no match for call to
>>> '(itk::Functor::Mult<std::complex<float>, std::complex<float>,
>>> std::complex<float> >) (std::complex<float>, std::complex<double>&)'
>>> /home/glehmann/src/ITK/Modules/Filtering/ImageIntensity/include/
>>> itkMultiplyImageFilter.h:58: note: candidates are: TOutput
>>> itk::Functor::Mult<TInput1, TInput2, TOutput>::operator()(const
>>> TInput1&, const TInput2&) const [with TInput1 = std::complex<float>,
>>> TInput2 = std::complex<float>, TOutput = std::complex<float>]
>>> make[2]: *** [Wrapping/WrapITK/Libraries/PixelMath/CMakeFiles/
>>> PixelMathExplicit.dir/itkMultiplyImageFilterExplicit.cxx.o] Error 1
>>> make[1]: *** [Wrapping/WrapITK/Libraries/PixelMath/CMakeFiles/
>>> PixelMathExplicit.dir/all] Error 2
>>> make[1]: *** Waiting for unfinished jobs....
>>>
>>>
>>>
>>> --
>>> Gaëtan Lehmann
>>> Biologie du Développement et de la Reproduction
>>> INRA de Jouy-en-Josas (France)
>>> tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
>>> http://voxel.jouy.inra.fr  http://www.itk.org
>>> http://www.mandriva.org  http://www.bepo.fr
>>>
>>> _______________________________________________
>>> 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://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-developers
>>
>>
>>
>> ________________________________
>> Notice: This UI Health Care e-mail (including attachments) is  
>> covered by the Electronic Communications Privacy Act, 18 U.S.C.  
>> 2510-2521, is confidential and may be legally privileged.  If you  
>> are not the intended recipient, you are hereby notified that any  
>> retention, dissemination, distribution, or copying of this  
>> communication is strictly prohibited.  Please reply to the sender  
>> that you have received the message in error, then delete it.  Thank  
>> you.
>> ________________________________
>
> -- 
> Gaëtan Lehmann
> Biologie du Développement et de la Reproduction
> INRA de Jouy-en-Josas (France)
> tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
> http://voxel.jouy.inra.fr  http://www.itk.org
> http://www.mandriva.org  http://www.bepo.fr
>
> _______________________________________________
> 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://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-developers

-- 
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr  http://www.itk.org
http://www.mandriva.org  http://www.bepo.fr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 203 bytes
Desc: Ceci est une signature ?lectronique PGP
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20110601/2a279485/attachment.pgp>


More information about the Insight-developers mailing list