[vtkusers] How to return images from file to another file?
Laurent PAUL
Laurent.Paul at orto.ucl.ac.be
Tue Jan 24 05:09:39 EST 2006
Hi Obada,
You were right!
It was just a typo mistake...
I didn't unerstand the compilation errors.
Thank you very much, it works now.
Laurent.
> 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
> generally.
>
>
> Good luck :-)
>
> Obada
>
More information about the vtkusers
mailing list