Class ImageBase<TImage>
Base class for image implementations.
Inherited Members
Namespace: Dicom.Imaging
Assembly: cs.temp.dll.dll
Syntax
public abstract class ImageBase<TImage> : IImage, IDisposable where TImage : class
Type Parameters
| Name | Description |
|---|---|
| TImage | Image implementation type. |
Constructors
ImageBase(Int32, Int32, PinnedIntArray, TImage)
Initializes an instance of the ImageBase<TImage> object.
Declaration
protected ImageBase(int width, int height, PinnedIntArray pixels, TImage image)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | width | Image width. |
| Int32 | height | Image height. |
| PinnedIntArray | pixels | Array of pixels. |
| TImage | image | Image object. |
Fields
disposed
Declaration
protected bool disposed
Field Value
| Type | Description |
|---|---|
| Boolean |
height
Declaration
protected readonly int height
Field Value
| Type | Description |
|---|---|
| Int32 |
image
Declaration
protected TImage image
Field Value
| Type | Description |
|---|---|
| TImage |
pixels
Declaration
protected PinnedIntArray pixels
Field Value
| Type | Description |
|---|---|
| PinnedIntArray |
width
Declaration
protected readonly int width
Field Value
| Type | Description |
|---|---|
| Int32 |
Properties
Pixels
Gets the array of pixels associated with the image.
Declaration
public PinnedIntArray Pixels { get; }
Property Value
| Type | Description |
|---|---|
| PinnedIntArray |
Methods
As<T>()
Cast IImage object to specific (real image) type.
Declaration
public virtual T As<T>()
Returns
| Type | Description |
|---|---|
| T | IImage object as specific (real image) type. |
Type Parameters
| Name | Description |
|---|---|
| T | Real image type to cast to. |
Clone()
Creates a deep copy of the image.
Declaration
public abstract IImage Clone()
Returns
| Type | Description |
|---|---|
| IImage | Deep copy of this image. |
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Dispose(Boolean)
Dispose resources.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| Boolean | disposing | Dispose mode? |
DrawGraphics(IEnumerable<IGraphic>)
Draw graphics onto existing image.
Declaration
public abstract void DrawGraphics(IEnumerable<IGraphic> graphics)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<IGraphic> | graphics | Graphics to draw. |
Finalize()
Destructor to free up the image resources.
Declaration
protected void Finalize()
Render(Int32, Boolean, Boolean, Int32)
Renders the image given the specified parameters.
Declaration
public abstract void Render(int components, bool flipX, bool flipY, int rotation)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | components | Number of components. |
| Boolean | flipX | Flip image in X direction? |
| Boolean | flipY | Flip image in Y direction? |
| Int32 | rotation | Image rotation. |
ToBytes(ref Int32, ref Int32, Int32, Boolean, Boolean, Int32, Int32[])
Declaration
protected static byte[] ToBytes(ref int width, ref int height, int components, bool flipX, bool flipY, int rotation, int[] data)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | width | |
| Int32 | height | |
| Int32 | components | |
| Boolean | flipX | |
| Boolean | flipY | |
| Int32 | rotation | |
| Int32[] | data |
Returns
| Type | Description |
|---|---|
| Byte[] |