View Full Version : Color Space Filter

March 14, 2007, 17:55:50
I am trying to write a filter that will convert a color image to RGB8 or Y800 in C#, VS 05. I'm going off of the binarization filter as a template. I have:

public override void GetSupportedInputTypes(System.Collections.ArrayLis t frameTypes)
frameTypes.Add(new TIS.Imaging.FrameType(TIS.Imaging.MediaSubtypes.RG B24));

for the input types. What should the code look like if I wanted to add RGB8 as an Output Type in GetTransformOutputTypes() ?



Sascha Schmidt
March 15, 2007, 10:56:23
It have to be done in the same way as for the InputTypes:

public override bool GetTransformOutputTypes(TIS.Imaging.FrameType inType, System.Collections.ArrayList outTypes)
outTypes.Add(new TIS.Imaging.FrameType(TIS.Imaging.MediaSubtypes.RG B8, inType.Width, inType.Height, inType.Width * inType.Height));
outTypes.Add(new TIS.Imaging.FrameType(TIS.Imaging.MediaSubtypes.Y8 00, inType.Width, inType.Height, inType.Width * inType.Height));
return true;

March 15, 2007, 15:23:29
Thank you very much.