Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH: Add ULL type to ConnectedComponentImageFilter wrapping
Currently, by default, ConnectedComponentImageFilter can output: US, SS, and UL pixel types, while RelabelComponentImageFilter does not accept UL as input, and accepts US, SS, and ULL (IdentifierType). Cast filter is also not wrapped for UL -> ULL conversion. That makes the following code unworkable: # components = itk.connected_component_image_filter(foreground, fully_connected=True) # over 32K labels ul_type = itk.Image[itk.UL, 3] cc_filter = itk.ConnectedComponentImageFilter[type(foreground), ul_type].New(foreground) cc_filter.SetFullyConnected(True) cc_filter.Update() components = cc_filter.GetOutput() sorted_components = itk.relabel_component_image_filter(components.astype(itk.ULL))
- Loading branch information