[vtkusers] SetCutPlane not working in vtkImageResliceMapper

Debjit Ghosh dghosh at chla.usc.edu
Mon Jan 13 15:33:39 EST 2014


As a refresher, here is the code snippet which implements the slicing using
the camera and I wonder if it has to do with the default_norm that I have
set to [0,0,1]:

matrix->MultiplyPoint(this->default_norm, this->normal);
			
double focalPt[] = {0,0,0};
double centerofvol[] = {dimX/2, dimY/2, dimZ/2};
double origin[] = {dimX/2, dimY/2, 0};

vtkSmartPointer<vtkPlane> plane = vtkSmartPointer<vtkPlane>::New();
plane->ProjectPoint( centerofvol, focalPt );

position[0] = focalPt[0] + distfromcam * this->normal[0]; 
position[1] = focalPt[1] + distfromcam * this->normal[1];
position[2] = focalPt[2] + distfromcam * this->normal[2];

cam->SetPosition(position);		//Orientation of the slice plane		
cam->SetFocalPoint(focalPt);	//Point at which my plane is fixed	
cam->SetViewUp(this->view_up);
cam->SetWindowCenter(win_center_x, win_center_y);



--
View this message in context: http://vtk.1045678.n5.nabble.com/SetCutPlane-not-working-in-vtkImageResliceMapper-tp5716627p5725351.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list