[vtkusers] How to return images from file to another file?

Laurent PAUL Laurent.Paul at orto.ucl.ac.be
Mon Jan 23 11:46:28 EST 2006


Hi users,

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:

in App.h:
void Load_VTK_Volume(const char *directory);
vtkImageData *ReadImage;
read *Lecture; //object from class "read"

in App.cpp:
//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);
}


in read.h:
vtkImageData Load_Dicom_Serie(const char *directory);

in read.cpp:
vtkImageData InOut::Load_Dicom_Serie(const char *directory)
{
	reader2 = vtkDICOMImageReader::New();
	reader2->SetDirectoryName(directory);
	return reader2->GetOutput();
}

This gives me compilation errors:
'vtkImageData::~vtkImageData' : cannot access protected member declared in
class 'vtkImageData'.
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...

Thanks for your help,

Laurent.




More information about the vtkusers mailing list