MakeMovie

class controllers.MakeMovie

Bases: handle

MAKEMOVIE - Controller for the Make Movie dialog.

Renders a video file from the currently shown image stack. Supports z-stack and time-series directions, ROI/shown area cropping, scale bars, split channels, and volume viewer animations.

Constructor Summary
MakeMovie(mibModel, varargin)

MAKEMOVIE - Constructor for the MakeMovie controller.

Syntax:
controller = controllers.MakeMovie(mibModel)
controller = controllers.MakeMovie(mibModel, extraController)
controller = controllers.MakeMovie(mibModel, extraController, extraOptions)
Parameters:
  • instance (**mibModel** - handle to the MibModel)

  • * (**extraOptions**)

  • *

Property Summary
dimsPixSize

pixel width adjusted for anisotropic pixel size

extraController

cell array of listener handles

extraOptions

optional extra controller for volume rendering (VolRenApp)

listener

handle to the view (core.ChildView)

mibModel
origHeight

struct with extra rendering parameters; .mode = ‘spin’|’animation’

origWidth

original height of the image area in pixels

resizedWidth

original width of the image area in pixels

view

handle to MibModel

Method Summary
static ViewListner_Callback2(~, evnt)

VIEWLISTNER_CALLBACK2 - Standard listener callback with validity guard.

addCallbacks()

ADDCALLBACKS - Wire all widget callbacks to the gui_Callbacks dispatcher.

closeWindow()

CLOSEWINDOW - Close the dialog and clean up listeners.

continueBtn_Callback()

CONTINUEBTN_CALLBACK - Render and save a movie from the current dataset.

Syntax:
obj.continueBtn_Callback()

Iterates over the selected frame range (Z-stack or time series), fetches each RGB frame via obj.mibModel.getRGBimage, optionally crops to an ROI, resizes, optionally overlays a scale bar, and writes all frames into the movie file configured in obj.view.handles.

BigData pyramid-level selection - for BigData datasets (OME-Zarr / WSI), the function selects the finest pyramid level whose native resolution still covers the requested frame dimensions, avoiding full-res loads for every frame:

  • Shown-area mode - fetches at dataset.magFactor (current viewport resolution).

  • Full-image mode - selects the coarsest level L where levelScaleFactors(L) ≤ min(fullW/newW, fullH/newH).

  • ROI mode - same formula using obj.origWidth/obj.origHeight (ROI extent in full-res pixels); the bounding box is stored as bigDataRoiBB and divided by levelScaleFactors(L) per frame via imcrop (rather than passing options.x/options.y which are full-res coords incompatible with a downsampled pyramid level).

Scale bar correction - computed once on the first frame and reused as a cached strip for all subsequent frames. Uses levelImageSizes(1,2) (FullImage), scale / magFactor (ShownArea), or newWidth / obj.origWidth (ROI) so that utils.addScaleBar receives scale = newWidth / fullResWidth instead of a pyramid-level-relative ratio. ZX / ZY orientations are unaffected because the Z dimension is never pyramided.

Example - triggered by pressing the Continue / Render button in the MakeMovie dialog:

obj.continueBtn_Callback();   % all parameters read from obj.view.handles
crop_Callback()

CROP_CALLBACK - Update dimensions based on the crop/mode radio selection.

directionPopup_Callback()

DIRECTIONPOPUP_CALLBACK - Update last frame when direction changes. BUG FIX from MIB2: used handles.mibModel (undefined var); fixed to obj.mibModel.

formatPopup_Callback()

CODECPOPUP_CALLBACK - Update filename extension based on the selected codec.

gui_Callbacks(source, ~)

GUI_CALLBACKS - Dispatcher for all MakeMovie widget callbacks.

Syntax:
obj.gui_Callbacks(source, event)

Routes by source.Tag to the appropriate action method.

:param - obj - controllers.MakeMovie: :param - source - widget handle that fired the event: :param - event - event data: :type - event - event data: unused

heightEdit_Callback()

HEIGHTEDIT_CALLBACK - Update width to maintain aspect ratio when height changes.

help()

show help page

outputDir_Callback()

OUTPUTDIR_CALLBACK - Validate and update the output filename.

roiPopup_Callback()

ROIPOPUP_CALLBACK - Update the selected ROI and refresh the view.

scalebarCheck_Callback()

SCALEBAR_CALLBACK - Verify pixel size when scale bar is enabled.

selectFileBtn_Callback()

SELECTFILEBTN_CALLBACK - Open a save dialog for the output file.

splitChannelsCheck_Callback()

SPLITCHANNELSCHECK_CALLBACK - Enable/disable split channel controls.

updateWidgets()

UPDATEWIDGETS - Refresh all widgets to match the current dataset state.

updateWidthHeight()

UPDATEWIDTHHEIGHT - Recompute and apply image dimensions to the width/height fields.

Called from updateWidgets and crop_Callback whenever the crop mode or dataset changes. Mirrors Snapshot.updateWidthHeight.

widthEdit_Callback()

WIDTHEDIT_CALLBACK - Update height to maintain aspect ratio when width changes.