How to convert 3D rgb to grascale

Hello Folks, I’m searching for how to convert my 3D data to grayscale. I can’t find how on the documentation. Thanks in advance.

ConvertRGBImageToGrayscaleImage example is the first hit for Google search itk rgb to grayscale.

1 Like

Thanks for the answer, but does it work as well for 3D

Yes, it should work just as well for 3D or other nD images.

1 Like


Unfortunately, this does not work on my 3D data.

Did you change Dimension = 2 into Dimension = 3? If so, what is the problem?

1 Like

It works. thanks a lot.