<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div><span class="ul-threaded" style="margin: 1em 0pt 0pt -20px;"><span class="connect " row-id="1"><span id="li1" class="li-threaded"><span class="threaded"><span style="position: static; border-left-width: 3px;" class="no-bg-color post-border post-middle"><span loaded="true" id="post28522610" row-id="1" jsurl="/forum/ThreadTree$ViewPostJs.jtp?post=28522610&user=534230&maybePending=true" style="display: block;">Dear all,
<br><br>I have been stuck for a while now, and any help would be greatly
appreciated. This is the problem:
<br><br>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:
<br><br> typedef
itk::ImageToVTKImageFilter<UnsignedCharITKImage2D> conRGBUChar;
<br><br> conRGBUChar * filt = conRGBUChar::New();
<br> std::cout << "In the filter class : ";
<br> std::cout << filt->tralalie() << "\n";
// Fine....
<br><br> std::cout << "In itkProcessObject : ";
<br> std::cout << filt->GetNumberOfOutputs() << "\n";
// Fine...
<br><br> std::cout << "In itkObject : ";
<br> std::cout << filt->GetDebug() << "\n"; //
Fine...
<br><br> std::cout << "In itkLightObject : ";
<br> std::cout << filt->GetReferenceCount() << "\n";
// Crash with 0xc000000005
<br><br>Where the function tralalie a function is that I added to the
code of itkImageToVTKImageFilter:
<br> char * tralalie() {return "In itkImageToVTKImageFilter.h";}
<br><br>(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).
<br><br>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.
<br><br>Hoping on replies,
<br><br>Gao Han
</span></span></span></span></span></span></div>
</div><br>
</body></html>