public Bitmap Render(IImageSpace3D <float, float> source_image) { Bitmap destination_image = new Bitmap(resolution_x, resolution_y); float[] coordinates_y = ToolsCollection.Copy(render_origen); for (int index_y = 0; index_y < resolution_x; index_y++) { ToolsMathCollection.AddRBA <float>(algebra, coordinates_y, render_stride_y, coordinates_y); float[] coordinates_x = ToolsCollection.Copy(coordinates_y); for (int index_x = 0; index_x < resolution_y; index_x++) { float[] coordinates_z = ToolsCollection.Copy(coordinates_x); float max_value = source_image.GetLocationValue(coordinates_z); ToolsMathCollection.AddRBA(algebra, coordinates_z, render_stride_z, coordinates_z); for (int index_z = 1; index_z < resolution_z; index_z++) { float value = source_image.GetLocationValue(coordinates_z); if (this.comparer.Compare(max_value, value) == -1) { max_value = value; } ToolsMathCollection.AddRBA(algebra, coordinates_z, render_stride_z, coordinates_z); } destination_image.SetPixel(index_x, index_y, this.converter.Compute(max_value)); ToolsMathCollection.AddRBA(algebra, coordinates_x, render_stride_x, coordinates_x); } } return(destination_image); }
protected override float Projection(float[] origen, float[] stride_size, int stride_count, IImageSpace3D <float, float> source_image) { float[] coordinates = ToolsCollection.Copy(origen); for (int index_z = 0; index_z < stride_count; index_z++) { float value = source_image.GetLocationValue(coordinates); if (this.comparer.Compare(value, min_value) == 1) { return(value); } ToolsMathCollection.AddRBA(algebra, coordinates, stride_size, coordinates); } return(min_value); }