# ShapeWorks in Python


!!! important "ShapeWorks with Python support"
    The ShapeWorks Python library is included with all ShapeWorks releases.


There is no one-size-fits-all when it comes to grooming your data for shape modeling. Instead, there are general guidelines that one could consider when deciding on his/her own workflow. 

!!! danger "NO one-size-fits-all workflow"
    Looking at your data as it goes through different processing steps is a **must-do**!


To support your workflow discovery process, we have been making significant strides in developing ShapeWorks tools to be more modular, generic, and transparent. Our efforts entail consolidating the underlying computational libraries, providing a flexible and [unified shapeworks command line tool](../new/shapeworks-command.md), and **now the ShapeWorks Python library!**.

## Why ShapeWorks in Python?

One primary goal of the ShapeWorks Python library is to open and reveal what is in the ShapeWorks black box and lay down all steps involved in preprocessing your data, optimizing and analyzing your statistical shape models in a way that supports interactive workflow discovery and makes you as a user takes the full control of your own study and analysis.


In `Examples/notebooks/tutorials`, we provide step-by-step, hands-on tutorials on different aspects of the shape modeling workflow in a transparent, reproducible, and sharable manner. For this purpose, we have chosen Juypter Notebooks as the front-end tools for these demonstrations. These hands-on tutorials are designed to reflect the thought process that a non-expert user could go through at different shape modeling phases, starting from processing or grooming your data to analyzing your optimized shape model.

## Diving into ShapeWorks' "Clear" Box 

A growing list of fully-documented and self-contained notebooks demonstrate various ShapeWorks tools and shape modeling workflows.  

To actually try the following notebooks out, open a terminal, `conda activate shapeworks`, change to the `Examples\Python\notebooks\tutorials` directory and run `jupyter notebook` to start the notebook server. 


### [Getting Started with Juypter Notebooks](../notebooks/getting-started-with-notebooks.ipynb)  

<p><video src="https://sci.utah.edu/~shapeworks/doc-resources/mp4s/jupyter-run-cell.mp4" autoplay muted loop controls style="width:100%"></p>
 
### [Getting Started with Segmentations](../notebooks/getting-started-with-segmentations.ipynb)   

<p><video src="https://sci.utah.edu/~shapeworks/doc-resources/mp4s/nb-seg-vol-slices-label.mp4" autoplay muted loop controls style="width:100%"></p>

### [Getting Started with Meshes](../notebooks/getting-started-with-meshes.ipynb) 

<p><video src="https://sci.utah.edu/~shapeworks/doc-resources/mp4s/nb-mesh-itkw-2surfs-same-win.mp4" autoplay muted loop controls style="width:100%"></p>

### [Getting Started with Segmentations](../notebooks/getting-started-with-segmentations.ipynb)   

<p><video src="https://sci.utah.edu/~shapeworks/doc-resources/mp4s/nb-groom-mean-align.mp4" autoplay muted loop controls style="width:100%"></p>

### [Getting Started with Exploring Segmentations](../notebooks/getting-started-with-exploring-segmentations.ipynb)   

<p><video src="https://sci.utah.edu/~shapeworks/doc-resources/mp4s/nb-explore-iso-align-pv.mp4" autoplay muted loop controls style="width:100%"></p>

### [Getting Started with Shape Cohort Generation](../notebooks/getting-started-with-shape-cohort-generation.ipynb)   

<p><video src="https://sci.utah.edu/~shapeworks/doc-resources/mp4s/nb-groom-mean-align.mp4" autoplay muted loop controls style="width:100%"></p>

### [Getting Started with Data Augmentation](../notebooks/getting-started-with-data-augmentation.ipynb)   

<p><video src="https://sci.utah.edu/~shapeworks/doc-resources/mp4s/nb-groom-mean-align.mp4" autoplay muted loop controls style="width:100%"></p>
