20 #include <itkScaleTransform.h>
46 template <
class TPixelType,
unsigned int VImageDimension>
47 itk::Object::Pointer QmitkScaleTransformView::GetTransform2(itk::Image<TPixelType, VImageDimension> * )
49 typedef typename itk::Image<TPixelType, VImageDimension> FixedImageType;
50 typedef typename itk::Image<TPixelType, VImageDimension> MovingImageType;
53 transformPointer->SetIdentity();
55 return transformPointer.GetPointer();
60 itk::Array<double> transformValues;
61 transformValues.SetSize(4);
62 transformValues.fill(0);
63 transformValues[0] =
m_Controls.m_UseOptimizerScalesScale->isChecked();
64 transformValues[1] =
m_Controls.m_ScalesScaleTransformScaleX->text().toDouble();
65 transformValues[2] =
m_Controls.m_ScalesScaleTransformScaleY->text().toDouble();
66 transformValues[3] =
m_Controls.m_ScalesScaleTransformScaleZ->text().toDouble();
67 return transformValues;
72 m_Controls.m_UseOptimizerScalesScale->setChecked(transformValues[0]);
73 m_Controls.m_ScalesScaleTransformScaleX->setText(QString::number(transformValues[1]));
74 m_Controls.m_ScalesScaleTransformScaleY->setText(QString::number(transformValues[2]));
75 m_Controls.m_ScalesScaleTransformScaleZ->setText(QString::number(transformValues[3]));
86 QValidator *validatorLineEditInputFloat =
new QDoubleValidator(0, 20000000, 8,
this);
87 m_Controls.m_ScalesScaleTransformScaleX->setValidator(validatorLineEditInputFloat);
88 m_Controls.m_ScalesScaleTransformScaleY->setValidator(validatorLineEditInputFloat);
89 m_Controls.m_ScalesScaleTransformScaleZ->setValidator(validatorLineEditInputFloat);
94 itk::Array<double> scales;
97 if (
m_Controls.m_UseOptimizerScalesScale->isChecked())
99 scales[0] =
m_Controls.m_ScalesScaleTransformScaleX->text().toDouble();
100 scales[1] =
m_Controls.m_ScalesScaleTransformScaleY->text().toDouble();
101 scales[2] =
m_Controls.m_ScalesScaleTransformScaleZ->text().toDouble();
107 vtkTransform *vtktransform,
108 itk::Array<double> transformParams)
112 for (
unsigned int i = 0; i < transformParams.size(); i++)
114 vtkmatrix->SetElement(i, i, transformParams[i]);
116 vtktransform->SetMatrix(vtkmatrix);
127 m_Controls.m_ScalesScaleTransformScaleZ->hide();
133 m_Controls.m_ScalesScaleTransformScaleZ->show();
itk::SmartPointer< Self > Pointer
TransformType
Unique integer value for every transform.
#define AccessByItk(mitkImage, itkImageTypeFunction)
Access a MITK image by an ITK image.
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.