/** * Simulate the output of a BMode probe. * * TestProbeOutput -> BModeOutputImageDecoder -> TextureSource */ public static ITextureSource BuildWithFakeBModeProbeOutput() { IProbeOutput fakeProbeOutput = new TestProbeOutput(); IImageSource imageSource = new BModeOutputImageDecoder(fakeProbeOutput); return(new TextureSource(imageSource)); }
/** * Sets up a standard HORAY configuration: * * probe -> HorayProbeOutput -> BModeOutputImageDecoder (+blur) -> TextureSource */ public static ITextureSource BuildStandardHORAYConfig() { GameObject probe = GameObject.FindGameObjectWithTag("Probe"); UltrasoundDebug.Assert(null != probe, "No object with Probe tag in scene.", new DisplayTexturePipelineFactory()); IProbeOutput horayOutput = new HorayProbeOutput(probe); IImageSource bmodeImageDecoder = new BModeOutputImageDecoder(horayOutput); bmodeImageDecoder.AddPostProcessingEffect(new GrayscaleGaussianBlur()); return(new TextureSource(bmodeImageDecoder)); }