Microscopy Image Browser 2.91
MIB
Loading...
Searching...
No Matches
mibVolRenController Class Reference

class is responsible for 3D rendering of volumes or models More...

Inheritance diagram for mibVolRenController:
Collaboration diagram for mibVolRenController:

Public Member Functions

 mibVolRenController (mibModel, options)
 class constructor
 
function  closeWindow ()
 closing mibVolRenController window
 
function  updateWidgets ()
 update widgets of this window
 
function  mibVolRenGUI_SizeChangedFcn ()
 figure resizing
 
function  visualizationModePopup_Callback ()
 callback for change of the visualization mode
 
function  mibVolRenGUI_WindowButtonDownFcn (eventdata)
 callback for mouse press over the 3d rendering window
 
function  mibVolRenGUI_VolumeMotionFcn (eventdata)
 
function  mibVolRenGUI_WindowScrollWheelFcn (eventdata)
 callback for mouse wheel action
 
function  mibVolRenGUI_WindowButtonUpFcn (eventdata)
 callback from mouse up button
 
function  interactWithAlphamap (xy, seltype, modifier)
 interaction with alphamap plot
 
function  isoColor_Callback ()
 set color for the isosurface
 
function  menuSettingsSelectColormap_Callback ()
 select new default colormap and update the volren view
 
function  generateColorMap ()
 generate obj.volumeColormap from the selected obj.Settings.ColormapName and obj.Settigns.ColormapInvert
 
function  menuSettingsBackgroundColor_Callback ()
 set background color
 
function  isovalEdit_Callback ()
 change isovalue for the isosurface
 
function positions = generatePositionsForSpinAnimation (noFrames, options)
 generate camera positions for the spin animation
 
function  spinBtn_Callback ()
 test of the spinning
 
function  plotAlphaPlot ()
 draw alpha plot
 
function  recalculateAlphamap ()
 recalculata obj.alpha.alphamap obj.volumeAlphaCurve.x(end) = obj.maxIntValue;
 
function status = grabVolume ()
 grab the currently displayed volume to the 3D volume viewer
 
function  menuInvertAlphaCurve_Callback ()
 invert the alpha curve
 
function  menuToolsAnimation_Callback ()
 start animation editor
 
function  menuFileMakesnapshot_Callback ()
 make snapshot
 
function  menuFileMovie_Callback (mode)
 start making movie window
 
function  changeView (orientation)
 change the view angle
 
function  prepareWindowForGrabFrame (width, height)
 prepare window to grab a frame
 
function  restoreWindowAfterGrabFrame ()
 restore widget sizes after the snapshot
 
function imgOut = grabFrame (width, height, options)
 grab a frame from the volume viewer
 
function  animationAddFrame (posIndex)
 add/insert a key frame
 
function positions = generatePositionsForKeyFramesAnimation (noFrames, options)
 generate camera positions from the key frames
 
function  menuFileLoadAnimation_Callback ()
 load animation path from a file
 
function  menuFileSaveAnimation_Callback ()
 save animation path to a file
 
function  previewAnimation (noFrames)
 preview animation
 
function  devTest (mode)
 for development
 

Static Public Member Functions

static function  ViewListner_Callback2 (obj, src, evnt)
 

Public Attributes

 mibModel
 handles to the model
 
 View
 handle to the view
 
 listener
 a cell array with handles to listeners
 
 childControllers
 list of opened subcontrollers
 
 childControllersIds
 a cell array with names of initialized child controllers
 
 defaultView
 a structure with the default camera position
 
 alphaPlotHandle
 handle to the alpha plot
 
 animationFilename
 template for the animation filename
 
 animationPath
 a structure with animation path .CameraPosition - a matrix of camera positions [keyFrame, x,y,z] .CameraUpVector - a matrix of camera up vectors [keyFrame, x,y,z] .CameraTarget - a matrix of camera target positions [keyFrame, x,y,z]
 
 colorChannel
 index of the color channel or material to show
 
 dataType
 a string with data type that is visualized, image, model,selection, mask
 
 figPosStored
 a structure with stored positions of the widgets for making snapshots .mibVolRenGUI = []; .volViewPanel = []; .optionsPanel = [];
 
 maxIntValue
 max integer value of the dataset
 
 renderingMode
 a string with the rendering mode to use, VolumeRendering, MaximumIntensityProjection,Isosurface
 
 Settings
 a structure with settings .MarkerSize - marker size for the alpha plot .IsoColor - color for the isosurface .BackgroundColor - color for the background .ColormapName - a string with default colormap, or custom (not yet implemented) .ColormapInvert - true/false, invert or not the colormap .animationPath - a structure with animation path .noFramesPreview - number of frames for the preview
 
 volume
 loaded volume
 
 volumeAlphaCurve
 a structure with alpha curve details .x - vector of intensity points [0 - 1] .y - value of alpha for each intensity point [0 - 1] .alphamap - calculated alpha map used in volshow .activePoint - selected point
 
 volumeColormap
 vector with the colormap
 
EVENT closeEvent
 > Description of events event firing when window is closed
 
- Public Attributes inherited from handle
 addlistener
 Creates a listener for the specified event and assigns a callback function to execute when the event occurs.
 
 notify
 Broadcast a notice that a specific event is occurring on a specified handle object or array of handle objects.
 
 delete
 Handle object destructor method that is called when the object's lifecycle ends.
 
 disp
 Handle object disp method which is called by the display method. See the MATLAB disp function.
 
 display
 Handle object display method called when MATLAB software interprets an expression returning a handle object that is not terminated by a semicolon. See the MATLAB display function.
 
 findobj
 Finds objects matching the specified conditions from the input array of handle objects.
 
 findprop
 Returns a meta.property objects associated with the specified property name.
 
 fields
 Returns a cell array of string containing the names of public properties.
 
 fieldnames
 Returns a cell array of string containing the names of public properties. See the MATLAB fieldnames function.
 
 isvalid
 Returns a logical array in which elements are true if the corresponding elements in the input array are valid handles. This method is Sealed so you cannot override it in a handle subclass.
 
 eq
 Relational functions example. See details for more information.
 
 transpose
 Transposes the elements of the handle object array.
 
 permute
 Rearranges the dimensions of the handle object array. See the MATLAB permute function.
 
 reshape
 hanges the dimensions of the handle object array to the specified dimensions. See the MATLAB reshape function.
 
 sort
 ort the handle objects in any array in ascending or descending order.
 

Detailed Description

class is responsible for 3D rendering of volumes or models

Constructor & Destructor Documentation

◆ mibVolRenController()

mibVolRenController.mibVolRenController ( mibModel,
options )

class constructor

Parameters
mibModela handle to mibModel class
optionsa structure with optional initialization parameters .mode - a string VolumeRendering, MaximumIntensityProjection,Isosurface .dataType - a string with data type to display image, model, selection, mask .materialIndex - an index of material to visualize .Settings - settings for initialization of the volviewer
Required fields of options:

References handle.addlistener, mibModel, mibRescaleWidgets(), and mibUpdateFontSize().

Here is the call graph for this function:

Member Function Documentation

◆ animationAddFrame()

function mibVolRenController.animationAddFrame ( posIndex)

add/insert a key frame

Parameters
posIndex[optional] position of the key frame, when 1 - in the beginning of the animation sequence

◆ changeView()

function mibVolRenController.changeView ( orientation)

change the view angle

Parameters
orientationa string with desired orientation, xy, xz, yz

◆ closeWindow()

function mibVolRenController.closeWindow ( )

closing mibVolRenController window

References handle.isvalid, and handle.notify.

◆ devTest()

function mibVolRenController.devTest ( mode)

for development

◆ generateColorMap()

function mibVolRenController.generateColorMap ( )

generate obj.volumeColormap from the selected obj.Settings.ColormapName and obj.Settigns.ColormapInvert

◆ generatePositionsForKeyFramesAnimation()

function positions = mibVolRenController.generatePositionsForKeyFramesAnimation ( noFrames,
options )

generate camera positions from the key frames

Parameters
noFramesnumber of frames options - an optional structure with additional parameters .back_and_forth - a switch to make animations in both forward and reverse orientation
Return values
positionsa structure with camera positions for each frame of the resulting movie .CameraUpVector - an array of camera-up vectors for each time point or a single vector .CameraTarget - an array of camera-target vectors for each time point or a single vector .CameraPosition - a vector for each time point
Required fields of options:
Generated fields of positions:

◆ generatePositionsForSpinAnimation()

function positions = mibVolRenController.generatePositionsForSpinAnimation ( noFrames,
options )

generate camera positions for the spin animation

Parameters
noFramesnumber of frames
optionsa structure with optional parameters .back_and_forth - a switch to make animations in both forward and reverse orientation .clockwise - a switch 1 - clockwise, 0 - anticlockwise rotation .rotAxis - a number with rotation axis, 3-z, 1-x, 2-y Return values:
positionsa structure with camera positions for each frame .CameraUpVector - an array of camera-up vectors for each time point or a single vector .CameraTarget - an array of camera-target vectors for each time point or a single vector .CameraPosition - a vector for each time point
Required fields of options:
Generated fields of positions:

◆ grabFrame()

function imgOut = mibVolRenController.grabFrame ( width,
height,
options )

grab a frame from the volume viewer

Parameters width: width of the snapshot, can be empty height: height of the snapshot, can be empty options: [optional] structure with extra parameters .resizeWindow - a switch, 1-resize window, 0-do not resize window, used for animations .showWaitbar - show or not waitbar .hWaitbar - a handle to existing waitbar .waitbarProgress - a fraction for the waitbar position

Required fields of options:

Examples:

// for animations
obj.prepareWindowForGrabFrame(width, height); // resize widgets
options.resizeWindow = 0; // do not resize the window during the animation
for i=1:100
// change view
imgOut = obj.extraController.grabFrame(width, height, options);
end
obj.extraController.restoreWindowAfterGrabFrame(); // restore widget size
// as taken from mibSnapshotController, used for snapshots
imgOut = obj.extraController.grabFrame(width, height);

◆ grabVolume()

function status = mibVolRenController.grabVolume ( )

grab the currently displayed volume to the 3D volume viewer

Return values
status1 - success, 0 - cancel

References mibInputMultiDlg(), and mibResize3d().

Here is the call graph for this function:

◆ interactWithAlphamap()

function mibVolRenController.interactWithAlphamap ( xy,
seltype,
modifier )

interaction with alphamap plot

Parameters
xycoordinate of the clicked point
seltypeselection type - normal, extend, open, alt
modifierkey modifier - [], shift, control

References min, and handle.sort.

◆ isoColor_Callback()

function mibVolRenController.isoColor_Callback ( )

set color for the isosurface

◆ isovalEdit_Callback()

function mibVolRenController.isovalEdit_Callback ( )

change isovalue for the isosurface

◆ menuFileLoadAnimation_Callback()

function mibVolRenController.menuFileLoadAnimation_Callback ( )

load animation path from a file

References mib_uigetfile().

Here is the call graph for this function:

◆ menuFileMakesnapshot_Callback()

function mibVolRenController.menuFileMakesnapshot_Callback ( )

make snapshot

◆ menuFileMovie_Callback()

function mibVolRenController.menuFileMovie_Callback ( mode)

start making movie window

Parameters mode: a string with the desired animation type, spin - to spin around selected axis animation - to animate the scene using key frames

◆ menuFileSaveAnimation_Callback()

function mibVolRenController.menuFileSaveAnimation_Callback ( )

save animation path to a file

◆ menuInvertAlphaCurve_Callback()

function mibVolRenController.menuInvertAlphaCurve_Callback ( )

invert the alpha curve

References handle.sort.

◆ menuSettingsBackgroundColor_Callback()

function mibVolRenController.menuSettingsBackgroundColor_Callback ( )

set background color

◆ menuSettingsSelectColormap_Callback()

function mibVolRenController.menuSettingsSelectColormap_Callback ( )

select new default colormap and update the volren view

References mibInputMultiDlg(), and handle.sort.

Here is the call graph for this function:

◆ menuToolsAnimation_Callback()

function mibVolRenController.menuToolsAnimation_Callback ( )

start animation editor

◆ mibVolRenGUI_SizeChangedFcn()

function mibVolRenController.mibVolRenGUI_SizeChangedFcn ( )

figure resizing

◆ mibVolRenGUI_VolumeMotionFcn()

function mibVolRenController.mibVolRenGUI_VolumeMotionFcn ( eventdata)

◆ mibVolRenGUI_WindowButtonDownFcn()

function mibVolRenController.mibVolRenGUI_WindowButtonDownFcn ( eventdata)

callback for mouse press over the 3d rendering window

References max, and min.

◆ mibVolRenGUI_WindowButtonUpFcn()

function mibVolRenController.mibVolRenGUI_WindowButtonUpFcn ( eventdata)

callback from mouse up button

◆ mibVolRenGUI_WindowScrollWheelFcn()

function mibVolRenController.mibVolRenGUI_WindowScrollWheelFcn ( eventdata)

callback for mouse wheel action

◆ plotAlphaPlot()

function mibVolRenController.plotAlphaPlot ( )

draw alpha plot

◆ prepareWindowForGrabFrame()

function mibVolRenController.prepareWindowForGrabFrame ( width,
height )

prepare window to grab a frame

Examples:

// as taken from mibSnapshotController
obj.extraController.prepareWindowForGrabFrame(width, height);
imgOut = obj.extraController.grabFrame(width, height);
obj.extraController.restoreWindowAfterGrabFrame();

◆ previewAnimation()

function mibVolRenController.previewAnimation ( noFrames)

preview animation

◆ recalculateAlphamap()

function mibVolRenController.recalculateAlphamap ( )

recalculata obj.alpha.alphamap obj.volumeAlphaCurve.x(end) = obj.maxIntValue;

◆ restoreWindowAfterGrabFrame()

function mibVolRenController.restoreWindowAfterGrabFrame ( )

restore widget sizes after the snapshot

◆ spinBtn_Callback()

function mibVolRenController.spinBtn_Callback ( )

test of the spinning

◆ updateWidgets()

function mibVolRenController.updateWidgets ( )

update widgets of this window

◆ ViewListner_Callback2()

static function mibVolRenController.ViewListner_Callback2 ( obj,
src,
evnt )
static

◆ visualizationModePopup_Callback()

function mibVolRenController.visualizationModePopup_Callback ( )

callback for change of the visualization mode

Member Data Documentation

◆ alphaPlotHandle

mibVolRenController.alphaPlotHandle

handle to the alpha plot

◆ animationFilename

mibVolRenController.animationFilename

template for the animation filename

◆ animationPath

mibVolRenController.animationPath

a structure with animation path .CameraPosition - a matrix of camera positions [keyFrame, x,y,z] .CameraUpVector - a matrix of camera up vectors [keyFrame, x,y,z] .CameraTarget - a matrix of camera target positions [keyFrame, x,y,z]

◆ childControllers

mibVolRenController.childControllers

list of opened subcontrollers

◆ childControllersIds

mibVolRenController.childControllersIds

a cell array with names of initialized child controllers

◆ closeEvent

EVENT mibVolRenController.closeEvent

> Description of events event firing when window is closed

Events
closeEvent

◆ colorChannel

mibVolRenController.colorChannel

index of the color channel or material to show

◆ dataType

mibVolRenController.dataType

a string with data type that is visualized, image, model,selection, mask

◆ defaultView

mibVolRenController.defaultView

a structure with the default camera position

◆ figPosStored

mibVolRenController.figPosStored

a structure with stored positions of the widgets for making snapshots .mibVolRenGUI = []; .volViewPanel = []; .optionsPanel = [];

◆ listener

mibVolRenController.listener

a cell array with handles to listeners

◆ maxIntValue

mibVolRenController.maxIntValue

max integer value of the dataset

◆ mibModel

mibVolRenController.mibModel

handles to the model

Referenced by mibVolRenController().

◆ renderingMode

mibVolRenController.renderingMode

a string with the rendering mode to use, VolumeRendering, MaximumIntensityProjection,Isosurface

◆ Settings

mibVolRenController.Settings

a structure with settings .MarkerSize - marker size for the alpha plot .IsoColor - color for the isosurface .BackgroundColor - color for the background .ColormapName - a string with default colormap, or custom (not yet implemented) .ColormapInvert - true/false, invert or not the colormap .animationPath - a structure with animation path .noFramesPreview - number of frames for the preview

◆ View

mibVolRenController.View

handle to the view

◆ volume

mibVolRenController.volume

loaded volume

◆ volumeAlphaCurve

mibVolRenController.volumeAlphaCurve

a structure with alpha curve details .x - vector of intensity points [0 - 1] .y - value of alpha for each intensity point [0 - 1] .alphamap - calculated alpha map used in volshow .activePoint - selected point

◆ volumeColormap

mibVolRenController.volumeColormap

vector with the colormap


The documentation for this class was generated from the following file: