Skip to content

Commit

Permalink
BUG: Do not wrap unsigned char for connected component output
Browse files Browse the repository at this point in the history
Often the generated labels exceed 255.
  • Loading branch information
thewtex committed Jul 29, 2020
1 parent a1e778b commit f3e3286
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ itk_wrap_class("itk::ConnectedComponentImageFilter" POINTER)
# Create wrappers from every selected integral (signed and un) type to every
# selected unsigned type. Also force ulong output for the watershed filter.
UNIQUE(to_types "UL;${WRAP_ITK_INT}")
# Supports too few labels.
list(REMOVE_ITEM to_types "UC")
itk_wrap_image_filter_combinations("${WRAP_ITK_INT}" "${to_types}" 2+)
itk_wrap_image_filter_combinations("${WRAP_ITK_VECTOR}" "${WRAP_ITK_INT}" 2+)
itk_end_wrap_class()
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@ itk_wrap_class("itk::HardConnectedComponentImageFilter" POINTER)
# Create wrappers from every selected integral (signed and un) type to every
# selected unsigned type. Also force ulong output for the watershed filter.
UNIQUE(to_types "UL;${WRAP_ITK_INT}")
# Supports too few labels.
list(REMOVE_ITEM to_types "UC")
itk_wrap_image_filter_combinations("${WRAP_ITK_INT}" "${to_types}")
itk_end_wrap_class()
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
itk_wrap_class("itk::ScalarConnectedComponentImageFilter" POINTER_WITH_SUPERCLASS)
itk_wrap_image_filter("${WRAP_ITK_INT}" 2 2+)
UNIQUE(to_types "UL;${WRAP_ITK_INT}")
# Supports too few labels.
list(REMOVE_ITEM to_types "UC")
itk_wrap_image_filter_combinations("${WRAP_ITK_INT}" "${to_types}" 2+)
itk_end_wrap_class()

0 comments on commit f3e3286

Please sign in to comment.