public interface SurfaceManager
Modifier and Type | Field and Description |
---|---|
static int |
RENDER_TYPE_POINTS |
static int |
RENDER_TYPE_TRIANGLES |
static int |
RENDER_TYPE_WIREFRAME |
static int |
VIDEO_FORMAT_AVI_DIB |
static int |
VIDEO_FORMAT_AVI_MJPG |
static int |
VIDEO_FORMAT_AVI_PNG |
static int |
VIDEO_FORMAT_QUICKTIME_ANIMATION |
static int |
VIDEO_FORMAT_QUICKTIME_JPEG |
static int |
VIDEO_FORMAT_QUICKTIME_PNG |
static int |
VIDEO_FORMAT_QUICKTIME_RAW |
static int |
VIDEO_QUALITY_BEST |
static int |
VIDEO_QUALITY_FASTEST |
static int |
VIDEO_QUALITY_GOOD |
Modifier and Type | Method and Description |
---|---|
Surface |
addShapeFromLogical(List<ImageVolume> overlays,
String name,
int rgb,
double roiThreshold,
boolean shrinkWrap,
boolean maximum,
boolean imageSmoothing,
double width,
int kernelSize,
double resX,
double resY,
double resZ,
boolean surfaceSmoothing,
double pointError,
double featureAngle,
int iterations)
Adds a surface shape from a logical.
|
Surface |
addShapeFromOverlay(ImageVolume overlay,
String name,
int rgb,
double threshold,
boolean shrinkWrap,
boolean maximum,
boolean imageSmoothing,
double width,
int kernelSize,
double resX,
double resY,
double resZ,
boolean surfaceSmoothing,
double pointError,
double featureAngle,
int iterations)
Adds a surface shape from an overlay.
|
Surface |
addShapeFromROI(int roiColorIndex,
String name,
int rgb,
double roiThreshold,
boolean shrinkWrap,
boolean maximum,
boolean imageSmoothing,
double width,
int kernelSize,
double resX,
double resY,
double resZ,
boolean surfaceSmoothing,
double pointError,
double featureAngle,
int iterations)
Adds a surface shape from a ROI.
|
List<Surface> |
addShapesFromFile(String openLocation)
Adds a surface shape from file.
|
void |
captureSnapshot(String saveLocation)
Save a snapshot of the surface viewer to the specified location.
|
void |
captureVideoStart(String saveLocation,
int videoFormat,
int videoQuality,
int fps,
boolean animate)
Starts saving a captured video to the specified file location.
|
void |
captureVideoStop()
Stops the video capture.
|
void |
exportTo(String saveLocation,
String surfaceFormat,
Surface surfaces,
String options)
Exports the surface data to the specified file location.
|
List<Surface> |
getAddedShapes()
Returns a list of surfaces added to the base surface.
|
List<Shape> |
getAllPointsAndLines()
Returns a list of all points and lines.
|
Surface |
getBaseSurface()
Returns the base surface
|
JFrame |
getFrame()
Returns the parent window of the surface view.
|
List<Shape> |
getLines()
Returns a list of lines.
|
List<Shape> |
getPoints()
Returns a list of points.
|
Surface[] |
getSurfaces()
Returns an array of loaded surfaces.
|
float |
getThreshold()
Returns the threshold used to build the base surface.
|
double[] |
getViewTransform()
Returns the view transform (4x4).
|
void |
goToShape(Shape shape)
Move the current coordinate to the specified line or point shape.
|
void |
hideAll(boolean hidden)
Hide/show all the added surface shapes, lines, and points.
|
void |
lineToShape(Shape fromShape,
Shape toShape)
Adds a direct line between two shapes.
|
List<Analysis> |
measureAll()
Measure all added surface shapes, lines, and points.
|
void |
pauseScriptForUserInput()
Pauses execution of a running script.
|
void |
removeAll()
Remove all the added surface shapes, lines, and points.
|
void |
removeShape(Shape shape)
Remove a line or point shape.
|
void |
removeSurface(Surface surface)
Remove an added surface shape.
|
Object |
runPlugin(String pluginName,
String[] args)
Runs a surface plugin.
|
List<Analysis> |
runSurfaceAreaStats(Surface surface)
Runs surface area stats on the specified surface.
|
List<Analysis> |
runSurfaceVolumeStats(Surface surface)
Runs surface volume stats on the specified surface.
|
void |
saveAs(String saveLocation,
Surface surfaces,
boolean includeLinesAndPoints)
Saves the surface data in the Mango surface format.
|
void |
selectMenuOption(String name)
Selects menu options.
|
void |
setBackground(int rgb)
Sets the surface background
|
void |
setLighting(double ambient,
double diffuse,
double specular,
double horizontal,
double vertical)
Sets the lighting parameters.
|
void |
setMaterial(Surface surface,
int rgb,
boolean showOverlayColors,
boolean showOnlyThisOverlayColor,
boolean flatShading,
int renderType,
double transparency,
double emmisivity,
double shininess,
double searchDistance)
Sets the material parameters.
|
void |
setMenuOption(String name,
boolean value)
Sets menu items (typically checkboxes).
|
void |
surfaceToShape(Shape fromPoint,
Shape toPoint)
Adds a line along the surface bewteen two shapes.
|
void |
updateSurface()
Redraws the surface view.
|
static final int RENDER_TYPE_POINTS
static final int RENDER_TYPE_TRIANGLES
static final int RENDER_TYPE_WIREFRAME
static final int VIDEO_FORMAT_AVI_DIB
static final int VIDEO_FORMAT_AVI_MJPG
static final int VIDEO_FORMAT_AVI_PNG
static final int VIDEO_FORMAT_QUICKTIME_ANIMATION
static final int VIDEO_FORMAT_QUICKTIME_JPEG
static final int VIDEO_FORMAT_QUICKTIME_PNG
static final int VIDEO_FORMAT_QUICKTIME_RAW
static final int VIDEO_QUALITY_BEST
static final int VIDEO_QUALITY_FASTEST
static final int VIDEO_QUALITY_GOOD
Surface addShapeFromLogical(List<ImageVolume> overlays, String name, int rgb, double roiThreshold, boolean shrinkWrap, boolean maximum, boolean imageSmoothing, double width, int kernelSize, double resX, double resY, double resZ, boolean surfaceSmoothing, double pointError, double featureAngle, int iterations)
overlays
- the logicalname
- the name of the surfacergb
- the color of the surface as an RGB color introiThreshold
- the build threshold (0 to 1)shrinkWrap
- true to use shrinkwrap, false otherwisemaximum
- true if the threshold represents a maximum, false otherwiseimageSmoothing
- true to use image smoothing, false otherwisewidth
- FWHM of the image smoothing filterkernelSize
- kernel size of the image smoothing filterresX
- the output X resolutionresY
- the output Y resolutionresZ
- the output Z resolutionsurfaceSmoothing
- true to use surface smoothing, false otherwisepointError
- the point error thresholdfeatureAngle
- the feature angle thresholditerations
- number of iterations of surface smoothingSurface addShapeFromOverlay(ImageVolume overlay, String name, int rgb, double threshold, boolean shrinkWrap, boolean maximum, boolean imageSmoothing, double width, int kernelSize, double resX, double resY, double resZ, boolean surfaceSmoothing, double pointError, double featureAngle, int iterations)
overlay
- the overlayname
- the name of the surfacergb
- the color of the surface as an RGB color intthreshold
- the build thresholdshrinkWrap
- true to use shrinkwrap, false otherwisemaximum
- true if the threshold represents a maximum, false otherwiseimageSmoothing
- true to use image smoothing, false otherwisewidth
- FWHM of the image smoothing filterkernelSize
- kernel size of the image smoothing filterresX
- the output X resolutionresY
- the output Y resolutionresZ
- the output Z resolutionsurfaceSmoothing
- true to use surface smoothing, false otherwisepointError
- the point error thresholdfeatureAngle
- the feature angle thresholditerations
- number of iterations of surface smoothingSurface addShapeFromROI(int roiColorIndex, String name, int rgb, double roiThreshold, boolean shrinkWrap, boolean maximum, boolean imageSmoothing, double width, int kernelSize, double resX, double resY, double resZ, boolean surfaceSmoothing, double pointError, double featureAngle, int iterations)
roiColorIndex
- the ROI color indexname
- the name of the surfacergb
- the color of the surface as an RGB color introiThreshold
- the build threshold (0 to 1)shrinkWrap
- true to use shrinkwrap, false otherwisemaximum
- true if the threshold represents a maximum, false otherwiseimageSmoothing
- true to use image smoothing, false otherwisewidth
- FWHM of the image smoothing filterkernelSize
- kernel size of the image smoothing filterresX
- the output X resolutionresY
- the output Y resolutionresZ
- the output Z resolutionsurfaceSmoothing
- true to use surface smoothing, false otherwisepointError
- the point error thresholdfeatureAngle
- the feature angle thresholditerations
- number of iterations of surface smoothingList<Surface> addShapesFromFile(String openLocation)
openLocation
- the file to loadvoid captureSnapshot(String saveLocation)
saveLocation
- the location to save the snapshot filevoid captureVideoStart(String saveLocation, int videoFormat, int videoQuality, int fps, boolean animate)
saveLocation
- the location to save the video filevideoFormat
- the video format code (see constants)videoQuality
- the video quality code (see constants)fps
- the frames per secondanimate
- true to automatically animate the projection, false otherwisevoid captureVideoStop()
void exportTo(String saveLocation, String surfaceFormat, Surface surfaces, String options)
saveLocation
- the location to save the surface filesurfaceFormat
- the name of the surface plugin formatsurfaces
- specify a single surface to save or "null" to save all surfacesoptions
- options specific to this surface formatList<Surface> getAddedShapes()
List<Shape> getAllPointsAndLines()
Surface getBaseSurface()
JFrame getFrame()
Surface[] getSurfaces()
float getThreshold()
double[] getViewTransform()
void goToShape(Shape shape)
shape
- the line or point shapevoid hideAll(boolean hidden)
hidden
- true to hide, false to showvoid lineToShape(Shape fromShape, Shape toShape)
fromShape
- the first shapetoShape
- the second shapeList<Analysis> measureAll()
void pauseScriptForUserInput()
void removeAll()
void removeShape(Shape shape)
shape
- the line or point to removevoid removeSurface(Surface surface)
surface
- the surface to removeObject runPlugin(String pluginName, String[] args)
pluginName
- the plugin nameargs
- plugin argumentsList<Analysis> runSurfaceAreaStats(Surface surface)
surface
- the specified surfaceList<Analysis> runSurfaceVolumeStats(Surface surface)
surface
- the specified surfacevoid saveAs(String saveLocation, Surface surfaces, boolean includeLinesAndPoints)
saveLocation
- the location to save the surface filesurfaces
- specify a single surface to save or "null" to save all surfacesincludeLinesAndPoints
- true to save lines and points, false otherwisevoid selectMenuOption(String name)
name
- the menu item namevoid setBackground(int rgb)
rgb
- an RGB color intvoid setLighting(double ambient, double diffuse, double specular, double horizontal, double vertical)
ambient
- the ambient light parameter (0 to 1)diffuse
- the diffuse light parameter (0 to 1)specular
- the specular light parameter (0 to 1)horizontal
- the horizontal light position (-1 to 1)vertical
- the vertical light position (-1 to 1)void setMaterial(Surface surface, int rgb, boolean showOverlayColors, boolean showOnlyThisOverlayColor, boolean flatShading, int renderType, double transparency, double emmisivity, double shininess, double searchDistance)
surface
- the surfacergb
- the surface color as an RGB color intshowOverlayColors
- true to show overlay colors on the surface, false otherwiseshowOnlyThisOverlayColor
- true to show only the overlay associated with this surface, false otherwiseflatShading
- true to use flat shading, false otherwiserenderType
- the render type (see constants)transparency
- the transparency parameter (0 to 1)emmisivity
- the emmisivity parameter (0 to 1)shininess
- the shininess parameter (0 to 1)searchDistance
- the distance (mm) to search above and below the surface when building overlay colorsvoid setMenuOption(String name, boolean value)
name
- the menu item namevalue
- the menu item valuevoid surfaceToShape(Shape fromPoint, Shape toPoint)
fromPoint
- the first pointtoPoint
- the second pointvoid updateSurface()