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

Update a 3D stack of the dataset, a wrapper function. More...

Functions

function  ib_setStack (type, stack, handles, time_pnt, orient, col_channel, options)
 Update a 3D stack of the dataset, a wrapper function. More...
 

Detailed Description

Update a 3D stack of the dataset, a wrapper function.

Function Documentation

function ib_setStack (   type,
  stack,
  handles,
  time_pnt,
  orient,
  col_channel,
  options 
)

Update a 3D stack 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)
stacka 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
time_pnt[optional], a time point to update, when NaN, take the currently shown time point
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
  • .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
Required fields of handles:
Required fields of options:

Examples:

ib_setDataset('image', dataset, handles); // update the shown Z-stack, in the shown orientation
ib_setDataset('image', dataset, handles, 14, 4); // update the Z-stack at time point 14, in yx orientation
ib_setDataset('model', dataset, handles, NaN, NaN, NaN, options.blockModeSwitch=1); // update the part of the shown Z-stack model 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 shown Z-stack model visible under ROI number 1

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

Here is the caller graph for this function: