File tree Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,20 @@ class ITK_TEMPLATE_EXPORT Transform : public TransformBaseTemplate<TParametersVa
115
115
return VOutputDimension;
116
116
}
117
117
118
+
119
+ /* For storing the name of InputSpace */
120
+ itkSetMacro (InputSpaceName, std::string);
121
+ itkGetConstReferenceMacro (InputSpaceName, std::string);
122
+
123
+ /* * For storing the name of InputSpace/OutputSpace.
124
+
125
+ InputSpaceName, OutputSpaceName provide identifiers for the world spaces
126
+ that the transform applied to and the direction of the spatial transformation.
127
+ The direction of the transform goes from the input space to output space.
128
+ Typical values include the names of an atlas or a dataset. */
129
+ itkSetMacro (OutputSpaceName, std::string);
130
+ itkGetConstReferenceMacro (OutputSpaceName, std::string);
131
+
118
132
/* * Type of the input parameters. */
119
133
using typename Superclass::FixedParametersType;
120
134
using typename Superclass::FixedParametersValueType;
@@ -593,6 +607,9 @@ class ITK_TEMPLATE_EXPORT Transform : public TransformBaseTemplate<TParametersVa
593
607
const InverseJacobianPositionType &) const ;
594
608
595
609
private:
610
+ std::string m_InputSpaceName;
611
+ std::string m_OutputSpaceName;
612
+
596
613
template <typename TType>
597
614
static std::string
598
615
GetTransformTypeAsString (TType *)
Original file line number Diff line number Diff line change 18
18
19
19
#include < iostream>
20
20
#include < set>
21
-
21
+ # include " itkTestingMacros.h "
22
22
#include " itkTransform.h"
23
23
24
24
namespace itk
@@ -308,6 +308,15 @@ class TransformTester
308
308
transform->Print (std::cout);
309
309
std::cout << transform->GetNameOfClass () << std::endl;
310
310
311
+ transform->SetObjectName (" test_transform" );
312
+ ITK_TEST_EXPECT_EQUAL (std::string (" test_transform" ), transform->GetObjectName ());
313
+
314
+ transform->SetInputSpaceName (" test_inputspace" );
315
+ ITK_TEST_EXPECT_EQUAL (std::string (" test_inputspace" ), transform->GetInputSpaceName ());
316
+
317
+ transform->SetOutputSpaceName (" test_outputspace" );
318
+ ITK_TEST_EXPECT_EQUAL (std::string (" test_outputspace" ), transform->GetOutputSpaceName ());
319
+
311
320
// Test streaming enumeration for TransformBaseTemplateEnums::TransformCategory elements
312
321
const std::set<itk::TransformBaseTemplateEnums::TransformCategory> allTransformCategory{
313
322
itk::TransformBaseTemplateEnums::TransformCategory::UnknownTransformCategory,
You can’t perform that action at this time.
0 commit comments