public ImageRaster2DWrapperImageSpace4D(IImageSpace <float, RangeType> image, float[] offset, float[] spaceing_0, float[] spaceing_1)
        {
            if (wrapped_image.DimensionCount != 4)
            {
                throw new Exception();
            }

            this.wrapped_image = image;
            this.offset        = ToolsCollection.Copy(offset);
            this.spaceing_0    = ToolsCollection.Copy(spaceing_0);
            this.spaceing_1    = ToolsCollection.Copy(spaceing_1);
        }
Example #2
0
        public IImageRaster2D <float> Render(IImageSpace <float, float> source_image)
        {
            IImageRaster2D <float> destination_image = new ImageRaster2D <float>();

            float[] coordinates = new float [render_origen.Length];
            for (int index_y = 0; index_y < this.resolution_y; index_y++)
            {
                for (int index_x = 0; index_x < this.resolution_x; index_x++)
                {
                    ToolsCollection.CopyRBA(this.render_origen, coordinates);
                    for (int index_dimension = 0; index_dimension < this.dimension_count; index_dimension++)
                    {
                        coordinates[index_dimension] += (render_stride_x[index_dimension] * index_x) + (render_stride_y[index_dimension] * index_y);
                    }
                    destination_image.SetElementValue(index_x, index_y, source_image.GetLocationValue(coordinates));
                }
            }
            return(destination_image);
        }
Example #3
0
 public IImageRaster <IRaster2DInteger, RangeType> Render(IImageSpace <float, RangeType> source_image)
 {
     //return new ImageRaster2DWrapperImageSpace4D<RangeType>(source_image, this.index_2, this.index_3);
     throw new NotImplementedException();
 }