20 #include <itkScaleLogarithmicTransform.h>
46 template <
class TPixelType,
unsigned int VImageDimension>
48 itk::Image<TPixelType, VImageDimension> * )
50 typedef typename itk::Image<TPixelType, VImageDimension> FixedImageType;
51 typedef typename itk::Image<TPixelType, VImageDimension> MovingImageType;
54 transformPointer->SetIdentity();
56 return transformPointer.GetPointer();
61 itk::Array<double> transformValues;
62 transformValues.SetSize(4);
63 transformValues.fill(0);
64 transformValues[0] =
m_Controls.m_UseOptimizerScalesScaleLogarithmic->isChecked();
65 transformValues[1] =
m_Controls.m_ScalesScaleLogarithmicTransformScaleX->text().toDouble();
66 transformValues[2] =
m_Controls.m_ScalesScaleLogarithmicTransformScaleY->text().toDouble();
67 transformValues[3] =
m_Controls.m_ScalesScaleLogarithmicTransformScaleZ->text().toDouble();
68 return transformValues;
73 m_Controls.m_UseOptimizerScalesScaleLogarithmic->setChecked(transformValues[0]);
74 m_Controls.m_ScalesScaleLogarithmicTransformScaleX->setText(QString::number(transformValues[1]));
75 m_Controls.m_ScalesScaleLogarithmicTransformScaleY->setText(QString::number(transformValues[2]));
76 m_Controls.m_ScalesScaleLogarithmicTransformScaleZ->setText(QString::number(transformValues[3]));
81 return "ScaleLogarithmic";
87 QValidator *validatorLineEditInputFloat =
new QDoubleValidator(0, 20000000, 8,
this);
88 m_Controls.m_ScalesScaleLogarithmicTransformScaleX->setValidator(validatorLineEditInputFloat);
89 m_Controls.m_ScalesScaleLogarithmicTransformScaleY->setValidator(validatorLineEditInputFloat);
90 m_Controls.m_ScalesScaleLogarithmicTransformScaleZ->setValidator(validatorLineEditInputFloat);
95 itk::Array<double> scales;
98 if (
m_Controls.m_UseOptimizerScalesScaleLogarithmic->isChecked())
100 scales[0] =
m_Controls.m_ScalesScaleLogarithmicTransformScaleX->text().toDouble();
101 scales[1] =
m_Controls.m_ScalesScaleLogarithmicTransformScaleY->text().toDouble();
102 scales[2] =
m_Controls.m_ScalesScaleLogarithmicTransformScaleZ->text().toDouble();
108 vtkTransform *vtktransform,
109 itk::Array<double> transformParams)
113 for (
unsigned int i = 0; i < transformParams.size(); i++)
115 vtkmatrix->SetElement(i, i, transformParams[i]);
117 vtktransform->SetMatrix(vtkmatrix);
128 m_Controls.m_ScalesScaleLogarithmicTransformScaleZ->hide();
134 m_Controls.m_ScalesScaleLogarithmicTransformScaleZ->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.