[vtkusers] xxxxxSPAMxxxxx Putting 2D image to the center of window, how to do it?
HanJongChul
madness78 at pusan.ac.kr
Wed Feb 10 06:10:01 EST 2010
Hello, vtkusers,
I have question.
When displaying the 2D image, how to Putt 2D image to the center of window.
Is there any function? I couldn't find it.
Please help me.
this->pvtkImageMagnify = vtkImageMagnify::New();
this->pvtkImageMagnify->SetInputConnection(this->pvtkImageReader1->GetOutput
Port());
this->pvtkImageMagnify->SetMagnificationFactors(2,2,2);
this->pvtkImageMapper=vtkImageMapper::New();
this->pvtkImageMapper->SetInput(this->pvtkImageMagnify->GetOutput());
this->pvtkActor2D=vtkActor2D::New();
this->pvtkActor2D->SetMapper(this->pvtkImageMapper);
this->pvtkActor2D->GetPosition2Coordinate()->SetCoordinateSystemToViewport()
;
this->pvtkActor2D->SetPosition(0,0);
this->pvtkActor2D->SetPosition2(512,512);
pVOXA_Ver10View->GetRenderer()->SetBackground(1,1,1);
pVOXA_Ver10View->GetRenderer()->AddActor2D(this->pvtkActor2D);
pVOXA_Ver10View->GetRenderer()->ResetCamera();
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100210/7c84f4e1/attachment.htm>
More information about the vtkusers
mailing list