Ejemplo n.º 1
0
		/// <summary>
		/// Initializes a new instance of <see cref="ColorPixelData"/> with the specified image parameters.
		/// </summary>
		/// <param name="rows">The number of rows.</param>
		/// <param name="columns">The number of columns.</param>
		/// <param name="pixelDataGetter">A delegate that returns the pixel data.</param>
		public ColorPixelData(
			int rows,
			int columns,
			PixelDataGetter pixelDataGetter)
			: base(rows, columns, 32, pixelDataGetter)
		{
		}
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of <see cref="ColorPixelData"/> with the specified image parameters.
 /// </summary>
 /// <param name="rows">The number of rows.</param>
 /// <param name="columns">The number of columns.</param>
 /// <param name="pixelDataGetter">A delegate that returns the pixel data.</param>
 public ColorPixelData(
     int rows,
     int columns,
     PixelDataGetter pixelDataGetter)
     : base(rows, columns, 32, pixelDataGetter)
 {
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of <see cref="PixelData"/> with the specified image parameters.
        /// </summary>
        /// <param name="rows">The number of rows.</param>
        /// <param name="columns">The number of columns.</param>
        /// <param name="bitsAllocated">The number of bits allocated in the pixel data returned by <paramref name="pixelDataGetter"/>.</param>
        /// <param name="pixelDataGetter">A delegate that returns the pixel data.</param>
        protected PixelData(
            int rows,
            int columns,
            int bitsAllocated,
            PixelDataGetter pixelDataGetter)
        {
            Platform.CheckForNullReference(pixelDataGetter, "pixelDataGetter");
            _pixelDataGetter = pixelDataGetter;

            Initialize(rows, columns, bitsAllocated);
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of <see cref="GrayscalePixelData"/> with the
 /// specified image parameters.
 /// </summary>
 /// <param name="rows">The number of rows.</param>
 /// <param name="columns">The number of columns.</param>
 /// <param name="bitsAllocated">The number of bits allocated in the pixel data returned by <paramref name="pixelDataGetter"/>.</param>
 /// <param name="bitsStored">The number of bits stored in the pixel data returned by <paramref name="pixelDataGetter"/>.</param>
 /// <param name="highBit">The high bit of the pixel data returned by <paramref name="pixelDataGetter"/>.</param>
 /// <param name="isSigned">Indicates whether or not the pixel data returned by <paramref name="pixelDataGetter"/> contains signed data.</param>
 /// <param name="pixelDataGetter">A delegate that returns the pixel data.</param>
 public GrayscalePixelData(
     int rows,
     int columns,
     int bitsAllocated,
     int bitsStored,
     int highBit,
     bool isSigned,
     PixelDataGetter pixelDataGetter)
     : base(rows, columns, bitsAllocated, pixelDataGetter)
 {
     Initialize(bitsStored, highBit, isSigned);
 }
 /// <summary>
 /// Initializes a new instance of <see cref="GrayscalePresentationImage"/>.
 /// </summary>
 /// <param name="rows"></param>
 /// <param name="columns"></param>
 /// <param name="bitsAllocated"></param>
 /// <param name="bitsStored"></param>
 /// <param name="highBit"></param>
 /// <param name="isSigned"></param>
 /// <param name="inverted"></param>
 /// <param name="rescaleSlope"></param>
 /// <param name="rescaleIntercept"></param>
 /// <param name="pixelSpacingX"></param>
 /// <param name="pixelSpacingY"></param>
 /// <param name="pixelAspectRatioX"></param>
 /// <param name="pixelAspectRatioY"></param>
 /// <param name="pixelDataGetter"></param>
 /// <remarks>
 /// This more flexible constructor allows for the pixel data
 /// to be retrieved from and external source via a <see cref="PixelDataGetter"/>.
 /// </remarks>
 public GrayscalePresentationImage(
     int rows,
     int columns,
     int bitsAllocated,
     int bitsStored,
     int highBit,
     bool isSigned,
     bool inverted,
     double rescaleSlope,
     double rescaleIntercept,
     double pixelSpacingX,
     double pixelSpacingY,
     double pixelAspectRatioX,
     double pixelAspectRatioY,
     PixelDataGetter pixelDataGetter)
     : base(new GrayscaleImageGraphic(
                rows,
                columns,
                bitsAllocated,
                bitsStored,
                highBit,
                isSigned,
                inverted,
                rescaleSlope,
                rescaleIntercept,
                pixelDataGetter),
            pixelSpacingX,
            pixelSpacingY,
            pixelAspectRatioX,
            pixelAspectRatioY)
 {
     _constructor       = 1;
     _rows              = rows;
     _columns           = columns;
     _bitsAllocated     = bitsAllocated;
     _bitsStored        = bitsStored;
     _highBit           = highBit;
     _isSigned          = isSigned;
     _inverted          = inverted;
     _rescaleSlope      = rescaleSlope;
     _rescaleIntercept  = rescaleIntercept;
     _pixelSpacingX     = pixelSpacingX;
     _pixelSpacingY     = pixelSpacingY;
     _pixelAspectRatioX = pixelAspectRatioX;
     _pixelAspectRatioY = pixelAspectRatioY;
     _pixelDataGetter   = pixelDataGetter;
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Initializes a new instance of <see cref="GrayscaleImageGraphic"/>
 /// with the specified image parameters.
 /// </summary>
 /// <param name="rows"></param>
 /// <param name="columns"></param>
 /// <param name="bitsAllocated"></param>
 /// <param name="bitsStored"></param>
 /// <param name="highBit"></param>
 /// <param name="isSigned"></param>
 /// <param name="inverted"></param>
 /// <param name="rescaleSlope"></param>
 /// <param name="rescaleIntercept"></param>
 /// <param name="pixelDataGetter"></param>
 /// <remarks>
 /// Creates a grayscale image using existing pixel data but does so
 /// without ever storing a reference to the pixel data. This is necessary
 /// to ensure that pixel data can be properly garbage collected in
 /// any future memory management schemes.
 /// </remarks>
 public GrayscaleImageGraphic(
     int rows,
     int columns,
     int bitsAllocated,
     int bitsStored,
     int highBit,
     bool isSigned,
     bool inverted,
     double rescaleSlope,
     double rescaleIntercept,
     PixelDataGetter pixelDataGetter)
     : base(
         rows,
         columns,
         bitsAllocated,
         pixelDataGetter)
 {
     Initialize(bitsStored, highBit, isSigned, rescaleSlope, rescaleIntercept, inverted);
 }
Ejemplo n.º 7
0
		/// <summary>
		/// Initializes a new instance of <see cref="ColorPresentationImage"/>.
		/// </summary>
		/// <param name="rows"></param>
		/// <param name="columns"></param>
		/// <param name="pixelSpacingX"></param>
		/// <param name="pixelSpacingY"></param>
		/// <param name="pixelAspectRatioX"></param>
		/// <param name="pixelAspectRatioY"></param>
		/// <param name="pixelDataGetter"></param>
		/// <remarks>
		/// This more flexible constructor allows for the pixel data
		/// to be retrieved from and external source via a <see cref="PixelDataGetter"/>.
		/// </remarks>
		public ColorPresentationImage(
			int rows,
			int columns,
			double pixelSpacingX,
			double pixelSpacingY,
			double pixelAspectRatioX,
			double pixelAspectRatioY,
			PixelDataGetter pixelDataGetter)
			: base(new ColorImageGraphic(rows, columns, pixelDataGetter),
			       pixelSpacingX,
			       pixelSpacingY,
			       pixelAspectRatioX,
			       pixelAspectRatioY)
		{
			_constructor = 1;
			_rows = rows;
			_columns = columns;
			_pixelSpacingX = pixelSpacingX;
			_pixelSpacingY = pixelSpacingY;
			_pixelAspectRatioX = pixelAspectRatioX;
			_pixelAspectRatioY = pixelAspectRatioY;
			_pixelDataGetter = pixelDataGetter;
		}
Ejemplo n.º 8
0
 /// <summary>
 /// Initializes a new instance of <see cref="ColorPresentationImage"/>.
 /// </summary>
 /// <param name="rows"></param>
 /// <param name="columns"></param>
 /// <param name="pixelSpacingX"></param>
 /// <param name="pixelSpacingY"></param>
 /// <param name="pixelAspectRatioX"></param>
 /// <param name="pixelAspectRatioY"></param>
 /// <param name="pixelDataGetter"></param>
 /// <remarks>
 /// This more flexible constructor allows for the pixel data
 /// to be retrieved from and external source via a <see cref="PixelDataGetter"/>.
 /// </remarks>
 public ColorPresentationImage(
     int rows,
     int columns,
     double pixelSpacingX,
     double pixelSpacingY,
     double pixelAspectRatioX,
     double pixelAspectRatioY,
     PixelDataGetter pixelDataGetter)
     : base(new ColorImageGraphic(rows, columns, pixelDataGetter),
            pixelSpacingX,
            pixelSpacingY,
            pixelAspectRatioX,
            pixelAspectRatioY)
 {
     _constructor       = 1;
     _rows              = rows;
     _columns           = columns;
     _pixelSpacingX     = pixelSpacingX;
     _pixelSpacingY     = pixelSpacingY;
     _pixelAspectRatioX = pixelAspectRatioX;
     _pixelAspectRatioY = pixelAspectRatioY;
     _pixelDataGetter   = pixelDataGetter;
 }
Ejemplo n.º 9
0
		/// <summary>
		/// Initializes a new instance of <see cref="PixelData"/> with the specified image parameters.
		/// </summary>
		/// <param name="rows">The number of rows.</param>
		/// <param name="columns">The number of columns.</param>
		/// <param name="bitsAllocated">The number of bits allocated in the pixel data returned by <paramref name="pixelDataGetter"/>.</param>
		/// <param name="pixelDataGetter">A delegate that returns the pixel data.</param>
		protected PixelData(
			int rows,
			int columns,
			int bitsAllocated,
			PixelDataGetter pixelDataGetter)
		{
			Platform.CheckForNullReference(pixelDataGetter, "pixelDataGetter");
			_pixelDataGetter = pixelDataGetter;

			Initialize(rows, columns, bitsAllocated);
		}
Ejemplo n.º 10
0
		/// <summary>
		/// Initializes a new instance of <see cref="ColorImageGraphic"/>
		/// with the specified image parameters.
		/// </summary>
		/// <param name="rows"></param>
		/// <param name="columns"></param>
		/// <param name="pixelDataGetter"></param>
		/// <remarks>
		/// Creates a grayscale image using existing pixel data but does so
		/// without ever storing a reference to the pixel data. This is necessary
		/// to ensure that pixel data can be properly garbage collected in
		/// any future memory management schemes.
		/// </remarks>
		public ColorImageGraphic(int rows, int columns, PixelDataGetter pixelDataGetter)
			: base(rows, columns, 32, pixelDataGetter)
		{
		}
Ejemplo n.º 11
0
		/// <summary>
		/// Initializes a new instance of <see cref="GrayscaleImageGraphic"/>
		/// with the specified image parameters.
		/// </summary>
		/// <param name="rows"></param>
		/// <param name="columns"></param>
		/// <param name="bitsAllocated"></param>
		/// <param name="bitsStored"></param>
		/// <param name="highBit"></param>
		/// <param name="isSigned"></param>
		/// <param name="inverted"></param>
		/// <param name="rescaleSlope"></param>
		/// <param name="rescaleIntercept"></param>
		/// <param name="pixelDataGetter"></param>
		/// <remarks>
		/// Creates a grayscale image using existing pixel data but does so
		/// without ever storing a reference to the pixel data. This is necessary
		/// to ensure that pixel data can be properly garbage collected in
		/// any future memory management schemes.
		/// </remarks>
		public GrayscaleImageGraphic(
			int rows,
			int columns,
			int bitsAllocated,
			int bitsStored,
			int highBit,
			bool isSigned,
			bool inverted,
			double rescaleSlope,
			double rescaleIntercept,
			PixelDataGetter pixelDataGetter)
			: base(
				rows,
				columns,
				bitsAllocated,
				pixelDataGetter)
		{
			Initialize(bitsStored, highBit, isSigned, rescaleSlope, rescaleIntercept, inverted);
		}
		/// <summary>
		/// Initializes a new instance of <see cref="GrayscalePresentationImage"/>.
		/// </summary>
		/// <param name="rows"></param>
		/// <param name="columns"></param>
		/// <param name="bitsAllocated"></param>
		/// <param name="bitsStored"></param>
		/// <param name="highBit"></param>
		/// <param name="isSigned"></param>
		/// <param name="inverted"></param>
		/// <param name="rescaleSlope"></param>
		/// <param name="rescaleIntercept"></param>
		/// <param name="pixelSpacingX"></param>
		/// <param name="pixelSpacingY"></param>
		/// <param name="pixelAspectRatioX"></param>
		/// <param name="pixelAspectRatioY"></param>
		/// <param name="pixelDataGetter"></param>
		/// <remarks>
		/// This more flexible constructor allows for the pixel data
		/// to be retrieved from and external source via a <see cref="PixelDataGetter"/>.
		/// </remarks>
		public GrayscalePresentationImage(
			int rows,
			int columns,
			int bitsAllocated,
			int bitsStored,
			int highBit,
			bool isSigned,
			bool inverted,
			double rescaleSlope,
			double rescaleIntercept,
			double pixelSpacingX,
			double pixelSpacingY,
			double pixelAspectRatioX,
			double pixelAspectRatioY,
			PixelDataGetter pixelDataGetter)
			: base(new GrayscaleImageGraphic(
			       	rows,
			       	columns,
			       	bitsAllocated,
			       	bitsStored,
			       	highBit,
			       	isSigned,
			       	inverted,
			       	rescaleSlope,
			       	rescaleIntercept,
			       	pixelDataGetter),
			       pixelSpacingX,
			       pixelSpacingY,
			       pixelAspectRatioX,
			       pixelAspectRatioY)
		{
			_constructor = 1;
			_rows = rows;
			_columns = columns;
			_bitsAllocated = bitsAllocated;
			_bitsStored = bitsStored;
			_highBit = highBit;
			_isSigned = isSigned;
			_inverted = inverted;
			_rescaleSlope = rescaleSlope;
			_rescaleIntercept = rescaleIntercept;
			_pixelSpacingX = pixelSpacingX;
			_pixelSpacingY = pixelSpacingY;
			_pixelAspectRatioX = pixelAspectRatioX;
			_pixelAspectRatioY = pixelAspectRatioY;
			_pixelDataGetter = pixelDataGetter;
		}
Ejemplo n.º 13
0
 /// <summary>
 /// Initializes a new instance of <see cref="ColorImageGraphic"/>
 /// with the specified image parameters.
 /// </summary>
 /// <param name="rows"></param>
 /// <param name="columns"></param>
 /// <param name="pixelDataGetter"></param>
 /// <remarks>
 /// Creates a grayscale image using existing pixel data but does so
 /// without ever storing a reference to the pixel data. This is necessary
 /// to ensure that pixel data can be properly garbage collected in
 /// any future memory management schemes.
 /// </remarks>
 public ColorImageGraphic(int rows, int columns, PixelDataGetter pixelDataGetter)
     : base(rows, columns, 32, pixelDataGetter)
 {
 }
Ejemplo n.º 14
0
		/// <summary>
		/// Initializes a new instance of <see cref="ImageGraphic"/>
		/// with the specified image parameters.
		/// </summary>
		/// <param name="rows"></param>
		/// <param name="columns"></param>
		/// <param name="bitsPerPixel">Can be 8 or 16 in the case of
		/// grayscale images, or 32 for multichannel colour images.</param>
		/// <param name="pixelDataGetter"></param>
		/// <remarks>
		/// Creates an image using existing pixel data but does so
		/// without ever storing a reference to the pixel data. This is necessary
		/// to ensure that pixel data can be properly garbage collected in
		/// any future memory management schemes.
		/// </remarks>
		protected ImageGraphic(int rows, int columns, int bitsPerPixel, PixelDataGetter pixelDataGetter)
		{
			Platform.CheckForNullReference(pixelDataGetter, "pixelDataGetter");
			_pixelDataGetter = pixelDataGetter;
			Initialize(rows, columns, bitsPerPixel);
		}
Ejemplo n.º 15
0
		/// <summary>
		/// Initializes a new instance of <see cref="GrayscalePixelData"/> with the
		/// specified image parameters.
		/// </summary>
		/// <param name="rows">The number of rows.</param>
		/// <param name="columns">The number of columns.</param>
		/// <param name="bitsAllocated">The number of bits allocated in the pixel data returned by <paramref name="pixelDataGetter"/>.</param>
		/// <param name="bitsStored">The number of bits stored in the pixel data returned by <paramref name="pixelDataGetter"/>.</param>
		/// <param name="highBit">The high bit of the pixel data returned by <paramref name="pixelDataGetter"/>.</param>
		/// <param name="isSigned">Indicates whether or not the pixel data returned by <paramref name="pixelDataGetter"/> contains signed data.</param>
		/// <param name="pixelDataGetter">A delegate that returns the pixel data.</param>
		public GrayscalePixelData(
			int rows,
			int columns,
			int bitsAllocated,
			int bitsStored,
			int highBit,
			bool isSigned,
			PixelDataGetter pixelDataGetter)
			: base(rows, columns, bitsAllocated, pixelDataGetter)
		{
			Initialize(bitsStored, highBit, isSigned);
		}
Ejemplo n.º 16
0
 /// <summary>
 /// Initializes a new instance of <see cref="ImageGraphic"/>
 /// with the specified image parameters.
 /// </summary>
 /// <param name="rows"></param>
 /// <param name="columns"></param>
 /// <param name="bitsPerPixel">Can be 8 or 16 in the case of
 /// grayscale images, or 32 for multichannel colour images.</param>
 /// <param name="pixelDataGetter"></param>
 /// <remarks>
 /// Creates an image using existing pixel data but does so
 /// without ever storing a reference to the pixel data. This is necessary
 /// to ensure that pixel data can be properly garbage collected in
 /// any future memory management schemes.
 /// </remarks>
 protected ImageGraphic(int rows, int columns, int bitsPerPixel, PixelDataGetter pixelDataGetter)
 {
     Platform.CheckForNullReference(pixelDataGetter, "pixelDataGetter");
     _pixelDataGetter = pixelDataGetter;
     Initialize(rows, columns, bitsPerPixel);
 }