<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div class="h5"><div class="gmail_quote">On Thu, Oct 27, 2011 at 2:17 PM, Hikaruchan <span dir="ltr"><<a href="mailto:Sandra.Schroetter.fl@ait.ac.at" target="_blank">Sandra.Schroetter.fl@ait.ac.at</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi!<br>
<br>
I am new to VTK, and maybe it is an too simple question, but I do not get it<br>
work. Hope you can help me.<br>
<br>
I have an application with four renderviews (three 2D, one 3D), where I show<br>
my different MRI Slices (sagittal, coronal and axial, and in 3D all of<br>
them). Now I wanted to make a new Imagedata (which is no problem) and draw<br>
to it (which is no problem). After a user input I change some of the scalars<br>
of the imagedata (using GetScalarPointer()), but my changes are not<br>
displayed. I called<br>
<br>
electricDensityIma->Update(); //thats the vtkImageData<br>
<br>
after I have made my changes to imagedata.<br>
<br>
I don't know if it is important, but I make my image, then put a<br>
vtkImageGaussianSmooth on it, then a vtkImageMedian3D then a vtkImageReslice<br>
and so on.<br>
<br>
But I don't get it work, that the display is updated. Hope someone can help<br>
me and explain me how a imagedata can be changed during runtime and correcty<br>
updated and displayed.<br>
<br>
Thank you in advance and please excuse my bad english. :-)</blockquote></div></div></div></blockquote><div><br></div><span class="Apple-style-span" style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">I believe you have to call electricDensityIma->Modified();. Since you are changing the data directly (via the pointer), Modified() does not get called automatically like when you change most things (with a SetXYZ() function). The pipeline therefore does not know that anything has changed, so even by calling Update() it has nothing to (and thus does not display the new data).</span><br clear="all">
Thanks,<br><br>David</div>