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

Get the 2D slice from the dataset, the wrapper function. More...

Functions

function slice = ib_getSlice (type, handles, slice_no, orient, col_channel, options)
 Get the 2D slice from the dataset, the wrapper function. More...
 

Detailed Description

Get the 2D slice from the dataset, the wrapper function.

Function Documentation

function slice = ib_getSlice (   type,
  handles,
  slice_no,
  orient,
  col_channel,
  options 
)

Get the 2D slice from the dataset, the wrapper function.

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

Attention
The return value is an array of cells!
Parameters
typea type of the image to update, 'image', 'model', 'selection', 'mask', 'everything' (for imageData.model_type=='uint6' only)
handleshandles structure of im_browser.m
slice_no[optional], a number of the slice to get, when empty or NaN get the currently shown slice
orient[optional], get a slice in the desired orientation
  • 0 (default) gets the slice transposed to 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 obtain, when NaN [default] take the colors selected in the imageData.slices{3} variable, when 0 - take all colors of the dataset.
  • when type is 'model' col_channel may be NaN - to take all materials of the model or an integer to take specific material. In the later case the selected object will have index = 1.
optionsa structure with extra parameters
  • .blockModeSwitch -> override the block mode switch imageData.blockModeSwitch - 0 get full dataset / 1 - get dataset crop
  • .fillBg -> NaN->get ROI as a square; when .fillBg is an integer number, the script use this number to fill areas outside the ROI shape
  • .roiId -> an index of ROI to use, when 0 - get 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
Return values
slicean array of cells with 2D slices, format - slice{roiId}(1:height, 1:width, 1:color); roiId=1 when one or no ROI
Required fields of handles:
Required fields of options:

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

Here is the caller graph for this function: