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
IPixelDataPixel data
Fields
_applyLut
protected bool _applyLut
Field Value
_flipX
protected bool _flipX
Field Value
_flipY
protected bool _flipY
Field Value
_offsetX
protected int _offsetX
Field Value
_offsetY
protected int _offsetY
Field Value
_originalData
protected IPixelData _originalData
Field Value
_overlays
protected List<OverlayGraphic> _overlays
Field Value
_rotation
protected int _rotation
Field Value
_scaleFactor
protected double _scaleFactor
Field Value
_scaledData
protected IPixelData _scaledData
Field Value
_zorder
protected int _zorder
Field Value
Properties
Components
Gets the number of pixel components (samples)
public int Components { get; }
Property Value
OriginalData
Gets the original pixel data.
public IPixelData OriginalData { 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
ScaledData
Gets scaled pixel data.
public IPixelData ScaledData { 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; set; }
Property Value
Methods
AddOverlay(OverlayGraphic)
Add overlay to render over the resulted image
public void AddOverlay(OverlayGraphic overlay)
Parameters
overlay
OverlayGraphicOverlay 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
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)