Fellow Oak DICOM
Search Results for

    Show / Hide Table of Contents

    Class ImageBase<TImage>

    Base class for image implementations.

    Inheritance
    System.Object
    ImageBase<TImage>
    ImageDisposableBase<TImage>
    RawImage
    Implements
    IImage
    System.IDisposable
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: FellowOakDicom.Imaging
    Assembly: fo-dicom.core.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
    System.Int32 width

    Image width.

    System.Int32 height

    Image height.

    PinnedIntArray pixels

    Array of pixels.

    TImage image

    Image object.

    Fields

    _disposed

    Declaration
    protected bool _disposed
    Field Value
    Type Description
    System.Boolean

    _height

    Declaration
    protected readonly int _height
    Field Value
    Type Description
    System.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
    System.Int32

    Properties

    Height

    Declaration
    public int Height { get; }
    Property Value
    Type Description
    System.Int32

    Pixels

    Gets the array of pixels associated with the image.

    Declaration
    public PinnedIntArray Pixels { get; }
    Property Value
    Type Description
    PinnedIntArray

    Width

    Declaration
    public int Width { get; }
    Property Value
    Type Description
    System.Int32

    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
    System.Boolean disposing

    Dispose mode?

    DrawGraphics(IEnumerable<IGraphic>)

    Draw graphics onto existing image.

    Declaration
    public abstract void DrawGraphics(IEnumerable<IGraphic> graphics)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<IGraphic> graphics

    Graphics to draw.

    Finalize()

    Destructor to free up the image resources.

    Declaration
    protected void Finalize()

    GetPixel(Int32, Int32)

    Declaration
    public Color32 GetPixel(int x, int y)
    Parameters
    Type Name Description
    System.Int32 x
    System.Int32 y
    Returns
    Type Description
    Color32

    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
    System.Int32 components

    Number of components.

    System.Boolean flipX

    Flip image in X direction?

    System.Boolean flipY

    Flip image in Y direction?

    System.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
    System.Int32 width
    System.Int32 height
    System.Int32 components
    System.Boolean flipX
    System.Boolean flipY
    System.Int32 rotation
    System.Int32[] data
    Returns
    Type Description
    System.Byte[]

    Implements

    IImage
    System.IDisposable

    Extension Methods

    RawImageExtensions.AsBytes(IImage)
    LinqExtensions.IsOneOf<T>(T, T[])
    In This Article
    Back to top Copyright (c) 2012-2025 fo-dicom contributors