[Insight-users] Itk MFC problem

Karthik Krishnan Karthik.Krishnan at kitware.com
Fri Jan 28 16:14:42 EST 2005


Hi Chris,

You might want to check this thread out.
http://www.itk.org/pipermail/insight-users/2003-February/002572.html

thanks
kk

Chris Gammage wrote:

> 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
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>



More information about the Insight-users mailing list