Skip to content

Commit

Permalink
ENH: Add option to access index in point set registration
Browse files Browse the repository at this point in the history
- Add superclass to PointSetToPointSetMetricv4 to permit index based
  access in GetLocalNeighborhodXXX methods.
- Fix python wrapping.
  • Loading branch information
samuelgerber authored and dzenanz committed Mar 13, 2021
1 parent 2b34388 commit b6a142a
Show file tree
Hide file tree
Showing 12 changed files with 1,256 additions and 944 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace itk
*
* \ingroup ITKOptimizersv4
*/
template <typename TInternalComputationValueType>
template <typename TInternalComputationValueType = double>
class ITK_TEMPLATE_EXPORT RegularStepGradientDescentOptimizerv4
: public GradientDescentOptimizerv4Template<TInternalComputationValueType>
{
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

328 changes: 44 additions & 284 deletions Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricv4.h

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ itk_wrap_include("itkDefaultStaticMeshTraits.h")

UNIQUE(types "${WRAP_ITK_SCALAR};D")

itk_wrap_class("itk::EuclideanDistancePointSetToPointSetMetricv4" POINTER_WITH_SUPERCLASS)
itk_wrap_class("itk::EuclideanDistancePointSetToPointSetMetricv4" POINTER_WITH_2_SUPERCLASSES)
foreach(d ${ITK_WRAP_IMAGE_DIMS})
foreach(t ${types})
itk_wrap_template("PS${ITKM_${t}}${d}" "itk::PointSet< ${ITKT_${t}},${d} >")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ itk_wrap_include("itkDefaultStaticMeshTraits.h")

UNIQUE(types "${WRAP_ITK_SCALAR};D")

itk_wrap_class("itk::ExpectationBasedPointSetToPointSetMetricv4" POINTER)
itk_wrap_class("itk::ExpectationBasedPointSetToPointSetMetricv4" POINTER_WITH_2_SUPERCLASSES)
foreach(d ${ITK_WRAP_IMAGE_DIMS})
foreach(t ${types})
itk_wrap_template("PS${ITKM_${t}}${d}" "itk::PointSet< ${ITKT_${t}},${d} >")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ itk_wrap_include("itkDefaultStaticMeshTraits.h")

UNIQUE(types "${WRAP_ITK_SCALAR};D")

itk_wrap_class("itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4" POINTER)
itk_wrap_class("itk::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4" POINTER_WITH_2_SUPERCLASSES)
foreach(d ${ITK_WRAP_IMAGE_DIMS})
foreach(t ${types})
itk_wrap_template("PS${ITKM_${t}}${d}" "itk::PointSet< ${ITKT_${t}},${d} >")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ itk_wrap_include("itkDefaultStaticMeshTraits.h")

UNIQUE(types "${WRAP_ITK_INT}")

itk_wrap_class("itk::LabeledPointSetToPointSetMetricv4" POINTER)
itk_wrap_class("itk::LabeledPointSetToPointSetMetricv4" POINTER_WITH_2_SUPERCLASSES)
foreach(d ${ITK_WRAP_IMAGE_DIMS})
foreach(t ${types})
itk_wrap_template("PS${ITKM_${t}}${d}" "itk::PointSet< ${ITKT_${t}},${d} >")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
itk_wrap_include("itkPointSet.h")
itk_wrap_include("itkDefaultStaticMeshTraits.h")

UNIQUE(types "${WRAP_ITK_SCALAR};D")

itk_wrap_class("itk::PointSetToPointSetMetricWithIndexv4" POINTER_WITH_SUPERCLASS)
foreach(d ${ITK_WRAP_IMAGE_DIMS})
foreach(t ${types})
itk_wrap_template("PS${ITKM_${t}}${d}" "itk::PointSet< ${ITKT_${t}},${d} >")
endforeach()
endforeach()
itk_end_wrap_class()
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
itk_wrap_include("itkPointSet.h")
itk_wrap_include("itkDefaultStaticMeshTraits.h")

UNIQUE(types "${WRAP_ITK_SCALAR};D")

itk_wrap_class("itk::PointSetToPointSetMetricv4" POINTER_WITH_2_SUPERCLASSES)
foreach(d ${ITK_WRAP_IMAGE_DIMS})
foreach(t ${types})
itk_wrap_template("PS${ITKM_${t}}${d}" "itk::PointSet< ${ITKT_${t}},${d} >")
endforeach()
endforeach()
itk_end_wrap_class()
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "itkObjectToObjectMultiMetricv4.h"
#include "itkObjectToObjectOptimizerBase.h"
#include "itkImageToImageMetricv4.h"
#include "itkPointSetToPointSetMetricv4.h"
#include "itkPointSetToPointSetMetricWithIndexv4.h"
#include "itkShrinkImageFilter.h"
#include "itkIdentityTransform.h"
#include "itkTransformParametersAdaptorBase.h"
Expand Down Expand Up @@ -173,7 +173,7 @@ class ITK_TEMPLATE_EXPORT ImageRegistrationMethodv4 : public ProcessObject

using MultiMetricType = ObjectToObjectMultiMetricv4<ImageDimension, ImageDimension, VirtualImageType, RealType>;
using ImageMetricType = ImageToImageMetricv4<FixedImageType, MovingImageType, VirtualImageType, RealType>;
using PointSetMetricType = PointSetToPointSetMetricv4<PointSetType, PointSetType, RealType>;
using PointSetMetricType = PointSetToPointSetMetricWithIndexv4<PointSetType, PointSetType, RealType>;

using FixedImageMaskType = typename ImageMetricType::FixedImageMaskType;
using FixedImageMaskConstPointer = typename FixedImageMaskType::ConstPointer;
Expand Down

0 comments on commit b6a142a

Please sign in to comment.