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
IGraphicbackground (initial) graphic layer
Properties
BackgroundLayer
The backgroun graphic layer
public IGraphic BackgroundLayer { get; }
Property Value
OriginalHeight
The original image height
public int OriginalHeight { get; }
Property Value
OriginalOffsetX
The original image offset in X direction
public int OriginalOffsetX { get; }
Property Value
OriginalOffsetY
The original image offset in Y direction
public int OriginalOffsetY { get; }
Property Value
OriginalWidth
The original image width
public int OriginalWidth { get; }
Property Value
ScaleFactor
The image scale factor
public double ScaleFactor { get; }
Property Value
ScaledHeight
The scaled image height
public int ScaledHeight { get; }
Property Value
ScaledOffsetX
The scaled image offset in X direction
public int ScaledOffsetX { get; }
Property Value
ScaledOffsetY
The scaled image offset in Y direction
public int ScaledOffsetY { get; }
Property Value
ScaledWidth
The scaled image width
public int ScaledWidth { get; }
Property Value
ZOrder
The Z Order
public int ZOrder { get; }
Property Value
Methods
AddLayer(IGraphic)
Add new graphic layer to the existing layers according to its Z Order
public void AddLayer(IGraphic layer)
Parameters
layer
IGraphicThe 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
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
ILUTThe 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
intRotation angle
Scale(double)
Scale the image
public void Scale(double scale)
Parameters
scale
doublescale factor
Transform(double, int, bool, bool)
Transform the image
public void Transform(double scale, int rotation, bool flipx, bool flipy)