Feature extraction in 2D image

I have image and mask in float64.
When I try to cast mask in INT32vit gives me error.
sitk_mask = sitk.Cast(sitk_mask, sitk.sitkInt32)

Error is as:
sitk::ERROR: Filter does not support casting from casting 64-bit float to 32-bit signed integer

how to correct this? Please help. Thanks.

1 Like

Have you tried a web search for this error?

Does this help? SimpleITK not working with any data type, be it 3D or 2D · Issue #592 · SimpleITK/SimpleITK · GitHub