public class SbDiscreteLineProfile extends Inventor
See also:
Inventor.ConstructorCommand
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SbDiscreteLineProfile(SbVec2i32 p1,
SbVec2i32 p2,
SoImageDataAdapter image)
Constructor defining the profile line on the image.
|
SbDiscreteLineProfile(SbVec3i32 p1,
SbVec3i32 p2,
SoImageDataAdapter image)
Constructor defining the profile line on the image.
|
SbDiscreteLineProfile(SbVec4i32 p1,
SbVec4i32 p2,
SoImageDataAdapter image)
Constructor defining the profile line on the image.
|
Modifier and Type | Method and Description |
---|---|
SbVec4i32 |
getFirstPosition()
Returns the first point.
|
SbVec4i32 |
getLastPosition()
Returns the last point.
|
long |
getLength()
Returns the length of extracted data (i.e.
|
SbVec4i32 |
getPosition(int index)
Returns the position along the line at specified displacement relatively to first point.
|
double |
getValue(int index)
Calls getValue(index, (int)0).
|
double |
getValue(int index,
int component)
Returns the value along the line at specified displacement relatively to first point.
|
double |
getValueAt(int i) |
void |
setValue(SbDiscreteLineProfile copyFrom) |
dispose, getAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads
public SbDiscreteLineProfile(SbVec3i32 p1, SbVec3i32 p2, SoImageDataAdapter image)
p1
- begin point of the profile. Can be a 2d, 3d and 3d+t point.
p2
- end point of the profile. Can be a 2d, 3d and 3d+t point.
image
- image to profile. Cannot be NULL. Throws an SbException if any p1 or p2 are out of image. Throws an SbException if image is NULL.public SbDiscreteLineProfile(SbVec2i32 p1, SbVec2i32 p2, SoImageDataAdapter image)
p1
- begin point of the profile. Can be a 2d, 3d and 3d+t point.
p2
- end point of the profile. Can be a 2d, 3d and 3d+t point.
image
- image to profile. Cannot be NULL. Throws an SbException if any p1 or p2 are out of image. Throws an SbException if image is NULL.public SbDiscreteLineProfile(SbVec4i32 p1, SbVec4i32 p2, SoImageDataAdapter image)
p1
- begin point of the profile. Can be a 2d, 3d and 3d+t point.
p2
- end point of the profile. Can be a 2d, 3d and 3d+t point.
image
- image to profile. Cannot be NULL. Throws an SbException if any p1 or p2 are out of image. Throws an SbException if image is NULL.public double getValue(int index)
public SbVec4i32 getPosition(int index)
getLength
), Throws an SbException if index is out of bounds.public void setValue(SbDiscreteLineProfile copyFrom)
public SbVec4i32 getFirstPosition()
public double getValue(int index, int component)
index
- component
- choose the component of the voxel. Default is 0 which correspond to 1-component image. Range of index is between 0 and n-1 with n, the number of voxels in the segment (see getLength
). Range of component is between 0 and c - 1 with c is the number of component of the image ( e.g c = 1 for grayscale, c = 3 for RGB, c = 4 for RGBA ). Throws an SbException if index is out of bounds.public long getLength()
public double getValueAt(int i)
public SbVec4i32 getLastPosition()
Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com