Constructor
new Geometry(origin, size, spacing, orientationopt, timeopt)
Name | Type | Attributes | Description |
---|---|---|---|
origin | Point3D | The object origin (a 3D point). | |
size | Size | The object size. | |
spacing | Spacing | The object spacing. | |
orientation | Matrix33 | <optional> | The object orientation (33 matrix, default to 33 identity). |
time | number | <optional> | Optional time index. |
- Source
Classes
Methods
appendFrame(origin, time)
Append a frame to the geometry.
Name | Type | Description |
---|---|---|
origin | Point3D | The origin to append. |
time | number | Optional time index. |
- Source
appendOrigin(origin, index, timeopt)
Append an origin to the geometry.
Name | Type | Attributes | Description |
---|---|---|---|
origin | Point3D | The origin to append. | |
index | number | The index at which to append. | |
time | number | <optional> | Optional time index. |
- Source
equals(rhs) → {boolean}
Check for equality.
Name | Type | Description |
---|---|---|
rhs | Geometry | The object to compare to. |
- Source
True if both objects are equal.
- Type:
- boolean
getCurrentNumberOfSlicesBeforeTime(time) → {number|undefined}
Get the number of slices stored for time points preceding the input one.
Name | Type | Description |
---|---|---|
time | number | The time point to check. |
- Source
The count.
- Type:
- number |
undefined
getCurrentTotalNumberOfSlices() → {number}
Get the total number of slices. Can be different from what is stored in the size object during a volume with time points creation process.
- Source
The total count.
- Type:
- number
getInitialTime() → {number}
Get the time value that was passed at construction.
- Source
The time value.
- Type:
- number
getOrientation() → {Matrix33}
Get the object orientation.
- Source
The object orientation.
- Type:
- Matrix33
getOrigin() → {Point3D}
Get the object origin. This should be the lowest origin to ease calculations (?).
- Source
The object origin.
- Type:
- Point3D
getOrigins() → {Array.<Point3D>}
Get the object origins.
- Source
The object origins.
- Type:
- Array.<Point3D>
getRealSpacing() → {Spacing}
Get the image spacing in real world.
- Source
The object spacing.
- Type:
- Spacing
getSize(viewOrientationopt) → {Size}
Get the object size. Warning: the size comes as stored in DICOM, meaning that it could be oriented.
Name | Type | Attributes | Description |
---|---|---|---|
viewOrientation | Matrix33 | <optional> | The view orientation (optional). |
- Source
The object size.
- Type:
- Size
getSliceIndex(point, time) → {number}
Get the slice position of a point in the current slice layout. Slice indices increase with decreasing origins (high index -> low origin), this simplified the handling of reconstruction since it means the displayed data is in the same 'direction' as the extracted data. As seen in the getOrigin method, the main origin is the lowest one. This implies that the index to world and reverse method do some flipping magic...
Name | Type | Description |
---|---|---|
point | Point3D | The point to evaluate. |
time | number | Optional time index. |
- Source
The slice index.
- Type:
- number
getSpacing(viewOrientationopt) → {Spacing}
Get the object spacing. Warning: the spacing comes as stored in DICOM, meaning that it could be oriented.
Name | Type | Attributes | Description |
---|---|---|---|
viewOrientation | Matrix33 | <optional> | The view orientation (optional). |
- Source
The object spacing.
- Type:
- Spacing
hasSlicesAtTime(time) → {boolean}
Check if a time point has associated slices.
Name | Type | Description |
---|---|---|
time | number | The time point to check. |
- Source
True if slices are present.
- Type:
- boolean
includesOrigin(point3D, tol) → {boolean}
Check if a point is in the origin list.
Name | Type | Description |
---|---|---|
point3D | Point3D | The point to check. |
tol | number | The comparison tolerance default to Number.EPSILON. |
- Source
True if in list.
- Type:
- boolean
indexToWorld(index) → {Point}
Convert an index into world coordinates.
Name | Type | Description |
---|---|---|
index | Index | The index to convert. |
- Source
The corresponding point.
- Type:
- Point
isInBounds(point) → {boolean}
Check that a point is within bounds.
Name | Type | Description |
---|---|---|
point | Point | The point to check. |
- Source
True if the given coordinates are within bounds.
- Type:
- boolean
isIndexInBounds(index, dirsopt) → {boolean}
Check that a index is within bounds.
Name | Type | Attributes | Description |
---|---|---|---|
index | Index | The index to check. | |
dirs | Array.<number> | <optional> | Optional list of directions to check. |
- Source
True if the given coordinates are within bounds.
- Type:
- boolean
pointToWorld(point) → {Point3D}
Convert a 3D point into world coordinates.
Name | Type | Description |
---|---|---|
point | Point3D | The 3D point to convert. |
- Source
The corresponding world 3D point.
- Type:
- Point3D
toString() → {string}
Get a string representation of the geometry.
- Source
The geometry as a string.
- Type:
- string
worldToIndex(point) → {Index}
Convert world coordinates into an index.
Name | Type | Description |
---|---|---|
point | Point | The point to convert. |
- Source
The corresponding index.
- Type:
- Index
worldToPoint(point) → {Point3D}
Convert world coordinates into an point.
Name | Type | Description |
---|---|---|
point | Point | The world point to convert. |
- Source
The corresponding point.
- Type:
- Point3D