关于置顶帖里2X2 单个切片显示的问题。。
vtk吧
全部回复
仅看楼主
level 7
我依照置顶帖里的代码,可以显示三正交,但是单个切片无法显示啊。
void klPlaneDisplayWidget::setImagePlaneWidget(vtkImagePlaneWidget* widget)
{
this->planeWidget=widget;
vtkImageMapToColors *colorMap1 = vtkImageMapToColors::New();
colorMap1->PassAlphaToOutputOff(); //use in RGB
colorMap1->SetActiveComponent( 0 );
colorMap1->SetOutputFormatToLuminance();
colorMap1->SetInputData((vtkDataSet*)planeWidget->GetResliceOutput());
colorMap1->SetLookupTable( (vtkScalarsToColors *)planeWidget->GetLookupTable() );
imageActor = vtkImageActor::New();
imageActor->PickableOff();
imageActor->SetInputData( colorMap1->GetOutput() );
m_render=vtkRenderer::New();
m_render->AddActor(imageActor);
interactor=vtkRenderWindowInteractor::New();
vtkInteractorStyleImage *m_style =vtkInteractorStyleImage::New();
interactor->SetInteractorStyle(m_style);
this->GetRenderWindow()->SetInteractor(interactor);
this->GetRenderWindow()->AddRenderer(m_render);
interactor->SetRenderWindow(this->GetRenderWindow());
interactor->Initialize();
m_render->GetActiveCamera()->ParallelProjectionOn();
m_render->ResetCamera();
interactor->Initialize();
}
2017年03月17日 06点03分 1
level 7
QT做的 想在左下角显示单个切片 但是一片黑啊
2017年03月17日 07点03分 2
level 1
大神,我现在也是利用置顶里面的2X2做的,显示不出来单个贴片,我看了你在置顶贴里面的回复,改成了你的那个也显示不出来三个切片,为什么呢?还有你这个VTK显示和QT是怎么实现交互的的呢?
2017年05月11日 03点05分 3
槽函数
2017年05月12日 03点05分
你说的是QT和VTK交互的办法吧。我现在代码还是显示不了三个切片这个怎么解决呢?
2017年05月12日 03点05分
我也是显示不了,该如何解决呢
2020年08月14日 12点08分
1