[Insight-users] Cannot access LightObject functions in object instantiated in DLL
Gao Han
lintworm2 at yahoo.co.uk
Tue May 11 09:40:27 EDT 2010
Dear all,
I have been stuck for a while now, and any help would be greatly
appreciated. This is the problem:
I am creating a program for image analysis, and am using a combination of
wxWidgets, VTK and ITK. For this, I have set up a platform in which
functionality can be extended by means of DLL modules. The problem at the
moment is that I am working on a image display. I use
itk::ImageToVTKImageFilter for the connection between VTK and ITK. I am able
to create the object alright, and am able to call all functions of the
base-classes except for the classes from LightObject. The offending code:
typedef itk::ImageToVTKImageFilter<UnsignedCharITKImage2D> conRGBUChar;
conRGBUChar * filt = conRGBUChar::New();
std::cout << "In the filter class : ";
std::cout << filt->tralalie() << "\n"; // Fine....
std::cout << "In itkProcessObject : ";
std::cout << filt->GetNumberOfOutputs() << "\n"; // Fine...
std::cout << "In itkObject : ";
std::cout << filt->GetDebug() << "\n"; // Fine...
std::cout << "In itkLightObject : ";
std::cout << filt->GetReferenceCount() << "\n"; // Crash with
0xc000000005
Where the function tralalie a function is that I added to the code of
itkImageToVTKImageFilter:
char * tralalie() {return "In itkImageToVTKImageFilter.h";}
(BTW: In the original itkImageToVTKFilter.h is some code that I don't think
should be there, the function tralala etc. but that's a different story).
I have no clue where this error comes from, and any
ideas/suggestions/pointers will be greatly appreciated. What I've done
sofar: Rebuild ITK, switched to an older version (3.16.0), implemented in
many different ways.
Hoping on replies,
Gao Han
--
View this message in context: http://old.nabble.com/Cannot-access-LightObject-functions-in-object-instantiated-in-DLL-tp28522610p28522610.html
Sent from the ITK - Users mailing list archive at Nabble.com.
More information about the Insight-users
mailing list