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

Resize 3D dataset. More...

Functions

function imgOut = mib_resize3d (img, scale, options)
 Resize 3D dataset. More...
 

Detailed Description

Resize 3D dataset.

Function Documentation

function imgOut = mib_resize3d (   img,
  scale,
  options 
)

Resize 3D dataset.

Resizing algorithms
  • imresize - [default] (fastest) use imresize to resize XY dimension after resize the Z-dimension, gives somewhat softer images than other methods;
  • interpn - interpolation for 1-D, 2-D, 3-D, and N-D gridded data in ndgrid format, quite fast but requires more memory that other methods
  • tformarray - resize using a spatial transformation to N-D array, quite slow but more memory friendly comparing to interpn
Parameters
imga 3D (y,x,z) or 4D (y,x,c,z) dataset for resize
scalea number or a vector [scaleY, scaleX, scaleZ] for each dimension with resizing scaling factor, could be empty when options.width, options.height, options.depth fields are used
options[optional], additional options
  • .algorithm - a string with resizing algorithm: imresize, interpn, tformarray, see below for notes
  • .width - a new width value, overrides the scale parameter
  • .height - a new height value, overrides the scale parameter
  • .depth - a new depth value, overrides the scale parameter
  • .method - interpolation method, specified as a string that identifies a general method or a named interpolation kernel: imresize: nearest, bilinear, bicubic, box, triangle, cubic, lanczos2, lanczos3; interpn: linear, nearest, pchip, cubic, spline; tformarray - nearest, linear,cubic
  • .imgType - a string with type of the dataset 4D or 3D
  • .showWaitbar -> [optional], when 1-default, show the wait bar, when 0 - do not show the waitbar
Return values
imgOutresampled dataset
Required fields of options:

Referenced by ibresampleGui>resampleBtn_Callback(), mibClassifier>calcFeaturesBtn_Callback(), mibClassifier>predictDatasetBtn_Callback(), mibClassifier>previewSuperpixelsBtn_Callback(), mibClassifier>superpixelsBtn_Callback(), mibClassifier>trainClassifierBtn_Callback(), saveBigDataViewerFormat(), and volrenToolbarSwitch_ClickedCallback().

Here is the caller graph for this function: