Table of Contents

Class CompositeGraphic

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

The Composite Graphic implementation of IGraphic which layers graphics one over the other

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

Constructors

CompositeGraphic(IGraphic)

Initialize new instance of CompositeGraphic

public CompositeGraphic(IGraphic bg)

Parameters

bg IGraphic

background (initial) graphic layer

Properties

BackgroundLayer

The backgroun graphic layer

public IGraphic BackgroundLayer { get; }

Property Value

IGraphic

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

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; }

Property Value

int

Methods

AddLayer(IGraphic)

Add new graphic layer to the existing layers according to its Z Order

public void AddLayer(IGraphic layer)

Parameters

layer IGraphic

The layer graphic instance

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