[vtkusers] vtkGPUVolumeRayCastMapper: Updateing ImageData after first Rendering?

Sankhesh Jhaveri sankhesh.jhaveri at kitware.com
Mon Feb 13 11:16:51 EST 2017

Hi Willy,

You need to call Modified() on the vtkImageData, each time you update it,
for the volume mapper to reload the volume.

Hope that helps.


On Mon, Feb 13, 2017 at 8:42 AM Willy <Wiggerl at linhuber.info> wrote:

> 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.
> _______________________________________________
> 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
> Search the list archives at: http://markmail.org/search/?q=vtkusers
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware
<http://www.kitware.com/> | (518) 881-4417
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170213/a9d98f68/attachment.html>

More information about the vtkusers mailing list