MakeMovie¶
- class controllers.MakeMovie¶
Bases:
handleMAKEMOVIE - 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 inobj.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
LwherelevelScaleFactors(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 asbigDataRoiBBand divided bylevelScaleFactors(L)per frame viaimcrop(rather than passingoptions.x/options.ywhich 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), ornewWidth / obj.origWidth(ROI) so thatutils.addScaleBarreceivesscale = newWidth / fullResWidthinstead 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.Tagto 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
updateWidgetsandcrop_Callbackwhenever the crop mode or dataset changes. MirrorsSnapshot.updateWidthHeight.
- widthEdit_Callback()¶
WIDTHEDIT_CALLBACK - Update height to maintain aspect ratio when width changes.