[vtkusers] problem vtkimageactor with mhd

Jose Barreto jose.de.paula at live.com
Tue Nov 1 14:46:26 EDT 2016


Hi guys,
I'm changing my components vtkimageviewer2 for vtkImageActor.

I use SliceFaceCameraOn and SliceAtFocalPointOn. When I will try move the
image
(switch between a cut and others) nothing ever happens.


code:
vetImageActor.push_back(vtkImageActor::New());
			vtkImageActor* imageActor = vetImageActor[vetImageActor.size() - 1];

			imageActor->GetProperty()->SetColorWindow(3347);
			imageActor->GetProperty()->SetColorLevel(876);

		
vtkImageSliceMapper::SafeDownCast(imageActor->GetMapper())->SliceFacesCameraOn();
		
vtkImageSliceMapper::SafeDownCast(imageActor->GetMapper())->SliceAtFocalPointOn();

		
vtkImageSliceMapper::SafeDownCast(imageActor->GetMapper())->SetSliceNumber(n);
imageActor->SetInputData(readerCorte->GetOutput());
			
vtkImageSliceMapper::SafeDownCast(imageActor->GetMapper())->SetOrientationToX();

				renderer->AddActor(imageActor);
				renderer->SetViewport(0, 0, .333, .4);

				renderer->ResetCamera();
				renderer->GetActiveCamera()->Roll(-90);

Does anyone know why this is?



--
View this message in context: http://vtk.1045678.n5.nabble.com/problem-vtkimageactor-with-mhd-tp5740995.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list