Class Structure
A structure is a geometrical representation of an anatomical organ, a treatment volume, a marker, or a support structure. See the definition of a DICOM Structure for more information.
Implements
Inherited Members
Namespace: VMS.TPS.Common.Model.API
Assembly: VMS.TPS.Common.Model.API.dll
Syntax
public class Structure : ApiDataObject, IXmlSerializable
Properties
ApprovalHistory
Returns the approval history of the structure.
Declaration
public IEnumerable<StructureApprovalHistoryEntry> ApprovalHistory { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<StructureApprovalHistoryEntry> |
CenterPoint
The center point of the structure.
Declaration
public VVector CenterPoint { get; }
Property Value
Type | Description |
---|---|
VVector |
Color
The color of the structure.
Declaration
public Color Color { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Media.Color |
Comment
[Availability of this property depends on your Eclipse Scripting API license] A comment about the Structure.
Declaration
public string Comment { get; set; }
Property Value
Type | Description |
---|---|
System.String |
DicomType
The DICOM type of the structure, for example, PTV, MARKER, or ORGAN.
Declaration
public string DicomType { get; }
Property Value
Type | Description |
---|---|
System.String |
HasCalculatedPlans
Checks if a calculated plan exists for the structure
Declaration
public bool HasCalculatedPlans { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
HasSegment
Checks if the structure has a segment.
Declaration
public bool HasSegment { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Id
[Availability of this property depends on your Eclipse Scripting API license] The identifier of the Structure.
Declaration
public string Id { get; set; }
Property Value
Type | Description |
---|---|
System.String |
IsApproved
Checks if the structure is approved
Declaration
public bool IsApproved { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsEmpty
Checks if the structure is empty.
Declaration
public bool IsEmpty { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsHighResolution
true if this structure is a high-resolution structure. Otherwise false.
Declaration
public bool IsHighResolution { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
MeshGeometry
The mesh geometry.
Declaration
public MeshGeometry3D MeshGeometry { get; }
Property Value
Type | Description |
---|---|
System.Windows.Media.Media3D.MeshGeometry3D |
Name
[Availability of this property depends on your Eclipse Scripting API license] The name of the Structure.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ROINumber
The DICOM ROI Number of the structure.
Declaration
public int ROINumber { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
SegmentVolume
Provides access to the segment volume of the structure.
Declaration
public SegmentVolume SegmentVolume { get; set; }
Property Value
Type | Description |
---|---|
SegmentVolume |
StructureCode
The structure code that identifies this structure.
Declaration
public StructureCode StructureCode { get; set; }
Property Value
Type | Description |
---|---|
StructureCode |
StructureCodeInfos
Obsolete (use the StructureCode property instead) A collection of structure codes attached to this structure.
Declaration
public IEnumerable<StructureCodeInfo> StructureCodeInfos { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<StructureCodeInfo> |
Volume
The calculated volume.
Declaration
public double Volume { get; }
Property Value
Type | Description |
---|---|
System.Double |
Methods
AddContourOnImagePlane(VVector[], Int32)
[Availability of this method depends on your Eclipse Scripting API license] Adds the given contour to the given image plane.
Declaration
public void AddContourOnImagePlane(VVector[] contour, int z)
Parameters
Type | Name | Description |
---|---|---|
VVector[] | contour | The contour points, z coordinates are ignored. |
System.Int32 | z | A zero-based image plane index. |
And(SegmentVolume)
Boolean And operation for structures that have a segment model. Provided here for convenience.
Declaration
public SegmentVolume And(SegmentVolume other)
Parameters
Type | Name | Description |
---|---|---|
SegmentVolume | other | The segment volume that is combined with this segment volume. |
Returns
Type | Description |
---|---|
SegmentVolume | A new combined segment volume. |
AsymmetricMargin(AxisAlignedMargins)
Asymmetric margin operation for structures that have a segment model. Provided here for convenience.
Declaration
public SegmentVolume AsymmetricMargin(AxisAlignedMargins margins)
Parameters
Type | Name | Description |
---|---|---|
AxisAlignedMargins | margins | The margins aligned to the axes of the image coordinate system, in millimeters. The maximum is 50. |
Returns
Type | Description |
---|---|
SegmentVolume | A new expanded or shrunk segment volume. |
CanConvertToHighResolution()
Returns true if this structure can be converted to a high-resolution structure.
Declaration
public bool CanConvertToHighResolution()
Returns
Type | Description |
---|---|
System.Boolean | true if this structure can be converted to a high-resolution structure. |
CanEditSegmentVolume(out String)
Checks if the segment volume of the structure can be edited.
Declaration
public bool CanEditSegmentVolume(out string errorMessage)
Parameters
Type | Name | Description |
---|---|---|
System.String | errorMessage | If the segment volume cannot be edited, contains the error message. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if the segment volume of the structure can be edited. |
CanSetAssignedHU(out String)
Checks if the HU value of the structure can be modified.
Declaration
public bool CanSetAssignedHU(out string errorMessage)
Parameters
Type | Name | Description |
---|---|---|
System.String | errorMessage | If the HU value cannot be set, contains the error message. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if the HU value for this structure can be modified. |
ClearAllContoursOnImagePlane(Int32)
[Availability of this method depends on your Eclipse Scripting API license] Clears the contours on the given image plane.
Declaration
public void ClearAllContoursOnImagePlane(int z)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | z | A zero-based image plane index. |
ConvertDoseLevelToStructure(Dose, DoseValue)
[Availability of this method depends on your Eclipse Scripting API license] Creates a structure out of an isodose level.
Declaration
public void ConvertDoseLevelToStructure(Dose dose, DoseValue doseLevel)
Parameters
Type | Name | Description |
---|---|---|
Dose | dose | The dose from which the dose level is extracted. |
DoseValue | doseLevel | The dose level. |
ConvertToHighResolution()
[Availability of this method depends on your Eclipse Scripting API license] Converts this structure to a high-resolution structure. Increases the resolution of the segment volume in cases where the image size is larger than 256x256 voxels.
Declaration
public void ConvertToHighResolution()
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Can not convert this structure. |
GetAssignedHU(out Double)
Returns the HU value of the material.
Declaration
public bool GetAssignedHU(out double huValue)
Parameters
Type | Name | Description |
---|---|---|
System.Double | huValue | Double value that will contain the HU value upon return from this method |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if a HU value has been assigned for this structure. |
GetContoursOnImagePlane(Int32)
If the structure has a segment, gets the contours of the structure on the given image plane.
Declaration
public VVector[][] GetContoursOnImagePlane(int z)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | z | Zero based image plane index. |
Returns
Type | Description |
---|---|
VVector[][] | A jagged array that holds the points for all contours of the structure on the given image plane. |
GetNumberOfSeparateParts()
If the structure has a segment, returns the number of separate parts.
Declaration
public int GetNumberOfSeparateParts()
Returns
Type | Description |
---|---|
System.Int32 | Returns the number of separate parts in this structure |
GetReferenceLinePoints()
If the structure is a reference line, gets its points.
Declaration
public VVector[] GetReferenceLinePoints()
Returns
Type | Description |
---|---|
VVector[] | An array that holds the points defining the reference line. If no reference line exists, the array is empty. |
GetSegmentProfile(VVector, VVector, BitArray)
If the structure has a segment, gets the segment profile.
Declaration
public SegmentProfile GetSegmentProfile(VVector start, VVector stop, BitArray preallocatedBuffer)
Parameters
Type | Name | Description |
---|---|---|
VVector | start | Location of the first point of the profile. |
VVector | stop | Location of the last point of the profile. |
System.Collections.BitArray | preallocatedBuffer | Preallocated buffer where the values are stored. The size of the buffer determines the number of values to return. |
Returns
Type | Description |
---|---|
SegmentProfile | The SegmentProfile object holding segment values (true if inside, false otherwise) along the line segment defined by start and stop parameters. |
IsPointInsideSegment(VVector)
If the structure has a segment, checks if the given point lies within the structure.
Declaration
public bool IsPointInsideSegment(VVector point)
Parameters
Type | Name | Description |
---|---|---|
VVector | point | Location of the point. |
Returns
Type | Description |
---|---|
System.Boolean | True if the point lies within the structure, false otherwise. |
Margin(Double)
Margin operation for structures that have a segment model. Provided here for convenience.
Declaration
public SegmentVolume Margin(double marginInMM)
Parameters
Type | Name | Description |
---|---|---|
System.Double | marginInMM | The used margin in millimeters. The maximum is 50. |
Returns
Type | Description |
---|---|
SegmentVolume | A new expanded or shrunk segment volume. |
Not()
Boolean Not operation for structures that have a segment model. Provided here for convenience.
Declaration
public SegmentVolume Not()
Returns
Type | Description |
---|---|
SegmentVolume | A new combined segment volume. |
Or(SegmentVolume)
Boolean Or operation for structures that have a segment model. Provided here for convenience.
Declaration
public SegmentVolume Or(SegmentVolume other)
Parameters
Type | Name | Description |
---|---|---|
SegmentVolume | other | The segment volume that is combined with this volume. |
Returns
Type | Description |
---|---|
SegmentVolume | A new combined segment volume. |
ResetAssignedHU()
[Availability of this method depends on your Eclipse Scripting API license] Resets the HU value of the material to "undefined".
Declaration
public bool ResetAssignedHU()
Returns
Type | Description |
---|---|
System.Boolean | Returns true if the HU value was set to "undefined". Returns false, if the value could not be reset. This can happen if the material has been set to a structure. |
SetAssignedHU(Double)
[Availability of this method depends on your Eclipse Scripting API license] Sets the HU value of the material.
Declaration
public void SetAssignedHU(double huValue)
Parameters
Type | Name | Description |
---|---|---|
System.Double | huValue | A double value that contains the HU value to be set. |
Sub(SegmentVolume)
Boolean Sub operation for structures that have a segment model. Provided here for convenience.
Declaration
public SegmentVolume Sub(SegmentVolume other)
Parameters
Type | Name | Description |
---|---|---|
SegmentVolume | other | The segment volume that is subtracted from this segment volume. |
Returns
Type | Description |
---|---|
SegmentVolume | A new combined segment volume. |
SubtractContourOnImagePlane(VVector[], Int32)
[Availability of this method depends on your Eclipse Scripting API license] Subtracts the given contour from the given image plane.
Declaration
public void SubtractContourOnImagePlane(VVector[] contour, int z)
Parameters
Type | Name | Description |
---|---|---|
VVector[] | contour | The contour points, z coordinates are ignored. |
System.Int32 | z | A zero-based image plane index. |
WriteXml(XmlWriter)
Converts an object into its XML representation. For more information on how to serialize an object into an XML document, see System.Xml.Serialization.XmlSerializer.
Declaration
public override void WriteXml(XmlWriter writer)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlWriter | writer | The System.Xml.XmlWriter stream, to which the object is serialized. |
Overrides
Xor(SegmentVolume)
Boolean Xor operation for structures that have a segment model. Provided here for convenience.
Declaration
public SegmentVolume Xor(SegmentVolume other)
Parameters
Type | Name | Description |
---|---|---|
SegmentVolume | other | The segment volume that is combined with this volume. |
Returns
Type | Description |
---|---|
SegmentVolume | A new combined segment volume. |
Operators
Implicit(Structure to SegmentVolume)
An implicit conversion from Structure to SegmentVolume makes it easier to use the SegmentVolume functionality, such as the boolean operators and margin.
Declaration
public static implicit operator SegmentVolume(Structure structure)
Parameters
Type | Name | Description |
---|---|---|
Structure | structure | The converted structure. |
Returns
Type | Description |
---|---|
SegmentVolume | The segment volume of the structure. |