Class ImageGraphic
The Image Graphic implementation of IGraphic
Implements
Inherited Members
Namespace: Dicom.Imaging.Render
Assembly: cs.temp.dll.dll
Syntax
public class ImageGraphic : IGraphic
Constructors
ImageGraphic()
Default constructor
Declaration
protected ImageGraphic()
ImageGraphic(IPixelData)
Initialize new instance of ImageGraphic
Declaration
public ImageGraphic(IPixelData pixelData)
Parameters
Type | Name | Description |
---|---|---|
IPixelData | pixelData | Pixel data |
Fields
_applyLut
Declaration
protected bool _applyLut
Field Value
Type | Description |
---|---|
Boolean |
_flipX
Declaration
protected bool _flipX
Field Value
Type | Description |
---|---|
Boolean |
_flipY
Declaration
protected bool _flipY
Field Value
Type | Description |
---|---|
Boolean |
_offsetX
Declaration
protected int _offsetX
Field Value
Type | Description |
---|---|
Int32 |
_offsetY
Declaration
protected int _offsetY
Field Value
Type | Description |
---|---|
Int32 |
_originalData
Declaration
protected IPixelData _originalData
Field Value
Type | Description |
---|---|
IPixelData |
_overlays
Declaration
protected List<OverlayGraphic> _overlays
Field Value
Type | Description |
---|---|
List<OverlayGraphic> |
_rotation
Declaration
protected int _rotation
Field Value
Type | Description |
---|---|
Int32 |
_scaledData
Declaration
protected IPixelData _scaledData
Field Value
Type | Description |
---|---|
IPixelData |
_scaleFactor
Declaration
protected double _scaleFactor
Field Value
Type | Description |
---|---|
Double |
_zorder
Declaration
protected int _zorder
Field Value
Type | Description |
---|---|
Int32 |
Properties
Components
Gets the number of pixel components (samples)
Declaration
public int Components { get; }
Property Value
Type | Description |
---|---|
Int32 |
OriginalData
Gets the original pixel data.
Declaration
public IPixelData OriginalData { get; }
Property Value
Type | Description |
---|---|
IPixelData |
OriginalHeight
The original image height
Declaration
public int OriginalHeight { get; }
Property Value
Type | Description |
---|---|
Int32 |
OriginalOffsetX
The original image offset in X direction
Declaration
public int OriginalOffsetX { get; }
Property Value
Type | Description |
---|---|
Int32 |
OriginalOffsetY
The original image offset in Y direction
Declaration
public int OriginalOffsetY { get; }
Property Value
Type | Description |
---|---|
Int32 |
OriginalWidth
The original image width
Declaration
public int OriginalWidth { get; }
Property Value
Type | Description |
---|---|
Int32 |
ScaledData
Gets scaled pixel data.
Declaration
public IPixelData ScaledData { get; }
Property Value
Type | Description |
---|---|
IPixelData |
ScaledHeight
The scaled image height
Declaration
public int ScaledHeight { get; }
Property Value
Type | Description |
---|---|
Int32 |
ScaledOffsetX
The scaled image offset in X direction
Declaration
public int ScaledOffsetX { get; }
Property Value
Type | Description |
---|---|
Int32 |
ScaledOffsetY
The scaled image offset in Y direction
Declaration
public int ScaledOffsetY { get; }
Property Value
Type | Description |
---|---|
Int32 |
ScaledWidth
The scaled image width
Declaration
public int ScaledWidth { get; }
Property Value
Type | Description |
---|---|
Int32 |
ScaleFactor
The image scale factor
Declaration
public double ScaleFactor { get; }
Property Value
Type | Description |
---|---|
Double |
ZOrder
The Z Order
Declaration
public int ZOrder { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
AddOverlay(OverlayGraphic)
Add overlay to render over the resulted image
Declaration
public void AddOverlay(OverlayGraphic overlay)
Parameters
Type | Name | Description |
---|---|---|
OverlayGraphic | overlay | Overlay graphic |
BestFit(Int32, Int32)
Auto calculate the scale factor to fit the image in the specified width and height
Declaration
public void BestFit(int width, int height)
Parameters
Type | Name | Description |
---|---|---|
Int32 | width | Destination width |
Int32 | height | Destination height |
FlipX()
Flip the image vertically arround its X-Axis
Declaration
public void FlipX()
FlipY()
Flip the image horizontally arround its Y-Axis
Declaration
public void FlipY()
RenderImage(ILUT)
Declaration
public IImage RenderImage(ILUT lut)
Parameters
Type | Name | Description |
---|---|---|
ILUT | lut |
Returns
Type | Description |
---|---|
IImage |
Reset()
Reset the tranformation to default
Declaration
public void Reset()
Rotate(Int32)
Rotate the image arround its center
Declaration
public void Rotate(int angle)
Parameters
Type | Name | Description |
---|---|---|
Int32 | angle | Rotation angle |
Scale(Double)
Scale the image
Declaration
public void Scale(double scale)
Parameters
Type | Name | Description |
---|---|---|
Double | scale | scale factor |
Transform(Double, Int32, Boolean, Boolean)
Transform the image
Declaration
public void Transform(double scale, int rotation, bool flipx, bool flipy)
Parameters
Type | Name | Description |
---|---|---|
Double | scale | Scale factor |
Int32 | rotation | Rotation angle |
Boolean | flipx | True to flip vertically |
Boolean | flipy | True to flip horizontally |