/// <summary> /// Execute actual transformation. /// </summary> /// <param name="parameterMaps">parameter maps</param> /// <param name="channel">image channel as grayscale image</param> /// <returns></returns> private sitk.Image ExecuteTransform(sitk.VectorOfParameterMap parameterMaps, sitk.Image channel) { using (sitk.TransformixImageFilter transformix = new sitk.TransformixImageFilter()) { transformix.SetTransformParameterMap(parameterMaps); transformix.SetMovingImage(channel); transformix.SetLogToConsole(true); transformix.SetOutputDirectory(ApplicationContext.OutputPath); return(transformix.Execute()); } }