<div>Hi vtk users,</div><div> I want to add a vtkImageActor and a 3d volume to a single renderer. When I simply add both into a renderer, the image actor gets sized to occupy most of the region in window and the 3d actor is getting very small. </div>
<div>I guess I should define a space for both the actors in the window and add accordingly. </div><div>How it can be done and also if both actors are placing in predefined area, how the image will be resized? Will it be resized to fit in the space provided? </div>
<div>Code snippet is given below</div><div><br></div><div><div> vtkSmartPointer<vtkJPEGReader> jPEGReader = vtkSmartPointer<vtkJPEGReader>::New();</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>jPEGReader->SetFileName("D:\\test1.jpg");</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>jPEGReader->Update();</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>// Create an actor</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer<vtkImageActor> actor = vtkSmartPointer<vtkImageActor>::New();</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>actor->SetInput(jPEGReader->GetOutput());</div></div><div><br></div><div> vtkSmartPointer<vtkSphereSource> sphereSource1 = vtkSmartPointer<vtkSphereSource>::New();</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>sphereSource1->SetCenter(0.0, 0.0, 0.0);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>sphereSource1->SetRadius(4.0);</div><div>
<span class="Apple-tab-span" style="white-space:pre">        </span>sphereSource1->Update();</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer<vtkPolyDataMapper> mapper1 = vtkSmartPointer<vtkPolyDataMapper>::New();</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>mapper1->SetInput(sphereSource1->GetOutput());</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer<vtkActor> actor1 = vtkSmartPointer<vtkActor>::New();</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>actor1->SetMapper(mapper1);</div><div><br></div><div> vtkSmartPointer<vtkRenderer> renderer = vtkSmartPointer<vtkRenderer>::New();</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer<vtkRenderWindow> renderWindow = vtkSmartPointer<vtkRenderWindow>::New();</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>renderWindow->AddRenderer(renderer);</div>
<div> </div><div> renderer->AddActor(actor1);</div><div> renderer->AddActor(actor);</div><div><br></div><div><br></div><div>Please help...Thanks in advance..</div><div> Hari</div>