[vtkusers] vtkGPUVolumeRayCastMapper: Updateing ImageData after first Rendering?
Willy
Wiggerl at Linhuber.info
Mon Feb 13 08:42:12 EST 2017
Thanks for your reply, but i think i described my problem not detailed
enough.
I don't use vtkRenderWindowInteractor. I have a .NET project with .Net
PictureBox in it and a C++ Project witch encapsulates all the vtk stuff. To
show the rendered vtk image in my picturebox i set my vtkRenderWindow to
OffScreenRenderingOn() and use the following method to Convert vtkImageData
to a .NET Bitmap:
void VolumeRenderer::Render3DImage(int width, int height, Bitmap^% image)
{
_RenderWindow->SetSize(width, height);
_CurrentRenderer->ResetCameraClippingRange();
vtkRenderLargeImage* imageFilter = vtkRenderLargeImage::New();
imageFilter->SetInput(_CurrentRenderer);
imageFilter->SetMagnification(1);
imageFilter->Update();
ConvertRGBVTKImageToBitmap(imageFilter->GetOutput(), image);
imageFilter->Delete();
}
Each time the user moves the mouse, changes the color, ... i change the
Position/Rotation of the camera or the vtkColorTransferFunction or wathever.
And after that i recall Render3DImage to get the new Picture which i show in
my PictureBox. After the very first call of Render3DImage the rendered image
does not change anymore if i change the data in my vtkImageData (using
memcpy). i guess that the very first call of Render3DImage copies my
cpu-Memory (where vtkImageData is) to the gpu. If a change the vtkImageData
after that it does not affect the gpu-memory.
Am i rigth? what can i do?
--
View this message in context: http://vtk.1045678.n5.nabble.com/vtkGPUVolumeRayCastMapper-Updateing-ImageData-after-first-Rendering-tp5742153p5742159.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list