[Insight-developers] Problems creating a "global" itk-object

siegesmund at image-systems.biz siegesmund at image-systems.biz
Mon Jul 6 08:45:43 EDT 2009


Hi, 

I'm new to ITK and to this mailing list. 
I wanna define a VTKImageToImageFilter<TOutputImage> object (derived
from ProcessObject) in the header of my class VtkItkBridge (I use C++): 


template <class TOutputImage > 
class ITK_EXPORT VtkItkBridge : public ProcessObject 
{ 
public: 
... 
// there's other code here, too 
... 
typedef TOutputImage OutputImageType; 
typedef itk::VTKImageToImageFilter<OutputImageType> vtkToItkType; 
vtkToItkType::Pointer vtkToItkFilter; 
... 
}


Now I wanna create that object in the constructor of my class, so I can
use it in class' methods: 


template <class TOutputImage> 
VtkItkBridge<TOutputImage>::VtkItkBridge() 
{ 
vtkToItkObject = vtkToItkObject::New(); 
}

But I always get many error messages at the line vtkToItkType::Pointer
vtkToItkFilter; while compiling. In fact that is comprehensible, because
the class can't know what TOutputImage or OutputImageType means. I know,
these types have to be instances of itk::Image. 
But I do need a global variable of VTKImageToImageFilter<TOutputImage>
in my class. Does anybody know a possibility how to solve the problem? 

Thx

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20090706/706706e6/attachment.htm>


More information about the Insight-developers mailing list