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

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

Functions

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

Detailed Description

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

Function Documentation

function ib_setDataset (   type,
  dataset,
  handles,
  orient,
  col_channel,
  options 
)

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

This is a wrapper function, it uses the functions of the imageData class to update the whole volume in 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!
Parameters
typea type of the image to update, 'image', 'model', 'selection', 'mask', 'everything' (for imageData.model_type=='uint6' only)
dataseta cell array with the datasets dataset{roiId}(1:height, 1:width, 1:color, 1:z); roiId=1 when one or no ROI
handleshandles structure of im_browser.m
orient[optional], can be NaN or empty
  • 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 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 NaN - to update all materials of the model or an integer to update specific material.
optionsa 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 -> current, time point to get a 3D dataset
Required fields of handles:
Required fields of options:

Examples:

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

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

Here is the caller graph for this function: