|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.pixelmed.geometry.GeometryOfVolume
public class GeometryOfVolume
A class to describe the spatial geometry of an entire volume of contiguous cross-sectional image slices.
The 3D coordinate space used is the DICOM coordinate space, which is LPH+, that is, the x-axis is increasing to the left hand side of the patient, the y-axis is increasing to the posterior side of the patient, and the z-axis is increasing toward the head of the patient.
| Field Summary | |
|---|---|
protected GeometryOfSlice[] |
frames
|
protected boolean |
isVolume
|
| Constructor Summary | |
|---|---|
protected |
GeometryOfVolume()
|
|
GeometryOfVolume(GeometryOfSlice[] frames)
|
| Method Summary | |
|---|---|
void |
checkAndSetVolumeSampledRegularlyAlongFrameDimension()
Check if the set of frames regularly sampled along the frame dimension. |
int |
findClosestSliceInSamePlane(GeometryOfSlice otherSlice)
Find the slice in the our geometry that is closest to the supplied slice geometry. |
String |
getColumnOrientation(int frame)
Get the letter representation of the orientation of the columns of this slice. |
double[] |
getDistanceAlongNormalFromOrigin()
Given the present geometry, determine the distances along the normal to the plane of the slices of the TLHC of each slice from the origin of the coordinate space (0,0,0). |
GeometryOfSlice |
getGeometryOfSlice(int frame)
Get the geometry of the selected slice. |
GeometryOfSlice[] |
getGeometryOfSlices()
Get the geometry of the slices. |
int |
getNumberOfSlices()
Get the number of slices. |
String |
getRowOrientation(int frame)
Get the letter representation of the orientation of the rows of this slice. |
boolean |
isVolumeSampledRegularlyAlongFrameDimension()
Is the set of frames regularly sampled along the frame dimension ? |
double[] |
lookupImageCoordinate(double[] location)
Given the present geometry, look up the location of a point specified in x,y and z coordinates of the point in the DICOM 3D coordinate space, and return the volume coordinates (column and row and frame offset). |
void |
lookupImageCoordinate(double[] offsets,
double[] location)
Given the present geometry, look up the location of a point specified in x,y and z coordinates of the point in the DICOM 3D coordinate space, and return the volume coordinates (column and row and frame offset). |
void |
lookupImageCoordinate(double[] location,
double column,
double row,
int frame)
Given the present geometry, look up the location of a point specified in image coordinates (column and row and frame offset) and return the x,y and z coordinates of the point in the DICOM 3D coordinate space. |
void |
lookupImageCoordinate(double[] location,
int column,
int row,
int frame)
Given the present geometry, look up the location of a point specified in image coordinates (column and row and frame offset) and return the x,y and z coordinates of the point in the DICOM 3D coordinate space. |
double[] |
lookupImageCoordinate(double column,
double row,
int frame)
Given the present geometry, look up the location of a point specified in image coordinates (column and row and frame offset) and return the x,y and z coordinates of the point in the DICOM 3D coordinate space. |
double[] |
lookupImageCoordinate(int column,
int row,
int frame)
Given the present geometry, look up the location of a point specified in image coordinates (column and row and frame offset) and return the x,y and z coordinates of the point in the DICOM 3D coordinate space. |
String |
toString()
Get a human-readable rendering of the geometry. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected GeometryOfSlice[] frames
protected boolean isVolume
| Constructor Detail |
|---|
protected GeometryOfVolume()
public GeometryOfVolume(GeometryOfSlice[] frames)
| Method Detail |
|---|
public final int getNumberOfSlices()
Get the number of slices.
public final GeometryOfSlice[] getGeometryOfSlices()
Get the geometry of the slices.
public final GeometryOfSlice getGeometryOfSlice(int frame)
Get the geometry of the selected slice.
frame - the offset along the frames from first frame, zero being no offset
public final double[] lookupImageCoordinate(int column,
int row,
int frame)
Given the present geometry, look up the location of a point specified in image coordinates (column and row and frame offset) and return the x,y and z coordinates of the point in the DICOM 3D coordinate space.
column - the offset along the column from the top left hand corner, zero being no offsetrow - the offset along the row from the top left hand corner, zero being no offsetframe - the offset along the frames from first frame, zero being no offset
public final void lookupImageCoordinate(double[] location,
int column,
int row,
int frame)
Given the present geometry, look up the location of a point specified in image coordinates (column and row and frame offset) and return the x,y and z coordinates of the point in the DICOM 3D coordinate space.
location - an array in which to return the x, y and z location in 3D spacecolumn - the offset along the column from the top left hand corner, zero being no offsetrow - the offset along the row from the top left hand corner, zero being no offsetframe - the offset along the frames from first frame, zero being no offset
public final double[] lookupImageCoordinate(double column,
double row,
int frame)
Given the present geometry, look up the location of a point specified in image coordinates (column and row and frame offset) and return the x,y and z coordinates of the point in the DICOM 3D coordinate space.
column - the offset along the column from the top left hand corner, zero being no offsetrow - the offset along the row from the top left hand corner, zero being no offsetframe - the offset along the frames from first frame, zero being no offset
public final void lookupImageCoordinate(double[] location,
double column,
double row,
int frame)
Given the present geometry, look up the location of a point specified in image coordinates (column and row and frame offset) and return the x,y and z coordinates of the point in the DICOM 3D coordinate space.
location - an array in which to return the x, y and z location in 3D spacecolumn - the offset along the column from the top left hand corner, zero being no offsetrow - the offset along the row from the top left hand corner, zero being no offsetframe - the offset along the frames from first frame, zero being no offsetpublic final double[] lookupImageCoordinate(double[] location)
Given the present geometry, look up the location of a point specified in x,y and z coordinates of the point in the DICOM 3D coordinate space, and return the volume coordinates (column and row and frame offset).
location - the x, y and z location in 3D space
public final void lookupImageCoordinate(double[] offsets,
double[] location)
Given the present geometry, look up the location of a point specified in x,y and z coordinates of the point in the DICOM 3D coordinate space, and return the volume coordinates (column and row and frame offset).
offsets - an array in which to return the column and row and frame offsets from the top left hand corner of the volumelocation - the x, y and z location in 3D spacepublic final int findClosestSliceInSamePlane(GeometryOfSlice otherSlice)
Find the slice in the our geometry that is closest to the supplied slice geometry.
Specifically, the shortest distance along the normal to the plane of the common orientation is chosen.
otherSlice - the geometry of the slice to match
public final double[] getDistanceAlongNormalFromOrigin()
Given the present geometry, determine the distances along the normal to the plane of the slices of the TLHC of each slice from the origin of the coordinate space (0,0,0).
public final boolean isVolumeSampledRegularlyAlongFrameDimension()
Is the set of frames regularly sampled along the frame dimension ?
public final void checkAndSetVolumeSampledRegularlyAlongFrameDimension()
Check if the set of frames regularly sampled along the frame dimension.
Method is public only to make it accessible from constructors in other packages.
public final String toString()
Get a human-readable rendering of the geometry.
toString in class Objectpublic final String getRowOrientation(int frame)
Get the letter representation of the orientation of the rows of this slice.
frame - the offset along the frames from first frame, zero being no offset
public final String getColumnOrientation(int frame)
Get the letter representation of the orientation of the columns of this slice.
frame - the offset along the frames from first frame, zero being no offset
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||