[vtkusers] possible problem with GlobalReleaseDataFlagOn and ReleaseDataFlagOn
Frank Gao
gao at mdimaging.com
Mon Sep 25 16:49:15 EDT 2006
Hi Experts,
I am having some problem and think it has something to do with
GlobalReleaseDataFlagOn.
What I have is a 2D image viewer, and a 3d rendering window. Starting from
a reader, I created two pipelines. After 2D image creation, 3D rendering is
done. Then I go back to 2D window, the program blows out with memory invalid
memory access in some lower level code called by
vtkImageMapToWindowLevelColors::ThreadedRequestData . The problematic
pointer is inPtr, which is generated by
inData[0][0]->GetScalarPointerForExtent(outExt); After some debugging and
code inspection, I could not figure out anything certain. Considering that
this inData is the output of ITKToVTKImageFilter, I suspect that
GlobalReleaseDataFlagOn has caused the memory freed, but the pointer is
still there. After I remove the code calling GlobalReleaseDataFlagOn, the
problem is gone.
Therefore my guess is that the implementation of GlobalReleaseDataFlagOn or
ReleaseDataFlagOn possibly can leave pointers untouched while freeing the
memory. For my case it is likely ITKToVTKImageFilter related or the ITK file
reader I am using.
Experts, would you please shed some lights on this and give some insights to
the implementation of GlobalReleaseDataFlagOn and ReleaseDataFlagOn?
Thanks,
Frank
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060925/f7fa50db/attachment.htm>
More information about the vtkusers
mailing list