Microscopy Image Browser  1.233
All Classes Files Functions Variables Pages
ib_setSlice.m File Reference

Update the 2D slice of the dataset, the wrapper function. More...

Functions

function  ib_setSlice (type, slice, handles, slice_no, orient, col_channel, options)
 Update the 2D slice of the dataset, the wrapper function. More...
 

Detailed Description

Update the 2D slice of the dataset, the wrapper function.

Function Documentation

function ib_setSlice (   type,
  slice,
  handles,
  slice_no,
  orient,
  col_channel,
  options 
)

Update the 2D slice of the dataset, the wrapper function.

This is a wrapper function, it uses the functions of the imageData class to update a slice of the dataset. When ROIs regions are shown in the axes (handles.roiShowCheck checkbox) the function updates only those ROI areas.

Attention
The input value is an array of cells!

type: a type of the image to update, 'image', 'model', 'selection', 'mask', 'everything' (for imageData.model_type=='uint6' only) slice: a cell array with the slice slice{roiId}(1:height, 1:width, 1:color); roiId=1 when one or no ROI handles: handles structure of im_browser.m slice_no: [optional], a number of the slice to update, when empty or NaN update the currently shown slice orient: [optional], update a slice of the desired orientation

  • 0 (default) updates the slice transposed from the current orientation (obj.orientation)
  • 1 - xz
  • 2 - yz
  • 4 - xy
  • NaN - the current orientation col_channel: [optional],
    • when type is image, col_channel is a vector with color numbers to update, when NaN [default] update set the colors selected in the imageData.slices{3} variable; when 0 - update all colors of the dataset.
    • when type is model col_channel may be 0 - to update all materioals of the model or an integer to update specific material. options: a structure with extra parameters
    • .blockModeSwitch -> override the block mode switch imageData.blockModeSwitch 0 update full dataset / 1 - update cropped dataset
    • .fillBg -> when NaN (default) -> crop slice with respect to the roi shape; when .fillBg is 1 update as a rectangle area
    • .roiId -> index of roi to use, when 0 - update all shown ROIs. Also it is possible to define ROI by its label as string
    • .t -> [optional], [tmin, tmax] the time point of the dataset; default is the currently shown time point
    Required fields of handles:
    Required fields of options:

Examples:

ib_setSlice('image', slice, handles, 5); // update the 5-th slice of the current stack orientation
ib_setSlice('image', slice, handles, 5, 4, 2); // update the 5-th slice of the XY-orientation, color channel=2
ib_setSlice('model', slice, handles, 5, NaN, NaN, options.blockModeSwitch=1); // update the cropped to the viewing window 5-th slice of the current orientation, color channel=2 from the model
ib_getSlice('model', slice, handles, 5, NaN, NaN, options.roiId=1); // when handles.roiShowCheck enabled - update a slice that contains image under ROI number 1

Referenced by ib_anisotropicDiffusion(), ib_contrastCLAHE(), ib_invertImage(), ib_linearContrast(), ib_maskGenerator(), ib_moveLayers(), ib_segmentation_SmartWatershed(), ib_sizeExclusionFilter(), imageFilterDoitBtn_Callback(), ibimageMorphOpsGui>continueBtn_Callback(), ibMorphOpsGui>continueBtn_Callback(), ManGridBW>startBtn_Callback(), and ManGridBW>thresholdsTable_CellEditCallback().

Here is the caller graph for this function: