[Insight-users] problem for ITKimage to VTKimage in managedITK in C# in Visual Studio 2008
onur ganiler
onur.ganiler at gmail.com
Mon Mar 14 12:39:00 EDT 2011
Hi,
I'm using managedITK v 3.14.0.0 and vtkDotnet v 5.0.1
I have a problem with managedITK and vtkDotnet when passing an itkImage to
Vtkimage by using itkImageToVTKImageFilter.
I searched for the possible solutions and then I saw this link "
http://www.itk.org/pipermail/insight-users/2008-April/025400.html"
I completely understood the problem is about between the const pointers and
native classes.
However, though it is said that this problem will have been fixed in the
next version of managed ITK, I'm still getting the same error.
I also tried vtkImageImport and vtkImageExport to convert itkImage by using
its NativePointer (itkImage.NativePointer) but I always got the same error "
*AccessViolationException*".
I just want to know if managedITK and vtkDotnet is still being supported or
am I missing something ?
*For example:*
itkImage_US3 itkImageData = itkImage_US3.New();
itkImageData.Read(imagePath);
itkImageData.DisconnectPipeline();
itkImageToVTKImageFilter_ISS3 connector =
itkImageToVTKImageFilter_ISS3.New(); *-->warning itkProcessObject.cxx line
520*
connector.SetInput(itkImageData); --> no problem
imageData = connector.GetOutput(); --> no problem
imageData.Update(); ---> *AccessViloationException *
*The same problem continue if I try to access itkImage again:*
*
*
vtkImageExport vtkExport = new vtkImageExport();
vtkImageImport vtkImport = new vtkImageImport();
vtkExport.SetNativePointer(itkImageData.NativePointer);
vtkImport.SetDataOrigin(vtkExport.GetDataOrigin());
----> *AccessViloationException*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110314/5e34f042/attachment.htm>
More information about the Insight-users
mailing list