ChenglongWang / ShapeWorksStudio

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ShapeWorksStudio

A new GUI environment for ShapeWorks preprocessing, optimization, and analysis.

See the original command-line tools, aknowlegements, and papers on the shapeworks github page.

Table of Contents

Requirements

Code Documentation

Doxygen Documentation pages are currently out of date, but still relevant.

Building

Unix and OSX

In a terminal: ```c++ mkdir ShapeWorksStudio/build cd ShapeWorksStudio/build cmake -DVTK_DIR=Path/To/Your/VTK/build -DITK_DIR=Path/To/Your/ITK/build -DCMAKE_BUILD_TYPE=Release ../src make ```

Windows

Open a Visual Studio (32 or 64 bit) Native Tools Command Prompt. Follow these commands: ```c++ mkdir C:\Path\To\ShapeWorksStudio\build cd C:\Path\To\ShapeWorksStudio\build cmake -G "NMake Makefiles" -DVTK_DIR="C:/Path/To/Your/VTK/build" -DITK_DIR="C:/Path/To/Your/ITK/build" -DCMAKE_BUILD_TYPE=Release ../src nmake ``` **NOTE** Be sure to copy the Qt DLL files to the Executable directory for the program to run.

Running

Studio runs with no command-line arguments. Once running, set the locations of ShapeWorksGroom and ShapeWorksRun in the Preferences dialog (ctrl+,).

You Should have a Qt window that looks similar to the one below.



The application has tools on the left, the rendering window, view options on the lower bar, a small file menu, and a preferences dialog.

Tools

Data

This tool tab displays the images (volume files in NRRD format) that have been loaded. You can select the image files to load by either clicking the blue "+" button at the bottom, or going to *File -> Import Images...*
Your images will appear on the display once loaded.

You can delete images by selecting the image of choice and clicking the red "x" button at the bottom. If only one image is loaded, it may still display when it is deleted. It will be replaced by the next image load.

**NOTE** The tools Groom and Optimize below fail when data paths contain spaces. Please put data in paths with no spaces. This bug will be fixed in a future release.






Groom

Once images are loaded, the preprocessing step, "groom" is next. You can select several options for grooming.

*Fill Holes* This option fills any existing holes in the segmentations.

*Isolate* This option isolates the foreground.

*Center* This option attempts to allign the segmentations to a common center if they aren't the same sizes.

*Autocrop* Use this option to find the largest bounding box containing all input shapes, and crop all input volumes accordingly.

*Pad* This option adds a padding around the shapes. This can help when a larger number of correspondance points are needed. You can select what amount is appropriate for the optimization step.

*Antialias* This option antialiases the binary segmentation. You can select the number of antialias iterations.

*Fastmarching* This option computes a distance transform of the surface using the fastmarching method.

*Blur* This option blurs the distance transform to get rid of high-frequency artifacts. You can choose an appropriate sigma for the blurring.

*Run Groom* Click this when you are ready for grooming. This step takes some time. Output is put into a ShapeWorksStudioTools.log file next to the executable. A progress indicator shows the tool is working.

*Export XML* If you wish to use the parameter file created for the groom step in a command line environment, you can export the XML with the grooming options above.

Optimize

Once the grooming step is complete, you can run the optimize step.

*Number of points* Specifies the number of particles to be used to represent each shape in the ensemble. If enough initial point positions are supplied for the optimization, then ShapeWorksRun will not conduct a splitting-based initialization phase. If insufficient particle initializations are supplied (or none at all), then ShapeWorksRun will initialize the model as described in Section 2.3 until this number of particles exists on each shape surface.

*Starting/Ending Regularization* This option determines the regularizations on the covariance matrix for the shape-space entropy estimation.

*Iterations per split* Specifies the number of iterations to run between successive particle splits during an initialization phase. This allows the particle system at a given granularity to converge to a stable state before more particles are added.

*Optimization Iterations* Specify the range for a constant regularization factor that is added to the covariance matrix of the correspondences during the optimization process. This range, along with the number of optimization iterations, define the rate at which the system converges. The starting regularization decays to the ending regularization over the specified number of iterations.

*Relative Weighting* This is the value of parameter "alpha" from the energy equation [ Q=H(Z) - alpha * SUM_k H(x_k) ]

*Run Optimize* Click this when you are ready for optimizing. This step takes time, but less than grooming. Output is put into a ShapeWorksStudioTools.log file next to the executable. A progress indicator shows the tool is working.

*Export XML* If you wish to use the parameter file created for the groom step in a command line environment, you can export the XML with the grooming options above. There are other options not in the GUI that you can add to a parameter file to run outside of Studio.

Analysis

Here is where all the statistical options are available to the user.

*All Samples* Display all of the image segmentation samples on the screen.

*Single Sample* Display only one sample. You can select a particular number, or click "median" to display the shape that is the computed median of all the shapes.

*Mean* Display the computed mean of the shapes.

*PCA* Display the computed shape from an eigen value and a standard deviation.

*Std.Dev.* Slide the slider back and forth to display the computed shape with various standard deviations.

*Animate* Check this box to watch the shape morph between various standard deviations automatically. Depending on the machine running the application, the number of samples, and the size of the samples, the animation may be slow at first while building and caching the meshes. You can select the caching, memory, and threading options in the Preferences. Changing the number of neighbors, spacing, and smoothing options in preferences also affects meshing time and quality.

*Mode* This selects the ordered eigen vector and eigen values from the statistical analysis. There are #samples - 1 modes. The higher the mode, the less variance with the standard deviations. Usually the first two modes contain the most variance between shapes.

*Log Scale vs. Linear Scale* The bar graph can be plotted in either log or linear scaling. The graph shows the eigen values in decreasing values to depict statistical relevancy.

*Regression* This option is not yet available.

Rendering Window

The render window has a few shortcuts to viewing options.


From left to right, here are the rendering options.

*Autoview* Reset the view to fit the samples. This only affects zoom and translation.

*Show Glyphs* Toggle whether to show the glyphs for the coorespondence points.

*Glyph Quality* This slider changes the quality of the coorespondance points glyphs. This is sync'd with the render window shortcut option.

*Glyph Size* This slider changes the size of the coorespondance points glyphs. This is sync'd with the render window shortcut option.

*Glyph options* Click the down arrow to resize the glyphs or select the quality of the glyphs.

*Show isosurface* Toggle whether to view the surface representing the shape. Click the down arrow for more options. You can alter the number of neighbors, point spacing, and mesh smoothing for isosurface reconstruction.

*Neighborhood Size* The neighborhood size (max vertex valence) used for isosurface reconstruction.

*Spacing* The spacing used for isosurface reconstruction.

*Smoothing* The smoothing amount for isosurface reconstruction.

*View mode drop-down* This drop-down gives 3 options for view mode. Original is the binary segmentation. You must have loaded images for this option to be available. Groomed is for the distance transform view. You must run the groom step for this to be available. Reconstructed is for the calculated shape based on the set of coorespondance points. You must run the optimize step for this to be available.

*Center* Center the samples automatically to align. This is useful if original samples aren't the same size.

*Zoom* This slider allows the user to zoom in or out to view more/less samples. This is mainly useful in the "All Samples" mode of the analysis tool. Zoom is automatically selected as a user switches between analysis modes.

Preferences

*Color Scheme* Select the color scheme for the rendering window.

*PCA Range* This is the amount of standard deviation to reach on the +/- ends of the PCA Slider.

*Number of PCA Steps* This determines how many steps between +/- PCA Range to take for visualization.

*Enable Caching* To speed up mesh animation, you can cache the meshes into system memory to load as needed.

*Caching Epsilon* How sensitive the caching is. The smaller the epsilon, the more meshes that will be cached, even if they are very similar. If this is too high, large mesh differences might be ignored.

*Memory to Use* Select the amount of system memory to use for caching. Turn this down if your machine's memory is bogged down from the program.

*Parallel Reconstruction* Select the amount of threads to fire (up to system hardware core max) to run while building meshes. This speeds reconstruction, theoretically.

*Restore Defaults* Click this to restore all options to the program's default values. Options are saved and reloaded between application runs for convenience.

*OK* Click this when you are done changing options.

File Menu

Here you can open and save projects, load new images, open recent projects, and quit the application.

Contact and Bug Reports

Please email any questions to Shapeworks-users@sci.utah.edu . If there problems or bugs, please report them using the issue tracker on GitHub. This includes feature requests. Feel free to add improvements using git pull requests.

About

License:Other


Languages

Language:C++ 94.6%Language:CMake 5.4%