Using sitk::VectorConfidenceConnected on DICOM

Is there possible to use sitk::VectorConfidenceConnected filter on DICOM files ? Why I am asking that: because anyway I have tried to use it, I got

sitk::ERROR: Pixel type: complex of XX-bit float is not supported in 3D byclass itk::simple::VectorConfidenceConnectedImageFilter

I have tried:

sitk::Image imgTemp(img);
... apply another filters
img = sitk::Cast(sitk::VectorConfidenceConnected(sitk::Cast(imgTemp, sitk::PixelIDValueEnum::sitkInt16), seed, 3, 3, 1, 255), sitk::PixelIDValueEnum::sitkInt16);

or

img = sitk::VectorConfidenceConnected(sitk::Cast(imgTemp, sitk::PixelIDValueEnum::sitkInt16), seed, 3, 3, 1, 255);

or

img = sitk::Cast(sitk::VectorConfidenceConnected(imgTemp, seed, 3, 3, 1, 255), sitk::PixelIDValueEnum::sitkInt16);

All of these tests gave me that error.

Hello @flaviu2,

The VectorConfidenceConnectedImageFilter is intended for use with multi-channel images (pixels are vectors - hence the name). The corresponding class for single channel images is ConfidenceConnectedImageFilter, please use that.

2 Likes

Ok, thank you for clarification.