forked from RTKConsortium/RTK
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUG: fix wrappings for 1D and double
- Loading branch information
Simon Rit
committed
Apr 16, 2020
1 parent
72ed4df
commit b36a044
Showing
16 changed files
with
157 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
list(FIND ITK_WRAP_IMAGE_DIMS "1" _index) | ||
if (${_index} EQUAL -1) | ||
itk_wrap_class("itk::ContinuousIndex") | ||
itk_wrap_template("${ITKM_D}1" "double, 1") | ||
itk_end_wrap_class() | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,7 @@ | ||
itk_wrap_class("itk::CovariantVector") | ||
list(FIND ITK_WRAP_IMAGE_DIMS "1" _index) | ||
if (${_index} EQUAL -1) | ||
itk_wrap_class("itk::CovariantVector") | ||
itk_wrap_template("${ITKM_D}1" "${ITKT_D}, 1") | ||
itk_end_wrap_class() | ||
endif() | ||
|
||
# Wrap ITK double missing types | ||
if (NOT ITK_WRAP_double) | ||
itk_wrap_template("D1" "${ITKT_D}, 1") | ||
endif() | ||
|
||
# Wrap ITK dimension 1 missing types | ||
list(FIND ITK_WRAP_IMAGE_DIMS "1" _index) | ||
if (${_index} EQUAL -1) | ||
if (ITK_WRAP_double) | ||
itk_wrap_template("D1" "double, 1") | ||
endif() | ||
endif() | ||
|
||
itk_end_wrap_class() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,15 @@ | ||
itk_wrap_class("itk::ContinuousIndex") | ||
|
||
# Wrap ITK double missing types | ||
if (NOT ITK_WRAP_double) | ||
itk_wrap_template("${ITKM_D}1" "${ITKT_D}, 1") | ||
endif() | ||
|
||
# Wrap ITK dimension 1 missing types | ||
list(FIND ITK_WRAP_IMAGE_DIMS "1" _index) | ||
if (${_index} EQUAL -1) | ||
if (ITK_WRAP_double) | ||
itk_wrap_template("${ITKM_D}1" "double, 1") | ||
list(FIND ITK_WRAP_IMAGE_DIMS "1" _index) | ||
if (${_index} EQUAL -1) | ||
itk_wrap_class("itk::ImageBase" POINTER) | ||
# See ITK_DIR/Wrapping/Generators/Python/CMakeLists.txt to understand the next 3 lines | ||
set(ITK_WRAP_PYTHON_SWIG_EXT "${ITK_WRAP_PYTHON_SWIG_EXT}%inline %{\n") | ||
set(ITK_WRAP_PYTHON_SWIG_EXT "${ITK_WRAP_PYTHON_SWIG_EXT}#include \"itkContinuousIndexRTKSwigInterface.h\"\n") | ||
set(ITK_WRAP_PYTHON_SWIG_EXT "${ITK_WRAP_PYTHON_SWIG_EXT}%}\n") | ||
|
||
list(FIND ITK_WRAP_IMAGE_DIMS "1" _index) | ||
if (${_index} EQUAL -1) | ||
itk_wrap_template("1" "1") | ||
endif() | ||
endif() | ||
|
||
itk_end_wrap_class() | ||
itk_wrap_class("itk::ImageBase" POINTER) | ||
|
||
list(FIND ITK_WRAP_IMAGE_DIMS "1" _index) | ||
if (${_index} EQUAL -1) | ||
itk_wrap_template("1" "1") | ||
endif() | ||
itk_end_wrap_class() | ||
endif() | ||
|
||
itk_end_wrap_class() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
itk_wrap_class("itk::ImageDuplicator" POINTER) | ||
# Making sure that all types wrapped in PyBuffer are also wrapped for ImageDuplicator | ||
# as this filter is used in the Python NumPy bridge. | ||
UNIQUE(types "D;UC;US;${WRAP_ITK_REAL}") | ||
list(FIND ITK_WRAP_IMAGE_DIMS "1" _index) | ||
foreach(t ${types}) | ||
if (${_index} EQUAL -1) | ||
itk_wrap_template("I${ITKM_${t}}1" "itk::Image<${ITKT_${t}}, 1>") | ||
endif() | ||
endforeach() | ||
list(FIND ITK_WRAP_IMAGE_DIMS "1" _index) | ||
if (${_index} EQUAL -1) | ||
itk_wrap_class("itk::ImageDuplicator" POINTER) | ||
# Making sure that all types wrapped in PyBuffer are also wrapped for ImageDuplicator | ||
# as this filter is used in the Python NumPy bridge. | ||
UNIQUE(types "D;UC;US;${WRAP_ITK_REAL}") | ||
foreach(t ${types}) | ||
itk_wrap_template("I${ITKM_${t}}1" "itk::Image<${ITKT_${t}}, 1>") | ||
endforeach() | ||
|
||
itk_end_wrap_class() | ||
endif() | ||
|
||
itk_end_wrap_class() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
itk_wrap_class("itk::ImageRegion") | ||
list(FIND ITK_WRAP_IMAGE_DIMS "1" _index) | ||
if (${_index} EQUAL -1) | ||
list(FIND ITK_WRAP_IMAGE_DIMS "1" _index) | ||
if (${_index} EQUAL -1) | ||
itk_wrap_class("itk::ImageRegion") | ||
itk_wrap_template(1 1) | ||
endif() | ||
itk_end_wrap_class() | ||
itk_end_wrap_class() | ||
endif() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,7 @@ | ||
itk_wrap_class("itk::Matrix") | ||
list(FIND ITK_WRAP_IMAGE_DIMS "1" _index) | ||
if (${_index} EQUAL -1) | ||
itk_wrap_class("itk::Matrix") | ||
itk_wrap_template("${ITKM_D}11" "${ITKT_D}, 1, 1") | ||
itk_end_wrap_class() | ||
endif() | ||
|
||
# Wrap ITK double missing types -- | ||
if (NOT ITK_WRAP_double) | ||
itk_wrap_template("D11" "${ITKT_D}, 1, 1") | ||
endif() | ||
|
||
# Wrap ITK dimension 1 missing types | ||
list(FIND ITK_WRAP_IMAGE_DIMS "1" _index) | ||
if (${_index} EQUAL -1) | ||
if (ITK_WRAP_double) | ||
itk_wrap_template("D11" "${ITKT_D}, 1, 1") | ||
endif() | ||
endif() | ||
|
||
itk_end_wrap_class() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,7 @@ | ||
itk_wrap_class("itk::Point") | ||
if (NOT ITK_WRAP_double) | ||
itk_wrap_template("D1" "${ITKT_D}, 1") | ||
endif() | ||
list(FIND ITK_WRAP_IMAGE_DIMS "1" _index) | ||
if (${_index} EQUAL -1) | ||
itk_wrap_class("itk::Point") | ||
itk_wrap_template("${ITKM_D}1" "${ITKT_D}, 1") | ||
itk_end_wrap_class() | ||
endif() | ||
|
||
list(FIND ITK_WRAP_IMAGE_DIMS "1" _index) | ||
if (${_index} EQUAL -1) | ||
if (ITK_WRAP_double) | ||
itk_wrap_template("D1" "double, 1") | ||
endif() | ||
endif() | ||
itk_end_wrap_class() |
9 changes: 6 additions & 3 deletions
9
wrapping/rtkDaubechiesWaveletsDenoiseSequenceImageFilter.wrap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
itk_wrap_class("rtk::DaubechiesWaveletsDenoiseSequenceImageFilter" POINTER) | ||
itk_wrap_image_filter("${WRAP_ITK_REAL}" 1 4) | ||
itk_end_wrap_class() | ||
list(FIND ITK_WRAP_IMAGE_DIMS "4" _index) | ||
if (NOT ${_index} EQUAL -1) | ||
itk_wrap_class("rtk::DaubechiesWaveletsDenoiseSequenceImageFilter" POINTER) | ||
itk_wrap_image_filter("${WRAP_ITK_REAL}" 1 4) | ||
itk_end_wrap_class() | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
itk_wrap_class("rtk::ElektaSynergyRawLookupTableImageFilter" POINTER) | ||
itk_wrap_image_filter("${US}" 2 2+) | ||
foreach(d 2 3) | ||
itk_wrap_template("IUS${d}IUS${d}" "itk::Image<${ITKT_US}, ${d}>, itk::Image<${ITKT_US}, ${d}>") | ||
endforeach() | ||
itk_end_wrap_class() |
Oops, something went wrong.