File: itkPhasedArray3DSpecialCoordinatesImage.wrap

package info (click to toggle)
insighttoolkit5 5.4.3-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 704,384 kB
  • sloc: cpp: 783,592; ansic: 628,724; xml: 44,704; fortran: 34,250; python: 22,874; sh: 4,078; pascal: 2,636; lisp: 2,158; makefile: 464; yacc: 328; asm: 205; perl: 203; lex: 146; tcl: 132; javascript: 98; csh: 81
file content (54 lines) | stat: -rw-r--r-- 2,204 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
itk_wrap_include("complex")

# Explicitly override template method wrappings so that implicit
# scalar type is always `double` for greatest precision.
# Adds wrapping overrides to `itkPhasedArray3DSpecialCoordinatesImage_ext.i` configured with
# CMake for input to SWIG wrapping generation.
# See `DECL_PYTHON_IMAGEBASE_CLASS` definition in `ITK/Wrapping/Generators/Python/PyBase/pyBase.i`
# for precedent.
string(
  APPEND
  ITK_WRAP_PYTHON_SWIG_EXT
  "
%inline %{
#include \"itkContinuousIndexSwigInterface.h\"
%}

%define DECL_PYTHON_PHASEDARRAY3DSPECIALCOORDINATESIMAGE_CLASS(swig_name, template_params)

  %extend swig_name {
      itkIndex##template_params TransformPhysicalPointToIndex(const itkPointD##template_params & point ) {
          return self->TransformPhysicalPointToIndex<double>( point );
        }

      itkContinuousIndexD##template_params TransformPhysicalPointToContinuousIndex(const itkPointD##template_params & point ) {
          return self->TransformPhysicalPointToContinuousIndex<double>( point );
      }

      itkPointD##template_params TransformContinuousIndexToPhysicalPoint(const itkContinuousIndexD##template_params & idx ) {
          return self->TransformContinuousIndexToPhysicalPoint<double>( idx );
      }

      itkPointD##template_params TransformIndexToPhysicalPoint(const itkIndex##template_params & idx ) {
          return self->TransformIndexToPhysicalPoint<double>( idx );
      }
  }

%enddef
")

# Wrap class for real and complex pixel types. Dimension is always 3.
itk_wrap_class("itk::PhasedArray3DSpecialCoordinatesImage" POINTER_WITH_SUPERCLASS)
foreach(t ${WRAP_ITK_SCALAR})
  itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}")
  string(APPEND ITK_WRAP_PYTHON_SWIG_EXT
         "DECL_PYTHON_PHASEDARRAY3DSPECIALCOORDINATESIMAGE_CLASS(${WRAPPER_SWIG_NAME}${ITKM_${t}}, 3)\n")
endforeach()
foreach(t3 ${WRAP_ITK_COMPLEX_REAL})
  itk_wrap_template("${ITKM_${t3}}" "${ITKT_${t3}}")
  string(APPEND ITK_WRAP_PYTHON_SWIG_EXT
         "DECL_PYTHON_PHASEDARRAY3DSPECIALCOORDINATESIMAGE_CLASS(${WRAPPER_SWIG_NAME}${ITKM_${t3}}, 3)\n")
endforeach()
itk_end_wrap_class()

# Then wrap consuming filters in itkPhasedArray3DSpecialCoordinatesImageFilters.wrap