[Insight-users] Itk MFC problem
Chris Gammage
damage at wayne.edu
Fri Jan 28 13:58:18 EST 2005
Hi, I've written a program in Visual Studio 7 that so far uses itkImage,
itkImageFileReader,
itkImageSliceIteratorWithIndex, itkExtractImageFilter, and
itkImageLinearIteratorWithIndex
to visualize a 3d dataset loaded from analyze format. The program uses
MFC, and I've manually
included the libraries and header directories without using CMake. The
program also uses openGL to display the images. There is a MainApp
class, MainWindow class, ImageView2D (inherits GLWindow) and a
ControlWindow class. The MainApp class has a member m_Reader which
reads the image and passes the Image pointer to the ImageView2D class,
which then uses the extractor and iterator to show a 2D slice based on
the settings of the ControlWindow class. It all works fine except that
when I close the program I get this error
Unhandled exception at 0x7c918fea in ItkMFC.exe: 0xC0000005: Access
violation writing location 0x00000010.
and the program breaks at this point of
itktimestamp.cxx
/**
* Make sure the new time stamp is greater than all others so far.
*/
void
TimeStamp
::Modified()
{
/**
* Initialize static member
*/
static unsigned long itkTimeStampTime = 0;
TimeStampMutex.Lock();
m_ModifiedTime = ++itkTimeStampTime; <---------------breaks here
TimeStampMutex.Unlock();
}
any comments or suggestions?
Chris Gammage
More information about the Insight-users
mailing list