コード例 #1
0
ファイル: PixelData.cs プロジェクト: vetrocket/fo-dicom
 /// <inheritdoc />
 public IPixelData Rescale(double scale)
 {
     if (scale == 1.0) return this;
     var w = (int)(Width * scale);
     var h = (int)(Height * scale);
     var data = BilinearInterpolation.RescaleColor24(Data, Width, Height, w, h);
     return new ColorPixelData24(w, h, data);
 }
コード例 #2
0
ファイル: PixelData.cs プロジェクト: evrimulgen/mdcm
        public IPixelData Rescale(double scale)
        {
            int w = (int)(Width * scale);
            int h = (int)(Height * scale);

            byte[] data = BilinearInterpolation.RescaleColor24(_data, Width, Height, w, h);
            return(new ColorPixelData24(w, h, data));
        }
コード例 #3
0
ファイル: PixelData.cs プロジェクト: fo-dicom/fo-dicom
        /// <inheritdoc />
        public IPixelData Rescale(double scale)
        {
            var w = (int)(Width * scale);
            var h = (int)(Height * scale);

            if (w == Width && h == Height)
            {
                return(this);
            }

            var data = BilinearInterpolation.RescaleColor24(Data, Width, Height, w, h);

            return(new ColorPixelData24(w, h, data));
        }