I want to execute filters in a first file and get the result in another one.
So, I have a class which gets callbacks from GUI and call the
corresponding method in another class (and so another file).
This method has to process images and return the result.
A little snippet of code:
void Load_VTK_Volume(const char *directory);
read *Lecture; //object from class "read"
//This method gets CB and call a method (outside from file)
void Load_VTK_Volume(const char *directory)
Lecture = new read; //object creation
ReadImage = Lecture->Load_Dicom_Serie(directory);
vtkImageData Load_Dicom_Serie(const char *directory);
This gives me compilation errors:
'vtkImageData::~vtkImageData' : cannot access protected member declared in
binary '=' : no operator defined which takes a right-hand operand of type
'class vtkImageData' (or there is no acceptable conversion).
I think it is a C++ problem, or something I badly understood...
Re: How to return images from file to another file?
You were right!
It was just a typo mistake...
I didn't unerstand the compilation errors.
Thank you very much, it works now.
> Hi Laurent,
> seems like there is a little typo in your code that causes both compiler
> errors, namely the return type of your `InOut::Load_Dicom_Serie' method:
> On Jan 23, 2006, at 5:46 PM, Laurent PAUL wrote:
> > in read.h:
> > vtkImageData Load_Dicom_Serie(const char *directory);
> > in read.cpp:
> > vtkImageData InOut::Load_Dicom_Serie(const char *directory)
> The return type should be `vtkImageData*'.
> The type mismatch that results in the line
> > ReadImage = Lecture->Load_Dicom_Serie(directory);
> within `Load_VTK_Volume' would cause the compiler to create a local
> variable of type `vtkImageData' which to assign the right-hand side to,
> and then try to find a suitable conversion (which does not exist). The
> compiler also would generate a destructor call for that hidden local
> variable at the end of its scope, which does not work either, because
> destructors of VTK classes are not declared public (to force you into
> using the `Delete()' method instead).
> It is hard to tell from looking at that code snippet if it would work
> Good luck :-)