Oksnevad, Bjorn | 21 Feb 23:06 2011

ActiViz vtkImagePlaneWidget

Hello,
I am new to ActiViz as well as new to the user group.
I am trying to use the vtkImagePlaneWidget to view a custom format MRI data source.  The plane is rendered for the first view successfully.  When I start to interact with the plane, I get the following exception:
 
System.AccessViolationException was unhandled
  Message="Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
 
Does anyone have tips on how to read image data from file using C# and then transferring the data to a vtkImageData object and setting up the vtkImagePlaneWidget?
 
Thanks!
Bjorn
 
 

[CONFIDENTIALITY AND PRIVACY NOTICE] Information transmitted by this email is proprietary to Medtronic and is intended for use only by the individual or entity to which it is addressed, and may contain information that is private, privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please delete this mail from your records. To view this notice in other languages you can either select the following link or manually copy and paste the link into the address bar of a web browser: http://emaildisclaimer.medtronic.com

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Oksnevad, Bjorn | 22 Feb 21:08 2011

Re: ActiViz vtkImagePlaneWidget

Hello,
I received support from Kitware (thanks David Cole) and wanted to contribute back to the user list.
 
When using ActiViz, it is important to hold .NET managed references to vtk objects or objects used by vtk objects.  Skipping this step often will result in AccessViolationExceptions where .NET performs garbage collection on memory that is still being used by VTK.  This is especially necessary for .NET event handlers.
 
Cheers,
Bjorn

From: vtkusers-bounces <at> vtk.org [mailto:vtkusers-bounces <at> vtk.org] On Behalf Of Oksnevad, Bjorn
Sent: Monday, February 21, 2011 4:06 PM
To: vtkusers <at> vtk.org
Subject: [vtkusers] ActiViz vtkImagePlaneWidget

Hello,
I am new to ActiViz as well as new to the user group.
I am trying to use the vtkImagePlaneWidget to view a custom format MRI data source.  The plane is rendered for the first view successfully.  When I start to interact with the plane, I get the following exception:
 
System.AccessViolationException was unhandled
  Message="Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
 
Does anyone have tips on how to read image data from file using C# and then transferring the data to a vtkImageData object and setting up the vtkImagePlaneWidget?
 
Thanks!
Bjorn
 
 

[CONFIDENTIALITY AND PRIVACY NOTICE] Information transmitted by this email is proprietary to Medtronic and is intended for use only by the individual or entity to which it is addressed, and may contain information that is private, privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please delete this mail from your records. To view this notice in other languages you can either select the following link or manually copy and paste the link into the address bar of a web browser: http://emaildisclaimer.medtronic.com

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers

Gmane