@@ -95,30 +95,20 @@ class ITK_TEMPLATE_EXPORT DisplacementFieldToBSplineImageFilter : public ImageTo
9595 using ArrayType = typename BSplineFilterType::ArrayType;
9696
9797 /* * Set the displacement field */
98- void
99- SetDisplacementField (const InputFieldType * field)
100- {
101- this ->SetInput (0 , field);
102- }
98+ itkSetInputMacro (DisplacementField, InputFieldType);
10399
104100 /* * Get the input displacement field. */
105- const InputFieldType *
106- GetDisplacementField () const
107- {
108- return this ->GetInput (0 );
109- }
101+ itkGetInputMacro (DisplacementField, InputFieldType);
110102
111103 /* *
112104 * Set confidence image function. If a confidence image is specified,
113105 * estimation of the displacement field weights the contribution of each voxel
114106 * according the value of the corresponding voxel in the confidence image.
115107 */
116108 /* * @ITKStartGrouping */
117- void
118- SetConfidenceImage (const RealImageType * image)
119- {
120- this ->SetNthInput (1 , const_cast <RealImageType *>(image));
121- }
109+ itkSetInputMacro (ConfidenceImage, RealImageType);
110+ itkGetInputMacro (ConfidenceImage, RealImageType);
111+
122112 void
123113 SetInput1 (const RealImageType * image)
124114 {
@@ -127,33 +117,18 @@ class ITK_TEMPLATE_EXPORT DisplacementFieldToBSplineImageFilter : public ImageTo
127117 /* * @ITKEndGrouping */
128118
129119 /* * Get confidence image function. */
130- const RealImageType *
131- GetConfidenceImage () const
132- {
133- return static_cast <const RealImageType *>(this ->ProcessObject ::GetInput (1 ));
134- }
135120
136121 /* * Set the input point set */
137122 /* * @ITKStartGrouping */
138- void
139- SetPointSet (const InputPointSetType * points)
140- {
141- this ->SetNthInput (2 , const_cast <InputPointSetType *>(points));
142- }
123+ itkSetInputMacro (PointSet, InputPointSetType);
124+ itkGetInputMacro (PointSet, InputPointSetType);
143125 void
144126 SetInput2 (const InputPointSetType * points)
145127 {
146128 this ->SetPointSet (points);
147129 }
148130 /* * @ITKEndGrouping */
149131
150- /* * Get the input point set. */
151- const InputPointSetType *
152- GetPointSet () const
153- {
154- return static_cast <const InputPointSetType *>(this ->ProcessObject ::GetInput (2 ));
155- }
156-
157132 /* * Set the confidence weights associated with the input point set*/
158133 void
159134 SetPointSetConfidenceWeights (WeightsContainerType * weights);
0 commit comments