You can perform translations, origin relocation, etc with vtkImageChangeInformation, I think it could work for you.<br><br>vtkImageChangeInformation normalized = new vtkImageChangeInformation();<br>normalized.SetInputConnection( reader.GetOutputPort() ); // You can use setInput instead <br>
normalized.SetOutputOrigin( 100, 100, 0 ); //There're others methods that can fit better your needs take a look to the documentation.<br> .SetOrigin<br> .Set...Translation<br>normalized.Update();<br>
<br><div class="gmail_quote">2012/11/13 David Lonie <span dir="ltr"><<a href="mailto:david.lonie@kitware.com" target="_blank">david.lonie@kitware.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Sorry for the noise -- message got sent too early last time...<br>
<div class="im"><br>
Hi list,<br>
<br>
I'm writing a test for some new functionality that will generate<br>
several vtkImageData instances and render them at different positions.<br>
<br>
I'm setting up a vtkImageSlice like this:<br>
<br>
vtkNew<vtkImageData> image1;<br>
</div>// Generate image...<br>
<div class="im">vtkNew<vtkImageSliceMapper> mapper1;<br>
mapper1->SetInputData(image1.GetPointer());<br>
vtkNew<vtkImageSlice> actor1;<br>
actor1->SetMapper(mapper1.GetPointer());<br>
actor1->SetPosition(10, 10, 10);<br>
<br>
</div>then adding the actor to the renderer as usual. The docs for vtkImageSlice say:<br>
<br>
"Prop3D methods such as SetPosition() and RotateWXYZ() change the<br>
position and orientation of the data with respect to VTK world<br>
coordinates."<br>
<br>
Trouble is, no matter what I set the position of the actor to, the<br>
image appears in the center of the scene. Is this expected behavior?<br>
Is there a better class to use for this sort of thing?<br>
<br>
Thanks,<br>
<br>
Dave<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div><br>