public interface CanAddROIToFrame
Modifier and Type | Method and Description |
---|---|
boolean |
addROI(ROI roi)
Add an ROI to the frame.
|
void |
addROIs(java.util.List<ROI> rois)
Add a java.util.List of ROIs to the Frame.
|
void |
exchangeROIs(java.util.List<ROI> oldROIs,
java.util.List<ROI> newROIs,
ROIEditAction editAction)
Exchange one java.util.List of ROIs with another
java.util.List of ROIs in this Frame.
|
java.util.List<ROI> |
getDeletedROIs()
Returns a java.util.List of deleted (not current) ROIs for the
image displayed.
|
java.util.List<ROI> |
getDeletedROIs(int slice)
Returns a java.util.List of deleted (not current) ROIs for one slice of the
image displayed.
|
javax.swing.JFrame |
getFrame()
Returns the javax.swing.JFrame to which the ROI(s) will be added.
|
byte[] |
getROIOutput()
Returns the current set of both current and deleted ROIs, outputted as text to a byte[].
|
java.util.List<ROI> |
getROIs()
Returns a java.util.List of current (not deleted) ROIs for the
image displayed.
|
java.util.List<ROI> |
getROIs(int slice)
Returns a java.util.List of current (not deleted) ROIs for one slice of the
image displayed.
|
java.util.List<ROI> |
getSelectedROIs()
Returns a java.util.List of selected ROIs for the image displayed.
|
java.lang.Integer |
getSelectedSlice()
Returns the number of the selected image slice in this CanAddROIToFrame.
|
boolean |
hasCurrentROIs()
Tests whether a CanAddROIToFrame has current (not deleted) ROIs.
|
void |
maskImage(int slice,
java.util.List<ROI> ROIs,
MaskAction maskAction,
double maskValue,
CombineMode combineMode)
Use the supplied ROIs in the slice to mask the image.
|
void |
previewROIs(java.util.List<ROI> rois)
Previews a java.util.List of ROIs in the frame.
|
void |
showError(java.lang.String message)
Shows an error message in the CanAddROIToFrame.
|
void |
showROIToolkit()
Show the tool that is used to interactively create, modify and delete ROIs.
|
void |
showStatus(java.lang.String message)
Shows a status message in the CanAddROIToFrame.
|
boolean |
unloadROIs()
Unload all ROIs from the frame.
|
boolean |
unloadROIs(boolean noQuery)
Unload all ROIs from the frame, optionally unloading without querying the user.
|
boolean |
unloadROIs(java.awt.Component c,
boolean noQuery)
Unload all ROIs from the CanAddROIToFrame, optionally unloading without
querying the user.
|
javax.swing.JFrame getFrame()
java.lang.Integer getSelectedSlice()
void addROIs(java.util.List<ROI> rois) throws ROIException
rois
- the java.util.List of ROIs to add.ROIException
- if one or more of the ROIs couldn't be added.boolean addROI(ROI roi)
roi
- the ROI to add.void exchangeROIs(java.util.List<ROI> oldROIs, java.util.List<ROI> newROIs, ROIEditAction editAction) throws ROIException
oldROIs
- the current java.util.List of ROIs to change.newROIs
- the new java.util.List of ROIs that will be substituted.editAction
- the ROIEditAction that records the action that resulted in
the exchange.ROIException
- if the exchange couldn't be made.void previewROIs(java.util.List<ROI> rois)
rois
- the java.util.List of ROIs to preview.boolean hasCurrentROIs() throws ROIException
ROIException
- if there is no image displayed.java.util.List<ROI> getROIs() throws ROIException
ROIException
- if there is no image displayed.java.util.List<ROI> getROIs(int slice) throws ROIException
slice
- the slice number for the image.ROIException
- if the slice number is invalid.java.util.List<ROI> getSelectedROIs()
java.util.List<ROI> getDeletedROIs() throws ROIException
ROIException
- if there is no image displayed.byte[] getROIOutput() throws java.io.IOException
java.io.IOException
- if an error occurs while writing the ROIs to the byte[].java.util.List<ROI> getDeletedROIs(int slice) throws ROIException
slice
- the slice number for the image.ROIException
- if the slice number is invalid.void maskImage(int slice, java.util.List<ROI> ROIs, MaskAction maskAction, double maskValue, CombineMode combineMode) throws ROIException
slice
- the slice of the image to be masked.ROIs
- a java.util.List of ROIs to be used as a mask.maskAction
- one of:
maskValue
- the value to which pixel intensities will be changed. If maskValue is
non-integer, then its value will be rounded to the nearest integer for Integer pixel
value types. If the maskValue is outside the dynamic range of the pixel value type, then it
will be truncated.combineMode
- governs the way in which multiple ROIs are combined before the
mask is applied. One of:
CombineMode.UNION - a region is formed which is the union
of all selected ROIs;
CombineMode.INTERSECTION - a region is formed which is the intersection
of all selected ROIs;
CombineMode.XOR - a region is formed which is the exclsive OR
of all selected ROIs.ROIException
- if there is no current displayed image or if the displayed image doesn't
have a slice selected, or if the selected slice has no ROIs.boolean unloadROIs()
boolean unloadROIs(boolean noQuery)
noQuery
- if true, the ROIs will be unloaded without querying the user.boolean unloadROIs(java.awt.Component c, boolean noQuery)
c
- the component used as the parent of any javax.swing.JOptionPane used to
query the user.noQuery
- if true, the ROIs will be unloaded without querying the user.void showROIToolkit()
void showError(java.lang.String message)
message
- the error message to show.void showStatus(java.lang.String message)
message
- the status message to show.Copyright 2017 Xinapse Systems Limited. All Rights Reserved.