![]() |
Microscopy Image Browser
1.233
|
This class is resposnible to store the previous versions of the dataset, to be used for Undo (Ctrl+Z) command. More...
Public Member Functions | |
imageUndo (max_steps, max3d_steps) | |
imageUndo class constructor More... | |
function | clearContents () |
Set all elements of the class to default values. More... | |
function | store (type, data, img_info, options) |
Store the data. More... | |
function [
type , data , img_info , options ] = | undo (index) |
Recover the stored dataset. More... | |
function | removeItem (index) |
Delete a stored item. More... | |
function | replaceItem (index, type, data, img_info, options) |
Replace the stored item with a new dataset. More... | |
Public Attributes | |
enableSwitch | |
Enable/disable undo operation a variable to store whether Undo is available or not: More... | |
type | |
a variable to store type of the data: 'image', 'model', 'selection', 'mask',labels ,'measurement','everything' (for imageData.model_type=='uint6' only) More... | |
undoList | |
a structure to store the list of the actions for undo More... | |
max_steps | |
a variable to limit maximal number of history steps More... | |
max3d_steps | |
a variable to limit maximal number of history for the 3D datasets More... | |
undoIndex | |
a variable to keep index of NaN (currently restored dataset) element of the undoList structure More... | |
prevUndoIndex | |
a variable to keep previous index of NaN element of the undoList structure, for use with Ctrl+Z More... | |
index3d | |
an array of indeces of the 3D datasets More... | |
EVENT | none |
none More... | |
This class is resposnible to store the previous versions of the dataset, to be used for Undo (Ctrl+Z) command.
imageUndo.imageUndo | ( | max_steps, | |
max3d_steps | |||
) |
imageUndo class constructor
Constructor for the imageUndo class. Create a new instance of the class with default parameters
max_steps | maximal length of the history log |
max3d_steps | maximal length of the 3D history log |
References max3d_steps, and max_steps.
function imageUndo.clearContents | ( | ) |
Set all elements of the class to default values.
Examples:
Referenced by store().
function imageUndo.removeItem | ( | index | ) |
Delete a stored item.
index | [optional] - index of the item to remove, when empty will remove the last entry |
Examples:
function imageUndo.replaceItem | ( | index, | |
type, | |||
data, | |||
img_info, | |||
options | |||
) |
Replace the stored item with a new dataset.
index | an index of the item to replace, when empty replace the last entry |
type | a string that defines the type of the new dataset: 'image', 'model', 'selection', 'mask', 'everything' (for imageData.model_type=='uint6' only) |
data | a variable with the new dataset to store |
img_info | [optional] imageData.img_info containers.Map, not required for 'model', 'selection', 'mask', 'everything', can be NaN |
options | a structure with fields:
|
Examples:
References type.
function imageUndo.store | ( | type, | |
data, | |||
img_info, | |||
options | |||
) |
Store the data.
type | a string that defines the type of the stored data: 'image', 'model', 'selection', 'mask', 'everything' (for imageData.model_type=='uint6' only) |
data | a variable with actual 3D or 2D dataset to store |
img_info | [optional] a imageData.img_info containers.Map, not required for 'model', 'selection', 'mask', 'everything', can be NaN |
options | a structure with fields:
|
Examples:
References clearContents(), and type.
function [ type , data , img_info , options ] = imageUndo.undo | ( | index | ) |
Recover the stored dataset.
index | [Optional] - index of the dataset to restore. When omitted return the last stored dataset |
type | a string that defines the type of the stored data: 'image', 'model', 'selection', 'mask', 'everything' (for imageData.model_type=='uint6' only) |
data | a variable where to retrieve the dataset |
img_info | [optional, NaN for 2D] a imageData.img_info containers.Map, not required for 'model', 'selection', 'mask', 'everything' |
options | a structure with fields:
|
Examples:
imageUndo.enableSwitch |
Enable/disable undo operation a variable to store whether Undo is available or not:
imageUndo.index3d |
an array of indeces of the 3D datasets
imageUndo.max3d_steps |
a variable to limit maximal number of history for the 3D datasets
Referenced by imageUndo().
imageUndo.max_steps |
a variable to limit maximal number of history steps
Referenced by imageUndo().
imageUndo.none |
none
imageUndo.prevUndoIndex |
a variable to keep previous index of NaN element of the undoList structure, for use with Ctrl+Z
imageUndo.type |
a variable to store type of the data: 'image', 'model', 'selection', 'mask',labels
,'measurement','everything' (for imageData.model_type=='uint6' only)
Referenced by replaceItem(), and store().
imageUndo.undoIndex |
a variable to keep index of NaN (currently restored dataset) element of the undoList structure
imageUndo.undoList |
a structure to store the list of the actions for undo
labels
,'measurement','everything' (for imageData.model_type=='uint6' only)