Update VTK to v9.2.2, fix some lib update error.

This commit is contained in:
Krad
2022-11-21 13:28:59 +08:00
parent fccf7e2176
commit d0dd4303bb
7 changed files with 8 additions and 7 deletions

View File

@@ -16,7 +16,7 @@ MarginCornerAnnotation::~MarginCornerAnnotation() {
}
void MarginCornerAnnotation::SetTextActorsPosition(int *vsize) {
void MarginCornerAnnotation::SetTextActorsPosition(const int *vsize) {
this->TextActor[LowerLeft]->SetPosition ( margins[0], margins[3] );
this->TextActor[LowerRight]->SetPosition ( vsize[0] - margins[3], margins[2] );
this->TextActor[UpperLeft]->SetPosition ( margins[1], vsize[1] - margins[0] );

View File

@@ -14,7 +14,7 @@ public:
protected:
MarginCornerAnnotation();
~MarginCornerAnnotation() override;
void SetTextActorsPosition(int vsize[2]) override ;
void SetTextActorsPosition(const int vsize[2]) override ;
void SetMargin(int left, int top, int right, int bottom);
void SetMargin(int v){
SetMargin(v, v, v, v);

View File

@@ -326,7 +326,7 @@ void VolumeRenderingViewer::SetInputData(vtkImageData *in) {
}
vtkImageData *VolumeRenderingViewer::GetInput() {
return this->VolumeMapper->GetInput();
return vtkImageData::SafeDownCast(this->VolumeMapper->GetInput());
}
void VolumeRenderingViewer::renderAnnotation() {

View File

@@ -42,7 +42,7 @@ DicomImageView::DicomImageView(QWidget *parent)
// create layout for main container
QGridLayout *controlLayout = new QGridLayout(wrapper);
mGLWidget->setParent(wrapper);
mGLWidget->SetRenderWindow(mGLRenWin);
mGLWidget->setRenderWindow(mGLRenWin.Get());
controlLayout->addWidget(mGLWidget, 0, 0);
//add scrollbar to container

View File

@@ -9,7 +9,7 @@
class QVTKOpenGLNativeWidget2 :public QVTKOpenGLNativeWidget {
Q_OBJECT
typedef QOpenGLWidget Superclass;
typedef QVTKOpenGLNativeWidget Superclass;
public:
QVTKOpenGLNativeWidget2(QWidget* parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags());
~QVTKOpenGLNativeWidget2() override;

View File

@@ -32,7 +32,7 @@ VolumeRenderingWindow::VolumeRenderingWindow(QWidget *parent , Qt::WindowFlags f
mViewer->SetRenderWindow(mRenderWin);
mViewer->SetRenderer(renderer);
widget->SetRenderWindow(mRenderWin);
widget->setRenderWindow(mRenderWin.Get());
layout->addWidget(widget);
setMinimumSize(680,500);