Skip to content
LuoLei Zhao edited this page May 5, 2017 · 3 revisions

Overview/Summary

This file governs the "preset" feature of firefly. The preset feature allows users to save certain configurations made in the User interface, as well as camera positions. All options should appear as an individual panel on the UI.

Global initialized

presetPath: String containing the path that any preset views will be saved as. Will only initialize this if not initialized in config file. Will initialize to the firefly home directory if not specified.

fileName: String containing the fileName of the presetFile that will be saved at the path specified in presetPath. Will initialize to "fireflyPresets.txt" if not specified in the config file.

presets: a Multidimensional array holding all presets data currently loaded as options in the system.

nameList: An array of strings that holds the names for the presets that can appear on the User interface.

file: A reference to the current file that the presets are saving any new presets to.

reader: a reference to the csv reader that loads in preset information.

Functions defined

initializePresetViews: called upon startup, this loads the presets from the file specified by presetPath and fileName. This loads the file and adds the preset options to the preset panel.

setPresetView(integer viewArrayindex): Moves the camera and configures the colormap settings to match those specified by the preset settings specified in the array presets at the current index.

saveCurrentView(string name): Saves the current configuration of settings and camera angles too the current list of preset views. The string passed along becomes the name of the new view added.

eraseView(number): Removes the view at the specified index from the list of presets in both the array presets and the array nameList.

Clone this wiki locally