Skip to content

Commit d473b99

Browse files
committed
Merge branch 'bug-15852-u7-platformproject_enable_easy_conversion_of_datatypes'
2 parents faa0f7c + 2556a99 commit d473b99

File tree

182 files changed

+14711
-13411
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

182 files changed

+14711
-13411
lines changed

Core/Code/Algorithms/mitkTimeHelper.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ void GenerateTimeInInputRegion(const mitk::TimeGeometry *outputTimeGeometry, con
3434
// convert the start-index-time of output in start-index-time of input via millisecond-time
3535
mitk::TimePointType timeInMS = outputTimeGeometry->TimeStepToTimePoint(outputRegion.GetIndex(3));
3636
mitk::TimeStepType timestep = inputTimeGeometry->TimePointToTimeStep( timeInMS );
37-
if( ( timeInMS > ScalarTypeNumericTraits::NonpositiveMin() ) && ( inputTimeGeometry->IsValidTimeStep( timestep ) ) )
37+
if( ( timeInMS > itk::NumericTraits<mitk::ScalarType>::NonpositiveMin() ) && ( inputTimeGeometry->IsValidTimeStep( timestep ) ) )
3838
inputRegion.SetIndex( 3, timestep );
3939
else
4040
inputRegion.SetIndex( 3, 0 );
4141
// convert the end-index-time of output in end-index-time of input via millisecond-time
4242
timeInMS = outputTimeGeometry->TimeStepToTimePoint(outputRegion.GetIndex(3)+outputRegion.GetSize(3)-1);
4343
timestep = inputTimeGeometry->TimePointToTimeStep( timeInMS );
44-
if( ( timeInMS > ScalarTypeNumericTraits::NonpositiveMin() ) && ( outputTimeGeometry->IsValidTimeStep( timestep ) ) )
44+
if( ( timeInMS > itk::NumericTraits<mitk::ScalarType>::NonpositiveMin() ) && ( outputTimeGeometry->IsValidTimeStep( timestep ) ) )
4545
inputRegion.SetSize( 3, timestep - inputRegion.GetIndex(3) + 1 );
4646
else
4747
inputRegion.SetSize( 3, 1 );

Core/Code/Controllers/mitkRenderingManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ See LICENSE.txt or http://www.mitk.org for details.
2525
#include <vtkRenderWindow.h>
2626

2727
#include <itkCommand.h>
28-
#include "mitkVector.h"
28+
#include "mitkNumericTypes.h"
2929
#include <itkAffineGeometryFrame.h>
3030
#include <itkScalableAffineTransform.h>
3131
#include <mitkVtkPropRenderer.h>

Core/Code/Controllers/mitkSliceNavigationController.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ ::ExecuteAction( Action* action, StateEvent const* stateEvent )
789789
// get the position and gray value from the image and build up status bar text
790790
if(image3D.IsNotNull())
791791
{
792-
Index3D p;
792+
itk::Index<3> p;
793793
image3D->GetGeometry()->WorldToIndex(worldposition, p);
794794
stream.precision(2);
795795
stream<<"Position: <" << std::fixed <<worldposition[0] << ", " << std::fixed << worldposition[1] << ", " << std::fixed << worldposition[2] << "> mm";

Core/Code/Controllers/mitkSlicesRotator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ See LICENSE.txt or http://www.mitk.org for details.
2222
#pragma GCC visibility push(default)
2323
#include <itkEventObject.h>
2424
#pragma GCC visibility pop
25-
#include <mitkVector.h>
25+
#include <mitkNumericTypes.h>
2626

2727
namespace mitk {
2828

Core/Code/Controllers/mitkSlicesSwiveller.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ See LICENSE.txt or http://www.mitk.org for details.
1919
#define SLICESSWIVELLER_H_HEADER_INCLUDED
2020

2121
#include <mitkSlicesCoordinator.h>
22-
#include <mitkVector.h>
22+
#include <mitkNumericTypes.h>
2323

2424
#pragma GCC visibility push(default)
2525
#include <itkEventObject.h>

Core/Code/Controllers/mitkStepper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ See LICENSE.txt or http://www.mitk.org for details.
2020

2121
#include <MitkCoreExports.h>
2222
#include <mitkCommon.h>
23-
#include "mitkVector.h"
23+
#include "mitkNumericTypes.h"
2424

2525
#include <itkObject.h>
2626
#include <itkObjectFactory.h>

Core/Code/DataManagement/itkVtkAbstractTransform.txx

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ See LICENSE.txt or http://www.mitk.org for details.
1616

1717
#include "itkVtkAbstractTransform.h"
1818
#include <vtkAbstractTransform.h>
19-
#include <mitkVector.h>
19+
#include <mitkNumericTypes.h>
2020

2121
namespace itk {
2222

@@ -78,7 +78,7 @@ TransformPoint(const InputPointType &point) const
7878

7979
OutputPointType outputpoint;
8080
vnl_vector<TScalarType> vnl_vec;
81-
double vtkpt[3];
81+
mitk::ScalarType vtkpt[3];
8282
mitk::itk2vtk(point, vtkpt);
8383
m_VtkAbstractTransform->TransformPoint(vtkpt, vtkpt);
8484
mitk::vtk2itk(vtkpt, outputpoint);
@@ -96,9 +96,9 @@ TransformVector(const InputVectorType &vect) const
9696

9797
OutputVectorType outputvector;
9898
vnl_vector<TScalarType> vnl_vec;
99-
double vtkpt[3]={0,0,0};
100-
double vtkvec[3];
101-
mitk::vnl2vtk<TScalarType, double>(vect.GetVnlVector(), vtkvec);
99+
mitk::ScalarType vtkpt[3]={0,0,0};
100+
mitk::ScalarType vtkvec[3];
101+
mitk::vnl2vtk<TScalarType, mitk::ScalarType>(vect.GetVnlVector(), vtkvec);
102102
m_VtkAbstractTransform->TransformVectorAtPoint(vtkpt, vtkvec, vtkvec);
103103
mitk::vtk2itk(vtkvec, outputvector);
104104
return outputvector;
@@ -114,9 +114,9 @@ TransformVector(const InputVnlVectorType &vect) const
114114
assert(m_VtkAbstractTransform!=NULL);
115115

116116
OutputVnlVectorType outputvector;
117-
double vtkpt[3]={0,0,0};
118-
double vtkvec[3];
119-
mitk::vnl2vtk<TScalarType, double>(vect, vtkvec);
117+
mitk::ScalarType vtkpt[3]={0,0,0};
118+
mitk::ScalarType vtkvec[3];
119+
mitk::vnl2vtk<TScalarType, mitk::ScalarType>(vect, vtkvec);
120120
m_VtkAbstractTransform->TransformVectorAtPoint(vtkpt, vtkvec, vtkvec);
121121
mitk::vtk2itk(vtkvec, outputvector);
122122
return outputvector;
@@ -133,7 +133,7 @@ TransformCovariantVector(const InputCovariantVectorType &/*vec*/) const
133133

134134
// for (unsigned int i = 0; i < NDimensions; i++)
135135
// {
136-
// result[i] = NumericTraits<ScalarType>::Zero;
136+
// result[i] = NumericTraits<mitk::ScalarType>::Zero;
137137
// for (unsigned int j = 0; j < NDimensions; j++)
138138
// {
139139
// result[i] += m_Inverse[j][i]*vec[j]; // Inverse transposed
@@ -151,7 +151,7 @@ BackTransform(const OutputPointType &point) const
151151
assert(m_VtkAbstractTransform!=NULL);
152152

153153
OutputPointType outputpoint;
154-
double vtkpt[3];
154+
mitk::ScalarType vtkpt[3];
155155
mitk::itk2vtk(point, vtkpt);
156156
m_InverseVtkAbstractTransform->TransformPoint(vtkpt, vtkpt);
157157
mitk::vtk2itk(vtkpt, outputpoint);
@@ -167,8 +167,8 @@ BackTransform(const OutputVectorType &vect ) const
167167
assert(m_VtkAbstractTransform!=NULL);
168168

169169
OutputVectorType outputvector;
170-
double vtkpt[3]={0,0,0};
171-
double vtkvec[3];
170+
mitk::ScalarType vtkpt[3]={0,0,0};
171+
mitk::ScalarType vtkvec[3];
172172
mitk::itk2vtk(vect, vtkvec);
173173
m_InverseVtkAbstractTransform->TransformVectorAtPoint(vtkpt, vtkvec, vtkvec);
174174
mitk::vtk2itk(vtkvec, outputvector);
@@ -184,8 +184,8 @@ BackTransform(const OutputVnlVectorType &vect ) const
184184
assert(m_InverseVtkAbstractTransform!=NULL);
185185

186186
OutputVnlVectorType outputvector;
187-
double vtkpt[3]={0,0,0};
188-
double vtkvec[3];
187+
mitk::ScalarType vtkpt[3]={0,0,0};
188+
mitk::ScalarType vtkvec[3];
189189
mitk::itk2vtk(vect, vtkvec);
190190
m_InverseVtkAbstractTransform->TransformVectorAtPoint(vtkpt, vtkvec, vtkvec);
191191
mitk::vtk2itk(vtkvec, outputvector);
@@ -201,7 +201,7 @@ BackTransform(const OutputCovariantVectorType &vec) const
201201
itkExceptionMacro( << "implement before using!" );
202202
// for (unsigned int i = 0; i < NDimensions; i++)
203203
// {
204-
// result[i] = NumericTraits<ScalarType>::Zero;
204+
// result[i] = NumericTraits<mitk::ScalarType>::Zero;
205205
// for (unsigned int j = 0; j < NDimensions; j++)
206206
// {
207207
// result[i] += m_Matrix[j][i]*vec[j]; // Direct matrix transposed

Core/Code/DataManagement/mitkAbstractTransformGeometry.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ mitk::ScalarType mitk::AbstractTransformGeometry::GetParametricExtentInMM(int di
5858
return m_Plane->GetExtentInMM(direction);
5959
}
6060

61-
const mitk::Transform3D* mitk::AbstractTransformGeometry::GetParametricTransform() const
61+
const itk::Transform<mitk::ScalarType, 3, 3>* mitk::AbstractTransformGeometry::GetParametricTransform() const
6262
{
6363
return m_ItkVtkAbstractTransform;
6464
}

Core/Code/DataManagement/mitkAbstractTransformGeometry.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ namespace mitk {
123123

124124
virtual mitk::ScalarType GetParametricExtentInMM(int direction) const;
125125

126-
virtual const Transform3D* GetParametricTransform() const;
126+
virtual const itk::Transform<mitk::ScalarType, 3, 3>* GetParametricTransform() const;
127127

128128
//##Documentation
129129
//## @brief Change the parametric bounds to @a oversampling times
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*===================================================================
2+
3+
The Medical Imaging Interaction Toolkit (MITK)
4+
5+
Copyright (c) German Cancer Research Center,
6+
Division of Medical and Biological Informatics.
7+
All rights reserved.
8+
9+
This software is distributed WITHOUT ANY WARRANTY; without
10+
even the implied warranty of MERCHANTABILITY or FITNESS FOR
11+
A PARTICULAR PURPOSE.
12+
13+
See LICENSE.txt or http://www.mitk.org for details.
14+
15+
===================================================================*/
16+
17+
18+
#ifndef MITKAFFINETRANSFORM3D_H_
19+
#define MITKAFFINETRANSFORM3D_H_
20+
21+
22+
#include <itkAffineGeometryFrame.h>
23+
24+
namespace mitk
25+
{
26+
typedef itk::AffineGeometryFrame<ScalarType, 3>::TransformType AffineTransform3D;
27+
}
28+
29+
30+
31+
#endif /* MITKAFFINETRANSFORM3D_H_ */

0 commit comments

Comments
 (0)