![]() |
Microscopy Image Browser
1.233
|
class is resposnible to keep regions of interest (ROI) More...
Public Member Functions | |
roiRegion (hImg) | |
Constructor for the class. More... | |
function | clearContents () |
Set all elements of the class to default values. More... | |
function | addROI (handles, type, index, coordinates, noPoints) |
Adds ROI. More... | |
function | imfreehandFun (handles, index) |
Adds impoly type of ROI using imfreehand tool. More... | |
function | impolyFun (handles, index, coordinates, noPoints) |
Adds impoly type of ROI. More... | |
function | imrectFun (handles, index, coordinates) |
Adds imrect type of ROI. More... | |
function | imellipseFun (handles, index, coordinates) |
Adds imellipse type of ROI. More... | |
function | storeROI (newData, index) |
add or insert ROI information into the obj.Data structure More... | |
function | removeROI (index) |
removeROI(obj, index) Remove ROI(s) from the class More... | |
function [
number , indices ] = | getNumberOfROI (orientation) |
[number, indices] = getNumberOfROI(obj, orientation) Get number of stored ROI More... | |
function | setDefaultOptions () |
Set all values of the Options structure of the class to default values. More... | |
function | updateOptions () |
Update the Options structure of the class. More... | |
function | resample (resampledRatio) |
Recalculation of ROI position during image resampling. More... | |
function | crop (cropF) |
Recalculation of ROI position during image crop. More... | |
function [
position , screenPosition ] = | drawROI (handles, type, pos, instant) |
draw a ROI object in the handles.imageAxes More... | |
function | updateROIposition1 (new_position) |
Update ROI position during movement of imrect and imellipse. More... | |
function | updateROIposition2 (new_position) |
Update position during movement of impoly, imline. More... | |
function
handles = | addROIsToPlot (handles, mode) |
plot ROIs above the imageAxes of im_browser More... | |
function mask = | returnMask (index, Height, Width, orient, blockModeSwitch) |
Return a bitmap mask of the specified ROI. More... | |
function | updateROIScreenPosition (mode) |
Updates position of ROI when plotting in handles.imageAxes. More... | |
Public Attributes | |
roi | |
a structure with ROI data: More... | |
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 More... | |
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; More... | |
hImg | |
handle to imageData class More... | |
class is resposnible to keep regions of interest (ROI)
roiRegion.roiRegion | ( | hImg | ) |
function roiRegion.addROI | ( | handles, | |
type, | |||
index, | |||
coordinates, | |||
noPoints | |||
) |
Adds ROI.
handles | handles structure of im_browser |
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 handles = roiRegion.addROIsToPlot | ( | handles, | |
mode | |||
) |
plot ROIs above the imageAxes of im_browser
handles | handles structure of im_browser.m |
mode | a string that defines a mode of the shown image: shown (in most cases), or full (for panning) |
Examples:
function roiRegion.clearContents | ( | ) |
Set all elements of the class to default values.
Examples:
Examples:
Examples:
function roiRegion.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 ] = roiRegion.drawROI | ( | handles, | |
type, | |||
pos, | |||
instant | |||
) |
draw a ROI object in the handles.imageAxes
Creates an instanse of Matlab imroi
class and store it in roiRegion.roi.imroi
handles | handles structure of im_browser.m |
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:
function [ number , indices ] = roiRegion.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 roiRegion.imellipseFun | ( | handles, | |
index, | |||
coordinates | |||
) |
Adds imellipse type of ROI.
handles | handles structure of im_browser |
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 getClickPoint().
function roiRegion.imfreehandFun | ( | handles, | |
index | |||
) |
Adds impoly type of ROI using imfreehand tool.
handles | handles structure of im_browser |
index | index of the ROI. If not empty will allow to modify a ROI with the provided index |
Examples:
References mib_inputdlg().
function roiRegion.impolyFun | ( | handles, | |
index, | |||
coordinates, | |||
noPoints | |||
) |
Adds impoly type of ROI.
handles | handles structure of im_browser |
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 getClickPoint().
function roiRegion.imrectFun | ( | handles, | |
index, | |||
coordinates | |||
) |
Adds imrect type of ROI.
handles | handles structure of im_browser |
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 getClickPoint().
function roiRegion.removeROI | ( | index | ) |
function roiRegion.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 = roiRegion.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 ib_connectPoints().
function roiRegion.setDefaultOptions | ( | ) |
Set all values of the Options structure of the class to default values.
Examples:
function roiRegion.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 |
n | [optional] position where to add the measurement, default - number of measurements in obj.Data + 1 |
Examples:
function roiRegion.updateOptions | ( | ) |
Update the Options structure of the class.
Examples:
function roiRegion.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] |
function roiRegion.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] |
function roiRegion.updateROIScreenPosition | ( | mode | ) |
Updates position of ROI when plotting in handles.imageAxes.
mode | identifier of the updating mode:
|
Examples
roiRegion.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
Referenced by mibmeasureTool>saveBtn_Callback(), and roiSaveBtn_Callback().
roiRegion.hImg |
handle to imageData class
Referenced by roiRegion().
roiRegion.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;
Referenced by classRF_train(), get_black_white_filter(), ib_anisotropicDiffusion(), menuModelsSaveAs(), model_cm_Callback(), and regRF_train().
roiRegion.roi |
a structure with ROI data:
imline
addNewPositionCallback
function Referenced by do_andiff_filtering(), do_andiff_filtering_backup(), do_diplib_andiff_filtering(), ib_anisotropicDiffusion(), ib_autoBrightness(), ib_linearContrast(), ib_smoothImage(), imageFilterDoitBtn_Callback(), menuImageIntensity(), menuImageProfileArbitrary_Callback(), menuImageProfileLine_Callback(), menuMaskInvert(), menuSelectionInvert(), and menuToolsMeasure().