Using VectorConfidenceConnected

I have tried to use sitk::VectorConfidenceConnected with sitk::Image retrieved from a dicom images:

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

But after I used all kind of sitk::PixelIDValueEnum, I got the following error:

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

My question is, there any way to use this filter on DICOM images ?

This is a question for ITK/SimpleITK forum, but to quickly answer here: you need to cast the image to a supported pixel type before passing it to SimpleITK.

1 Like

Because of my tired, I’ve tangled the forums :slight_smile: Sorry.