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

Get complete 4D volume of the dataset, a wrapper function. More...

Functions

function
dataset = 
ib_getDataset (type, handles, orient, col_channel, options)
 Get complete 4D volume of the dataset, a wrapper function. More...
 

Detailed Description

Get complete 4D volume of the dataset, a wrapper function.

Function Documentation

function dataset = ib_getDataset (   type,
  handles,
  orient,
  col_channel,
  options 
)

Get complete 4D volume of the dataset, a wrapper function.

This is a wrapper function, it uses the functions of the imageData class to get the whole 3D dataset at once. When ROIs regions are shown in the axes (handles.roiShowCheck checkbox) the function returns the ROI areas.

Attention
The output value is an array of cells!
Parameters
typea type of the image to get, 'image', 'model', 'selection', 'mask', 'everything' (for imageData.model_type=='uint6' only)
handleshandles structure of im_browser.m
orient[optional], can be NaN
  • when 0 (default) returns the dataset transposed to the current orientation (obj.orientation)
  • when 1 returns transposed dataset to the zx configuration: [y,x,c,z] -> [x,z,c,y]
  • when 2 returns transposed dataset to the zy configuration: [y,x,c,z] -> [y,z,c,y]
  • when 3 not used
  • when 4 returns original dataset to the yx configuration: [y,x,c,z]
  • when 5 not used
col_channel[optional],
  • when type is 'image', col_channel is a vector with color numbers to get, 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 0 - to get all materials of the model or an integer to get specific material.
optionsa structure with extra parameters
  • .blockModeSwitch -> override the block mode switch imageData.blockModeSwitch 0 get full dataset / 1 - get dataset crop to the shown area
  • .fillBg -> NaN (default) -> get ROI as a square; when .fillBg is an integer number, the script will use this number to fill areas outside the ROI shape
  • .roiId -> an index of ROI to use, when 0 - use all shown ROIs. Also it is possible to define ROI by its label as string of chars.
  • .t -> current, time point to get a 3D dataset
Return values
dataseta cell array with the dataset, format - dataset{roiId}(1:height, 1:width, 1:color, 1:z, 1:t); roiId=1 when one or no ROI selected.
Required fields of handles:
Required fields of options:

Examples:

dataset = ib_getDataset('image', handles); // get the whole Image stack in yx orientation
dataset = ib_getDataset('image', handles, NaN, 4, 2); // get the whole Image stack in yx orientation for color channel=2
dataset = ib_setDataset('model', handles, NaN, NaN, NaN, options.blockModeSwitch=1); // get the part of the whole model stack visible in the viewing window
dataset = ib_getDataset('model', handles, NaN, NaN, NaN, options.roiId=1); // when handles.roiShowCheck enabled - get the part of the whole model stack visible under ROI number 1

Referenced by ib_moveLayers(), ib_removeBackground(), ib_segmentation_SmartWatershed(), menuMaskInvert(), menuSelectionInvert(), model_cm_Callback(), ibMorphOpsGui>continueBtn_Callback(), and ManGridBW>startBtn_Callback().

Here is the caller graph for this function: