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

Get the 3D volume from the dataset, a wrapper function. More...

Functions

function
dataset = 
ib_getStack (type, handles, time_pnt, orient, col_channel, options)
 Get the 3D volume from the dataset, a wrapper function. More...
 

Detailed Description

Get the 3D volume from the dataset, a wrapper function.

Function Documentation

function dataset = ib_getStack (   type,
  handles,
  time_pnt,
  orient,
  col_channel,
  options 
)

Get the 3D volume from 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
time_pnt[optional], a time point to take, when NaN, take the currently shown time point
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.
  • .y -> [optional], [ymin, ymax] coordinates of the dataset to take after transpose, height
  • .x -> [optional], [xmin, xmax] coordinates of the dataset to take after transpose, width
  • .z -> [optional], [zmin, zmax] coordinates of the dataset to take after transpose, depth
Return values
dataseta cell array with the dataset, format - dataset{roiId}(1:height, 1:width, 1:color, 1:z); roiId=1 when one or no ROI selected.
Required fields of handles:
Required fields of options:

Examples:

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

Referenced by ib_anisotropicDiffusion(), ib_autoBrightness(), ib_contrastCLAHE(), ib_exportToFiji(), ib_invertImage(), ib_linearContrast(), ib_maskGenerator(), ib_sizeExclusionFilter(), ib_smoothImage(), imageFilterDoitBtn_Callback(), and ibimageMorphOpsGui>continueBtn_Callback().

Here is the caller graph for this function: