+ mInput = input;
+ HideInputSelector();
+ QTabWidget * tab = dynamic_cast<vvMainWindow*>(mMainWindow)->GetTab();
+ move(tab->mapToGlobal(tab->pos()));
+ resize(tab->width(), 0);
+
+ //default image rotation center is the center of the image
+ QString xcord,ycord,zcord;
+ std::vector<double> imageorigin;
+ imageorigin=mInput->GetImage()->GetOrigin();
+ std::vector<int> imageSize = mInput->GetImage()->GetSize();
+ std::vector<double> imageSpacing = mInput->GetImage()->GetSpacing();
+ xcord=xcord.setNum(imageorigin[0]+(imageSize[0]-1)*imageSpacing[0]*0.5, 'g', 3);
+ ycord=ycord.setNum(imageorigin[1]+(imageSize[1]-1)*imageSpacing[1]*0.5, 'g', 3);
+ zcord=zcord.setNum(imageorigin[2]+(imageSize[2]-1)*imageSpacing[2]*0.5, 'g', 3);
+ Xval->setText(xcord);
+ Yval->setText(ycord);
+ Zval->setText(zcord);
+
+ //backup original matrix
+ for(int j=0; j<4; j++)
+ for(int i=0; i<4; i++)
+ // TODO SR and BP: check on the list of transforms and not the first only
+ mInitialMatrix->SetElement(i,j, mCurrentSlicerManager->GetImage()->GetTransform()[0]->GetMatrix()->GetElement(i,j));
+ QString origTransformString = dynamic_cast<vvMainWindow*>(mMainWindow)->Get4x4MatrixDoubleAsString(mInitialMatrix);
+ transformationLabel->setText(origTransformString);
+ SetTransform(mInitialMatrix);
+
+ //connect all sigs to slots
+ connect(resetbutton, SIGNAL(pressed()), this, SLOT(ResetTransform()));
+ connect(loadbutton, SIGNAL(pressed()), this, SLOT(LoadFile()));
+ connect(savebutton, SIGNAL(pressed()), this, SLOT(SaveFile()));
+
+ connect(xtrans_slider, SIGNAL(valueChanged(int)), this, SLOT(SliderChange(int)));
+ connect(ytrans_slider, SIGNAL(valueChanged(int)), this, SLOT(SliderChange(int)));
+ connect(ztrans_slider, SIGNAL(valueChanged(int)), this, SLOT(SliderChange(int)));
+ connect(xrot_slider, SIGNAL(valueChanged(int)), this, SLOT(SliderChange(int)));
+ connect(yrot_slider, SIGNAL(valueChanged(int)), this, SLOT(SliderChange(int)));
+ connect(zrot_slider, SIGNAL(valueChanged(int)), this, SLOT(SliderChange(int)));
+ connect(xtrans_sb, SIGNAL(valueChanged(double)), this, SLOT(SpinBoxChange(double)));
+ connect(ytrans_sb, SIGNAL(valueChanged(double)), this, SLOT(SpinBoxChange(double)));
+ connect(ztrans_sb, SIGNAL(valueChanged(double)), this, SLOT(SpinBoxChange(double)));
+ connect(xrot_sb, SIGNAL(valueChanged(double)), this, SLOT(SpinBoxChange(double)));
+ connect(yrot_sb, SIGNAL(valueChanged(double)), this, SLOT(SpinBoxChange(double)));
+ connect(zrot_sb, SIGNAL(valueChanged(double)), this, SLOT(SpinBoxChange(double)));
+
+ connect(stepTransSpinBox, SIGNAL(valueChanged(double)), this, SLOT(SetTranslationStep(double)));
+ connect(stepRotSpinBox, SIGNAL(valueChanged(double)), this, SLOT(SetRotationStep(double)));
+
+ connect(checkBoxDegrees, SIGNAL(stateChanged(int)), this, SLOT(ToggleSpinBoxAnglesUnit()));
+
+ connect(Xval, SIGNAL(editingFinished()), this, SLOT(ChangeOfRotationCenter()));
+ connect(Yval, SIGNAL(editingFinished()), this, SLOT(ChangeOfRotationCenter()));
+ connect(Zval, SIGNAL(editingFinished()), this, SLOT(ChangeOfRotationCenter()));
+
+ // Init step modifiers
+ stepTransSpinBox->setValue(1.);
+ stepRotSpinBox->setValue(1.);