Table of Contents

Class ImageGraphic

Namespace
FellowOakDicom.Imaging.Render
Assembly
fo-dicom.core.dll

The Image Graphic implementation of IGraphic

public class ImageGraphic : IGraphic
Inheritance
ImageGraphic
Implements
Inherited Members
Extension Methods

Constructors

ImageGraphic()

Default constructor

protected ImageGraphic()

ImageGraphic(IPixelData)

Initialize new instance of ImageGraphic

public ImageGraphic(IPixelData pixelData)

Parameters

pixelData IPixelData

Pixel data

Fields

_applyLut

protected bool _applyLut

Field Value

bool

_flipX

protected bool _flipX

Field Value

bool

_flipY

protected bool _flipY

Field Value

bool

_offsetX

protected int _offsetX

Field Value

int

_offsetY

protected int _offsetY

Field Value

int

_originalData

protected IPixelData _originalData

Field Value

IPixelData

_overlays

protected List<OverlayGraphic> _overlays

Field Value

List<OverlayGraphic>

_rotation

protected int _rotation

Field Value

int

_scaleFactor

protected double _scaleFactor

Field Value

double

_scaledData

protected IPixelData _scaledData

Field Value

IPixelData

_zorder

protected int _zorder

Field Value

int

Properties

Components

Gets the number of pixel components (samples)

public int Components { get; }

Property Value

int

OriginalData

Gets the original pixel data.

public IPixelData OriginalData { get; }

Property Value

IPixelData

OriginalHeight

The original image height

public int OriginalHeight { get; }

Property Value

int

OriginalOffsetX

The original image offset in X direction

public int OriginalOffsetX { get; }

Property Value

int

OriginalOffsetY

The original image offset in Y direction

public int OriginalOffsetY { get; }

Property Value

int

OriginalWidth

The original image width

public int OriginalWidth { get; }

Property Value

int

ScaleFactor

The image scale factor

public double ScaleFactor { get; }

Property Value

double

ScaledData

Gets scaled pixel data.

public IPixelData ScaledData { get; }

Property Value

IPixelData

ScaledHeight

The scaled image height

public int ScaledHeight { get; }

Property Value

int

ScaledOffsetX

The scaled image offset in X direction

public int ScaledOffsetX { get; }

Property Value

int

ScaledOffsetY

The scaled image offset in Y direction

public int ScaledOffsetY { get; }

Property Value

int

ScaledWidth

The scaled image width

public int ScaledWidth { get; }

Property Value

int

ZOrder

The Z Order

public int ZOrder { get; set; }

Property Value

int

Methods

AddOverlay(OverlayGraphic)

Add overlay to render over the resulted image

public void AddOverlay(OverlayGraphic overlay)

Parameters

overlay OverlayGraphic

Overlay graphic

BestFit(int, int)

Auto calculate the scale factor to fit the image in the specified width and height

public void BestFit(int width, int height)

Parameters

width int

Destination width

height int

Destination height

FlipX()

Flip the image vertically arround its X-Axis

public void FlipX()

FlipY()

Flip the image horizontally arround its Y-Axis

public void FlipY()

RenderImage(ILUT)

Render the image and return the result as IImage

public IImage RenderImage(ILUT lut)

Parameters

lut ILUT

The image LUT

Returns

IImage

Image after applying LUT and transformation

Reset()

Reset the tranformation to default

public void Reset()

Rotate(int)

Rotate the image arround its center

public void Rotate(int angle)

Parameters

angle int

Rotation angle

Scale(double)

Scale the image

public void Scale(double scale)

Parameters

scale double

scale factor

Transform(double, int, bool, bool)

Transform the image

public void Transform(double scale, int rotation, bool flipx, bool flipy)

Parameters

scale double

Scale factor

rotation int

Rotation angle

flipx bool

True to flip vertically

flipy bool

True to flip horizontally