[Insight-users] UnaryFunctorImageFilter

Miller, James V (Research) millerjv at crd.ge.com
Wed Jul 6 13:29:30 EDT 2005


We'd probably need to see more of your code to debug. My guess is:

* You are not using a SmartPointer to reference the filters/images
but trying to use a stacked based object. Do you have code like

	InverterType inverter;

instead of
	
	InverterType::Pointer inverter = InvertType::New();




-----Original Message-----
From: insight-users-bounces+millerjv=crd.ge.com at itk.org
[mailto:insight-users-bounces+millerjv=crd.ge.com at itk.org]On Behalf Of
cdold
Sent: Wednesday, July 06, 2005 10:46 AM
To: insight-users at itk.org
Subject: [Insight-users] UnaryFunctorImageFilter


Hello
I try to use the UnaryFunctorImageFilter, but always I get this
compiling error...

D:\ITK\InsightToolkit-2.0.1\Code\BasicFilters\itkUnaryFunctorImageFilter.h(88)
: error C2248: 'Image<float,3>::~Image<float,3>' : cannot access private
member declared in class 'itk::Image<float,3>'
        D:\ITK\InsightToolkit-2.0.1\Code\Common\itkImage.h(345) : see
declaration of 'Image<float,3>::~Image<float,3>'
       
D:\ITK\InsightToolkit-2.0.1\Code\BasicFilters\itkUnaryFunctorImageFilter.h(88)
: while compiling class-template member function '__thiscall
itk::UnaryFunctorImageFilter<class itk::Image<float,3>,class
itk::Image<float,3>,class itk::Image<flo
at,3> >::~itk::UnaryFunctorImageFilter<class itk::Image<float,3>,class
itk::Image<float,3>,class itk::Image<float,3> >(void)'
Error executing cl.exe.

MIP.exe - 1 error(s), 0 warning(s)


Before I did the definitions:

 template <class InputPixelType>
 class InvertIntensityFunctor
 {
 public:
 
    InputPixelType operator()( InputPixelType input )
        {
            return NumericTraits<InputPixelType>::max() - input;
        }
 };



    typedef itk::UnaryFunctorImageFilter<
        InputImageType,
        InputImageType,
        InvertIntensityFunctor<typename InputImageType::PixelType> >
            InverterType;

-- 
Dipl.-Ing. Christian Dold
Fraunhofer Gesellschaft		Phone: +49-6151-155 523
Institute for Computer Graphics	Fax: +49-6151-155480
Fraunhoferstr.5			mailto: Christian.Dold at igd.fraunhofer.de
D-64283 Darmstadt, Germany      http://a7www.igd.fhg.de/
                                http://a7www.igd.fhg.de/persons/cdold/ 

_______________________________________________
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