Manual
Table of Contents
- Introduction
- Installation
- Program Window
- Menu Bar
- Microscope Control Panel
- Model Display Panel
- Visualization Icons
- Model Object List
- Model Object Properties Panel
- Version History
Introduction
The Microscope Simulator is a program for simulating the imaging process of various microscopes. Currently, simulation of atomic force microscopes (AFM) and fluorescence microscopes is supported through the AFMSim and FluoroSim modules. These modules enable you to see what a geometric model of specimen would look like in one of these microscopes with given imaging parameters. Graphics acceleration hardware allows real time generation of simulated microscope images while you interact with specimen models.
Among other things, you can use the Microscope Simulator to build intuition about the artifacts that arise in the imaging process of each microscope, test and refine a hypothesized model by comparing output from the simulator to experimental images, and check whether your microscope can distinguish among several hypothetical specimen model configurations.
The Microscope Simulator consists of a unified modeling environment for setting up specimen models. Controls for setting properties of the microscope simulators are split into two different modules, AFMSim for AFM simulation and FluoroSim for fluorescence microscope simulation. This page describes the modeling environment and features common to both simulators. See AFMSim and FluoroSim for more information on each simulator's features.
Installation
The Microscope Simulator is currently available only for PCs running Microsoft Windows XP. The installer for the Microscope Simulator 1.3.1 can be found here. Install the program by either running the application or downloading it to disk and double-clicking the installer.
If you have not installed other software from the UNC Nanoscale Science Research Group before, this installer will create the folder "C:\NSRG" by default. We recommend accepting the default installation settings to ensure that the program works correctly. If you have installed this version of the Microscope Simulator before, we advise that you remove the previous version first; installing different versions of the Microscope Simulator on the same machine should not cause problems. The installer will create menu items under Start->All Programs->NSRG->Microscope Simulator 1.3.1. These items include:
- Microscope Simulator 1.3.1 - The program itself
- Microscope Simulator 1.3.1 User Manual - Local installation of this manual
- Uninstall Microscope Simulator 1.3.1 - Uninstaller for this program
Program Window

The program window after startup.
The program window, shown on the right, consists of several panels. At
the top of the window is a standard menu bar. Below the menu
bar is the Microscope Control Panel where settings for the
microscopes can be edited. The large blue panel in the center of the
window is the Model Display Panel where specimen models are
shown. Rotating, translating, and scaling models interactively with
the mouse takes place in this window. A row of icons above the Model
Display Panel controls how specimen models appear and whether
simulation results are displayed along with the models. The Model
Object Control Panel on the right consists of two parts; the
Model Object List at the top displays a list of models in the
simulation, and the Model Object Properties Panel at the
bottom displays a list of model properties that can typically be
edited. Each of these panels is described in more detail below.
Menu Bar
The menu bar in the Microscope Simulator contains three menus that provide commands useful to creating new simulations, adding specimen models to a simulation, saving simulations, and loading saved simulations. Each menu is described in more detail below.
File Menu

The File menu.
The File Menu features typical options for creating and saving
simulations:
- New
- Creates a new simulation with default settings.
- Open...
- Opens a saved simulation file.
- Save
- Saves a simulation's settings to a file. This includes the settings of each microscope simulator, the objects in the scene and their settings, and everything else required to recreate the simulation. If the simulation has not been saved previously, you will be asked to provide a name and location for the file.
- Save as...
- Does the same thing as the Save menu item, but allows you to save the simulation to another file name.
- Export UNCA
- Exports simulated AFM scans to the UNCA file format.
- Exit
- Exit the program.
Model Menu

The Model menu.
The model menu has options for adding and removing geometric models to
the simulation.
- Add Disk
- Adds a model of a planar disk defined by the center of the disk and a radius.
- Add Flexible Tube
- Adds a model of tube defined by several control points and a radius. The number of control points can be changed, and each control point can be specified independently.
- Add Nanotube
- Adds a model of a carbon nanotube. The ends of the model are capped with spherical ends. The length and radius of the tube can be changed.
- Add Plane
- Adds a simple bounded planar model to the scene.
- Add Point Set
- Adds a point set that allows explicit settings of fluorophore positions. No geometry is involved, but the points are represented by small spheres in the Model Object Window.
- Add Sphere
- Adds a sphere to the scene. The radius of the sphere can be adjusted.
- Add Torus
- Adds a torus to the scene. The radius of the torus and the radius of the cross-section can be adjusted independently.
- Import Fluorescence Stack
- Imports a series of TIFF files representing a stack from a fluorescence microscope. The origin, pixel size, and interslice spacing can be set according to the settings from the microscope.
- Import OBJ File
- Imports a 3D geometric mesh described in OBJ file format. The OBJ format is commonly supported in many 3D modeling and graphics programs. The scale of the OBJ file can be modified.
- Import PLY
- Imports a 3D geometric mesh described in PLY file format. The PLY format is also commonly supported in many modeling programs.
- Import UNCA File
- Imports a UNCA file describing a height field from an atomic force microscope scan. The UNCA file format was developed at UNC. Data in the nanoManipulator system can be exported to UNCA format an imported into the Microscope Simulator with this menu item.
- Import VTK Poly Data File
- Imports a legacy VTK file containing a vtkPolyData structure that describes a surface mesh.
- Clear
- Clears all models from the simulation.
Window Menu

The Window menu.
The Window menu has just two options:
- Show Fluorescence Window
- This menu item brings up the Fluorescence Image window that shows images generated by the FluoroSim module.
- Preferences...
- Brings up a dialog box for changing program preferences. Preferences are saved between program launches.
- About
- Shows information about this program.

The Microscope Simulator preferences panel.
There are currently just two preferences supported. The first sets the
background color in the Model Display Panel. The second determines
whether a grid is displayed on the ground plane.
Microscope Control Panel

The Microscope Control Panel with the AFMSim tab selected.
The Microscope Control Panel has three tabs that bring up settings for
the two microscope simulators. Controls for general settings common to
both microscope simulators are also found under the
General tab. Further information about the settings for
each microscope simulator can be found under the AFMSim and FluoroSim pages.
Model Display Panel
The Model Display Panel is where the 3D models in the simulation are displayed. Output from the microscope simulator modules can also be displayed in this window. Such output includes simulated AFM scans displayed at the base of the simulation environment and simulated fluorescence images displayed on a physical representation of the focal plane.
Visualization Icons
![]()
The visualization icons.
A row of visualization icons provide various controls related to what
is shown in the Model Display Panel. The functions represented by
the icons are described from left to right below:
- Save image
- Save the image currently displayed in the Model Object Panel.
- Reset camera
- Reset the scene to the default view.
- View model only
- Displays specimen models only.
- View fluorophore sampling
- Displays fluorophores from models in the scene as small spheres.
- View models with AFM scan
- Displays both the specimen models and the simulated AFM surface scan.
- View AFM scan only
- Displays the simulated AFM surface scan only.
- View models with fluorescence comparison
- Displays comparison of experimental and simulated fluorescence image stacks with the models visible. See the section on processing simulated stacks for more details on the comparison visualization.
- View fluorescence comparison only
- Display comparison of experimental and simulated fluorescence image stacks without the models visible. See the section on processing simulated stacks for more details on the comparison visualization.
- Toggle reference axes
- Enables/disables display of coordinate axes in the Model View Panel. The location of the coordinate axes can be moved to an arbitrary location in the Model View Panel display by clicking on the axes and dragging them.
Only one of the following interaction modes can be enabled at a time.
- Move camera
- Enables manipulation of the camera
in the Model View Panel via mouse manipulation. You can change the
view of the specimen models by rotating, translating, and zooming in
on the scene. Clicking and dragging while holding various mouse
buttons enacts these camera transformations:
- Left mouse button - Causes rotation of the scene
- Middle mouse button - Causes translation of the scene
- Right mouse button - Causes zooming in on the scene
- Move objects
- Enables manipulation
of individual specimen model objects via mouse manipulation. Clicking on
the desired model object and dragging while holding one of the mouse
buttons produces the following transformations:
- Left mouse button - Causes rotation of the selected model object
- Middle mouse button - Causes translation of the selected model object
- Right mouse button - Causes different changes dependong on the model object selected. In most cases, scales the size of the model object.
Model Object List

The Model Object List (upper panel) showing one object. Properties
for the selected model object appear in the Model Object Properties
Panel (lower panel).
The model object list appears in the upper right of the program
window. All model objects in the simulation are listed here. When you
click on a model object in the list, properties for that model object
appear in the Model Object Properties Panel. Right-clicking on a model
object brings up a context menu that provides several options:
- Focus on Object
- Changes the camera view to center on this model object and zoom in on it so that it nearly fills the Model Object View Panel.
- Snap Simulated Region to Object
- Changes the spatial extent of the simulation (defined in nanometers under the General tab in the Microscope Control Panel) to just contain this model object.
- Export Geometry
- Exports the model object geometry as a VTK, PLY, or BYU file.
- Delete Object
- Deletes this model object.
- Clear
- Clears all model objects from the simulation.
Model Object Properties Panel
The Model Object Properties Panel lists the properties of a model object in the left column and the property values in the right column. Most model object properties can be changed in this panel. A few properties common to almost all model objects are listed here:
- Name
- A name for the model object.
- Visible
- Controls whether the model object is visible in the scene or not.
- Scannable
- Controls whether the model object is included when calculating a simulated AFM scan.
- X
- X-component of the model object position.
- Y
- Y-component of the model object position.
- Z
- Z-component of the model object position.
- X-rotation
- X-component of the model object rotation (in degrees).
- Y-rotation
- Y-component of the model object rotation (in degrees).
- Z-rotation
- Z-component of the model object rotation (in degrees).
- Color
- The color used to represent the model object. Does not affect simulations.
- Surface Fluors
- The model of fluorophores on the model object surface.
- Volume Fluors
- The model of fluorophores in the volume defined by the model object surface.
Some model objects have fewer properties. For example, the sphere model does not have the rotation properties because a sphere's shape is rotationally invariant. Other models have more properties, such as the Ring Radius and Cross Section Radius in the torus model. Still other models have a variable number of properties. The flexible tube model, for example, supports an arbitrary number of control points.
Version History
The sections below outline the changes made to the Microscope Simulator at each revision.
Version 1.3.1
Changes from previous release
- Added Point Set model that enables easy specification of a list of fluorophore locations.
Known issues
- See known issues in release 1.1.0 below
Version 1.3.0
Changes from previous release
- Added Nelder-Mead optimization routine for faster fitting of model parameters to fluorescence images.
- Added feature to that exports objective function exploration to a MATLAB file for evaluation.
- Added a flat disk model object type.
- Added ability to export model object geometry to .VTK, .PLY, or .BYU file formats. Objects are exported in absolute coordinates, that is, translation, rotation, and scaling parameters are applied before saving the geometry to make exporting of whole scenes easier.
- Changed fluorescence comparison mode to used a version of the nested surface visualization technique developed by Weigle and Taylor.
- Geometry from the fluorescence comparison mode can be exported.
- Origin of imported image stacks is now set to the lower left-hand corner of the image at slice 0 instead of in the center of the image to keep image and geometry coordinate systems consistent.
Known issues
- See known issues in release 1.1.0 below
Version 1.2.2
Changes from previous release
- Added support for generating additive Gaussian noise in simulated fluorescence microcope images. This feature requires a GPU that supports native 32-bit unsigned integers, such as the NVIDIA GeForce 8 series or higher.
- Added a proper manual documenting features in both the AFMSim and FluoroSim modules.
- Added a plane model object type.
- Reduced simulation time for the various fluorescence microscope simulation methods.
- Added a Fourier domain-based algorithm for computing simulated fluorescence microscope images. This algorithm requires an NVIDIA graphics card that supports CUDA.
- The camera view is now saved when saving a file and restored when reopening a simulation file.
Known issues
- See known issues in release 1.1.0 below
Version 1.2.1
Changes from previous release
- PLY files may now be imported.
- Added x-y-z reference axes widget to the rendering window that may be turned on or off.
- Added volume labeling capability for fluorescence microscope simulation. Geometry imported from OBJ, PLY, or VTK files must form a closed volume for volume labeling to work, i.e., the geometry must be water-tight.
- The Flexible Tube model now features smooth curves.
- Fixed some problems that would occasionally make the program crash.
Known issues
- See known issues in release 1.1.0 below
Version 1.2.0
Changes from previous release
- Added exhaustive-search fluorescence model optimization that minimizes the mean squared error between simulated images and experimental images.
- Fluorescence simulation is now approximately pixel-accurate among all simulator types.
- The object representing the focal plane in the model object window will now display the fluorescence image at that focal plane if the fluorescence renderer window is open. If that window is not open, a semi-opaque plane is shown instead.
Known issues
- See known issues in release 1.1.0 below
Version 1.1.0
Changes from previous release
- Extensive GUI interface changes. Almost all windows have been reduced to a single window with controls on either side of the main model object window.
- Added visualization option for comparing simulated and experimental AFM scans.
- Added visualization modes for comparing simulated and experimental fluorescence stacks.
- Fixed some off-by-one pixel errors in fluorescence simulators.
- Added UNCA file export.
- Added OBJ file export.
- Improved geometric quality of simulated AFM scan as it appears in the model object window.
Known issues
- On some systems, if the resolution in the AFM simulator settings is lower than 115 pixels, there will be errors in the resulting scan.
- AFM comparison visualization can take excessive time to compute if the resolution of the simulated scan or resolution of the imported experimental AFM scan is too high (greater than 100 samples on a side).
- When changing among fluorescence simulator types, the program may crash.
Version 1.0.8
Changes from previous release
- Added 32-bit hardware-accelerated fluorescence microscopy simulator that is faster than the 64-bit software simulator and more accurate than the 16-bit hardware simulator.
- Changed AFM simulator behavior so that objects are scanned if and only if they are designated as scannable. This lets you make selected model objects hidden, but the simulator still dilates them.
Known issues
- The program may crash when switching from the 32-bit fluorescence simulator to another simulator.
Version 1.0.7
Changes from previous release
- Added accurate (but slow) software fluorescence microscopy simulator for computers lacking graphics hardware with floating-point blending.
- Added controls for rescaling image values to those of the display.
- Fixed some bugs in the AFM simulator, mostly related to non-square simulation regions.
Known issues
- After changing the size of the simulated region, the current AFM scan may appear corrupted. To work around this, update "Scan Resolution" settings in the AFM control panel, and the AFM will be recomputed.
Version 1.0.6
Changes from previous release
- Added ability to import sequences of 16-bit tiff images. Isosurfaces from these stacks can be used to help position model objects.
- The simulated region can now be set to the boundaries of the model object.
Known issues
- See known issues in release 1.0.4 below
Version 1.0.5
Changes from previous release
- Added multi-channel fluorescence rendering. Model objects can now be rendered to red, green, or blue channels, or all three.
Known issues
- See known issues in release 1.0.4 below
Version 1.0.4
Changes from previous release
- New plugin interface for model objects.
- Numerous user-interface bug fixes.
- Re-enabled fluorescence microscope simulation feature.
- Added improved fluorophore point sampling strategy.
- Implemented a 16-bit floating-point renderer for fluorescence rendering.
Known issues
- Program may hang when a new object is created while the fluorescence window is open. Make sure to close the window before adding a model object.
- AFM scans may have unusual artifacts.
- The PSF bounding box in the model object window may not update immediately.
- Program may crash occassionally when adding a model object.