= Description of GUI of the 3D model building tool = To facilitate reconstruction process a simple graphical user interface was prepared. Below, the 3dBAR reconstruction GUI with an exemplary CAF dataset loaded ([http://www.ncbi.nlm.nih.gov/pubmed/20600960 Johnson et. al., 2010].) == Selecting structures == The left panel contains ''ontology tree'' loaded from CAF index file. One can browse through structures, select them for reconstruction or load already reconstructed, cached models. The right panel contains two tabs. ''Structure selection tab'' displays detailed information about the currently selected structure for reconstruction. This includes abbreviated and full name of the structure, span of slides on which it is defined as well as color assigned to this structure. Here one can also set the resolution, the depth of decomposition of the structure into substructures according to ontology tree, and mirroring of brain hemisphere may be enabled if needed. [[Image(wiki:barSoftwareGUI:3dbar_interface_strucure_selection.png,600)]] **Figure 1:** The ''structure selection tab''. The ''Striatum'' selected for reconstruction (gray highlight); ''Amygdala'' and ''Hippocampus'' loaded as context models (red font). The reconstruction of `Hypothalamus` is cached and available for loading (bold font). == Viewing and customizing the reconstructions == Reconstructed models can be viewed in the ''Model customization tab'' (Fig. 2) which also provides access to parameters of VTK pipeline. The preview is displayed in the form of triangular mesh although the actual model is still stored in volumetric form. The model can be rotated by pressing and holding left mouse button, zoomed in or out by pressing and holding the right button. Pressing the middle button allows one to pan the model over the scene. One can switch between wireframe and surface representations of the model by pressing `w` or `s` keys. [[Image(wiki:barSoftwareGUI:interface_reconstruction.png,600)]] **Figure 2:** The ''model customization tab''. Reconstructions of ''Striatum'', ''Amygdala'' and ''Hippocampus'' are presented. After changing VTK pipeline parameters, mesh may be recalculated by pressing ''Refresh'' button and cached by pressing ''Save model''. Models are cached in form of polygonal meshes ([http://vtk.org/doc/nightly/html/classvtkPolyData.html vtkPolyData]). ''Clear scene'' button removes all models from preview window. When a model is cached, the corresponding element of the ontology tree is displayed with bold font. Cached models can be loaded in the preview window as ''context models'' alongside the model being presently reconstructed, however they cannot be modified. When a cached model is loaded into context, the corresponding element in ontology tree is displayed in red. == Generating multiple reconstructions == Multiple reconstructions can be performed one by one as described above. However, this is convenient only when few models are required. To reconstruct multiple structures one can choose a parent structure containing desired substructures and reconstruct them down to a desired level of detail. All substructures are generated using the same set of reconstruction parameters provided in `Structure selection tab` and the same VTK pipeline. Models are generated one by one and automatically cached. When all the substructures are reconstructed they are loaded into preview window as context models. == Exporting the models == By default models are cached in the directory where CAF dataset is located. One may choose another export directory by selecting ''Set cache directory'' from ''Edit'' menu. When cache directory is changed, all currently loaded structures are removed from preview and ontology tree updates information about availability of cached models from the new directory. 3d Brain Atlas Reconstructor GUI offers three ways of exporting three dimensional models. Single reconstructions may be cached as polygonal data ([http://vtk.org/doc/nightly/html/classvtkPolyData.html vtkPolyData]) or exported as volumetric datasets in the native VTK ([http://vtk.org/doc/nightly/html/classvtkImageData.html vtkImageData]) or (Neuroimaging Informatics Technology Initiative, [http://nifti.nimh.nih.gov/nifti-1/ NIfTI]) formats. Complex scenes containing numerous context models may be exported into (Virtual Reality Modelling Language, [http://en.wikipedia.org/wiki/VRML VRML]) or [http://en.wikipedia.org/wiki/X3D X3D] format. ---- ----