![]() |
Microscopy Image Browser 2.91
MIB
|
class is responsible to keep regions of interest (ROI) More...


Public Member Functions | |
| mibRoiRegion (mibImage) | |
| Constructor for the class. | |
| function | clearContents () |
| Set all elements of the class to default values. | |
| function | clearData () |
| Removes all values of the Data structures. | |
| function index = | findIndexByLabel (labelStr) |
| Finds index of a ROI that has Data.label == labelStr. | |
| function | addROI (mibController, type, index, coordinates, noPoints) |
| Adds ROI. | |
| function | imfreehandFun (mibController, index) |
| Adds impoly type of ROI using imfreehand tool. | |
| function | impolyFun (mibController, index, coordinates, noPoints) |
| Adds impoly type of ROI. | |
| function | imrectFun (mibController, index, coordinates) |
| Adds imrect type of ROI. | |
| function | imellipseFun (mibController, index, coordinates) |
| Adds imellipse type of ROI. | |
| function | storeROI (newData, index) |
| add or insert ROI information into the obj.Data structure | |
| function | removeROI (index) |
| removeROI(obj, index) Remove ROI(s) from the class | |
| function [ number , indices ] = | getNumberOfROI (orientation) |
| [number, indices] = getNumberOfROI(obj, orientation) Get number of stored ROI | |
| function | setDefaultOptions () |
| Set all values of the Options structure of the class to default values. | |
| function | updateOptions () |
| Update the Options structure of the class. | |
| function | resample (resampledRatio) |
| Recalculation of ROI position during image resampling. | |
| function | crop (cropF) |
| Recalculation of ROI position during image crop. | |
| function [ position , screenPosition ] = | drawROI (mibController, type, pos, instant) |
| draw a ROI object in the mibGUI.handles.mibImageAxes | |
| function | updateROIposition1 (new_position) |
| Update ROI position during movement of imrect and imellipse. | |
| function | updateROIposition2 (new_position) |
| Update position during movement of impoly, imline. | |
| function | addROIsToPlot (mibController, mode) |
| plot ROIs above the handles.mibImageAxes of mibGUI | |
| function bb = | getBoundingBox (index) |
| return the bounding box for the ROI | |
| function mask = | returnMask (index, Height, Width, orient, blockModeSwitch) |
| Return a bitmap mask of the specified ROI. | |
| function | updateROIScreenPosition (mode) |
| Updates position of ROI when plotting in mibGUI.handles.mibImageAxes. | |
Public Attributes | |
| roi | |
| a structure with ROI data: | |
| Data | |
a new structure for ROI data .Data.label - string with a label .Data.type - type, string: imrect, imellipse, impoly, imfreehand .Data.X - X-coordinates of points .Data.Y - Y-coordinates of points .Data.orientation - orientaion of the ROI: 1-xz, 2-yz, 4-yx .Data.BoundingBox - a structire with bounding box for the current ROI .x - [xmin, xmax]; .y - [ymin, ymax] | |
| Options | |
a structure with show options .Options.marker = s; - style 1 for markers .Options.markersize = 10; - size of markers .Options.linestyle = -; - style 1 for lines .Options.linewidth = 2 ; - width for lines .Options.color = w; - color style .Options.textcolorfg = y; - text color .Options.textcolorbg = none; - color for text background .Options.fontsize = 14; - size of the font .Options.showMarkers = 1; .Options.showLines = 1; .Options.showText = 0; | |
| mibImage | |
| handle to mibImage class | |
class is responsible to keep regions of interest (ROI)
| mibRoiRegion.mibRoiRegion | ( | mibImage | ) |
Constructor for the class.
Constructor for the mibRoiRegion class. Create a new instance of the class with default parameters
| mibImage | - handle to imageData class |
References mibImage.
| function mibRoiRegion.addROI | ( | mibController, | |
| type, | |||
| index, | |||
| coordinates, | |||
| noPoints ) |
Adds ROI.
| mibController | handle to mibController class, or it can be empty ([]) for imrect, when coordinates are provided |
| type | type of ROI to add: "imrect", "imellipse", "impoly", "imfreehand" |
| index | [optional] index of the ROI. If not empty will allow to modify a ROI with the provided index |
| coordinates | [optional] coordinates for placing the ROI, can be [] |
| noPoints | [@ optional] noPoints for the impoly type, dafault = 5 |
Examples:
| function mibRoiRegion.addROIsToPlot | ( | mibController, | |
| mode ) |
plot ROIs above the handles.mibImageAxes of mibGUI
| mibController | handle to mibController class |
| mode | a string that defines a mode of the shown image: shown (in most cases), or full (for panning) |
Examples:
References mibController.mibModel, and mibController.mibView.
| function mibRoiRegion.clearContents | ( | ) |
Set all elements of the class to default values.
Examples:
| function mibRoiRegion.clearData | ( | ) |
Removes all values of the Data structures.
Examples:
| function mibRoiRegion.crop | ( | cropF | ) |
Recalculation of ROI position during image crop.
| cropF | a vector [x1, y1, dx, dy, z1, dz] with parameters of the crop. Note! The units are pixels! |
Examples:
| function [ position , screenPosition ] = mibRoiRegion.drawROI | ( | mibController, | |
| type, | |||
| pos, | |||
| instant ) |
draw a ROI object in the mibGUI.handles.mibImageAxes
Creates an instanse of Matlab imroi class and store it in mibRoiRegion.roi.imroi
| mibController | handle to mibController class |
| type | a type of ROI: 'imline', 'imellipse' |
| pos | coordinates of the ROI
|
| instant | [optional], used only for imellipse to automatically get position of vertices. 1 or 0 (default). |
| position | coordinates of the selected area in the Data format |
| screenPosition | coordinagtes of the selected area in the imageAxes units |
Examples:
References mibController.mibModel, and mibController.mibView.
| function index = mibRoiRegion.findIndexByLabel | ( | labelStr | ) |
Finds index of a ROI that has Data.label == labelStr.
| labelStr | label string |
| index | index of the ROI that has the label |
Examples:
| function bb = mibRoiRegion.getBoundingBox | ( | index | ) |
return the bounding box for the ROI
| index | an index of ROI to get mask, use 0 - to get combined mask for all shown ROIs. It is also possible to use obj.Data.label field as string of chars |
| bb | a matrix with the bounding box information as [xmin, xmax, ymin, ymax] |
| function [ number , indices ] = mibRoiRegion.getNumberOfROI | ( | orientation | ) |
[number, indices] = getNumberOfROI(obj, orientation) Get number of stored ROI
| orientation | [optional] defines orienation, 1-xz, 2-yz, 4-yx, 0-get all. When omitted returns number of ROIs for the shown orientation |
| number | number of ROIs |
| indices | indices of ROIs |
Examples
| function mibRoiRegion.imellipseFun | ( | mibController, | |
| index, | |||
| coordinates ) |
Adds imellipse type of ROI.
| mibController | handle to mibController class |
| index | index of the ROI. If not empty will allow to modify a ROI with the provided index |
| coordinates | [optional] coordinates for placing the ROI manually, [x-center y-center, radiusX, radiusY] |
Examples:
References A(), B(), max, mibController.mibModel, mibController.mibView, min, and mibController.plotImage().

| function mibRoiRegion.imfreehandFun | ( | mibController, | |
| index ) |
Adds impoly type of ROI using imfreehand tool.
| mibController | handle to mibController class |
| index | index of the ROI. If not empty will allow to modify a ROI with the provided index |
Examples:
References mibInputDlg().

| function mibRoiRegion.impolyFun | ( | mibController, | |
| index, | |||
| coordinates, | |||
| noPoints ) |
Adds impoly type of ROI.
| mibController | handle to mibController class |
| index | index of the ROI. If not empty will allow to modify a ROI with the provided index |
| coordinates | [optional] coordinates for placing the ROI manually |
| noPoints | [optional] number of points in the polyline when adding a new ROI |
Examples:
References max, mibController.mibModel, mibController.mibView, min, and mibController.plotImage().

| function mibRoiRegion.imrectFun | ( | mibController, | |
| index, | |||
| coordinates ) |
Adds imrect type of ROI.
| mibController | a handle to mibController class |
| index | index of the ROI. If not empty will allow to modify a ROI with the provided index |
| coordinates | [optional] coordinates for placing the ROI manually |
Examples:
References max, mibController.mibModel, mibController.mibView, min, and mibController.plotImage().

| function mibRoiRegion.removeROI | ( | index | ) |
removeROI(obj, index) Remove ROI(s) from the class
| index | [optional], an index of the measurement point to remove, when empty or zero - removes all ROIs |
Examples
| function mibRoiRegion.resample | ( | resampledRatio | ) |
Recalculation of ROI position during image resampling.
| resampledRatio | a vector [ratioW, ratioH, ratioZ] ratio of new/old dimensions after resampling. |
Examples:
| function mask = mibRoiRegion.returnMask | ( | index, | |
| Height, | |||
| Width, | |||
| orient, | |||
| blockModeSwitch ) |
Return a bitmap mask of the specified ROI.
| index | an index of ROI to get mask, use 0 - to get combined mask for all shown ROIs. It is also possible to use obj.Data.label field as string of chars |
| Height | [optional] height of the image |
| Width | [optional] width of the image |
| orient | [optional] orientation of the dataset: 1-xz, 2-yz, 4-yz, 0-for all orientations. Default, the currently shown orientation. |
| blockModeSwitch | override the blockModeSwitch |
| mask | mask image [1:Height, 1:Width] |
Examples:
References max, mibConnectPoints(), and min.

| function mibRoiRegion.setDefaultOptions | ( | ) |
Set all values of the Options structure of the class to default values.
Examples:
| function mibRoiRegion.storeROI | ( | newData, | |
| index ) |
add or insert ROI information into the obj.Data structure
| newData | structure of a new measurement to insert. Fields should match those of obj.Data |
| index | [optional] position where to add the measurement, default - number of measurements in obj.Data + 1 |
Examples:
| function mibRoiRegion.updateOptions | ( | ) |
Update the Options structure of the class.
Examples:
References A(), mibInputMultiDlg(), and n.

| function mibRoiRegion.updateROIposition1 | ( | new_position | ) |
Update ROI position during movement of imrect and imellipse.
one of two functions resposible for update of Measure.roi. pos. The other one is Measure.updateROIposition2()
| new_position | a vector with coordinates of a new position [xmin, ymin, width, height] |
References max.
| function mibRoiRegion.updateROIposition2 | ( | new_position | ) |
Update position during movement of impoly, imline.
one of two functions resposible for update of Measure.roi. pos. The other one is Measure.updateROIposition1()
| new_position | a vector with coordinates of a new position [point_number][x, y] |
References max.
| function mibRoiRegion.updateROIScreenPosition | ( | mode | ) |
Updates position of ROI when plotting in mibGUI.handles.mibImageAxes.
| mode | identifier of the updating mode:
|
Examples
References max.
| mibRoiRegion.Data |
a new structure for ROI data .Data.label - string with a label .Data.type - type, string: imrect, imellipse, impoly, imfreehand .Data.X - X-coordinates of points .Data.Y - Y-coordinates of points .Data.orientation - orientaion of the ROI: 1-xz, 2-yz, 4-yx .Data.BoundingBox - a structire with bounding box for the current ROI .x - [xmin, xmax]; .y - [ymin, ymax]
| mibRoiRegion.mibImage |
handle to mibImage class
Referenced by mibRoiRegion().
| mibRoiRegion.Options |
a structure with show options .Options.marker = s; - style 1 for markers .Options.markersize = 10; - size of markers .Options.linestyle = -; - style 1 for lines .Options.linewidth = 2 ; - width for lines .Options.color = w; - color style .Options.textcolorfg = y; - text color .Options.textcolorbg = none; - color for text background .Options.fontsize = 14; - size of the font .Options.showMarkers = 1; .Options.showLines = 1; .Options.showText = 0;
| mibRoiRegion.roi |
a structure with ROI data:
imlineaddNewPositionCallback function