Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Docs #58

Merged
merged 2 commits into from
May 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Introduction
------------

TensorBoardPlugin3D is an open-source TensorBoard plugin that supports
visualizing 3D output within the TensorBoard application, JupyterLab, and
Google Colab.
visualizing 3D output within the TensorBoard application, JupyterLab,
Google Colab, and SageMaker.

Installation
------------
Expand Down
12 changes: 6 additions & 6 deletions docs/Development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@ In a virtualenv with TensorBoard installed, run:

.. code-block::

python setup.py develop
python setup.py build_client develop

This will install and build the frontend and link the plugin into your
virtualenv.

Changes to the client
---------------------
If you have made changes to the client you will need to run the following
command to update the static html file:
If you have made changes to the client you will need to re-run the setup python
script and the build_client command to re-build the client and update the
static file.

.. code-block::

python setup.py build_client develop

This will install and build the frontend and link the plugin into your
virtualenv.


Starting TensorBoard
---------------------
Expand Down
21 changes: 15 additions & 6 deletions docs/Jupyter_and_colab.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ To install the TensorBoardPlugin3D python package inside the notebook:

.. code-block::

!pip install tensorboard_plugin_3d
!pip install tensorboard-plugin-3d

Usage
-----

This documentation uses the ``spleen_segmentation_3d`` tutorial notebook
provided by MONAI as the starting point and demonstrates how to expand on the
provided by MONAI as a starting point and demonstrates how to expand on the
notebook to take advantage of the 3D plugin with only a few additional lines.
See the bottom of this page for links to available example notebooks.

Expand All @@ -23,11 +23,16 @@ Plot Images

MONAI provides ``plot_2d_or_3d_image`` and the related ignite handler to plot
the 3D image in TensorBoard. Originally the output model and input image and
label could only be visualized with matplotlib. This limited the view to a
single slice though.
label could only be visualized with matplotlib which limited the view to a
single slice at a time.

.. image:: images/original_spleen_cell.png
:alt: Original Spleen Visualization Cells
:alt: Original Spleen Visualization Cells
:align: center

.. image:: images/old_output.png
:alt: Original output as single slice of from each volume
:align: center

For the purposes of this tutorial we will write out multiple views to get an
idea of the different ways we can visualize data. Outside of the loop (above
Expand All @@ -38,12 +43,14 @@ selecting which data to display.

.. image:: images/create_directories.png
:alt: Create direct for TensorBoard plots
:align: center

Within the loop we can then add the calls to ``plot_2d_or_3d_image`` to create
the event files that TensorBoard will need.

.. image:: images/write_tensorboard_images.png
:alt: Plot images for TensorBoard
:align: center

The call to ``plot_2d_or_3d_image`` takes several parameters:

Expand Down Expand Up @@ -107,6 +114,7 @@ an option to toggle between them or jump to a specific image.

.. image:: images/toggle_data.png
:alt: Toggle Image Options
:align: center

Any and all settings that are applied to an image are carried over to the next
image as well. This allows you to get the vis settings just right before
Expand Down Expand Up @@ -167,4 +175,5 @@ like to quickly begin viewing and analyzing actual medical data.
:alt: Open in Colab

.. image:: images/unet.gif
:alt: UNet Demo
:alt: UNet Demo
:align: center
11 changes: 7 additions & 4 deletions docs/Quick_start_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ To install the TensorBoardPlugin3D python package:

.. code-block::

$ pip install tensorboard_plugin_3d
$ pip install tensorboard-plugin-3d

Usage
-----
Expand All @@ -27,12 +27,15 @@ Select the log directory that contains your 3D image data and run:

$ tensorboard --logdir ~/path/to/logdir

If you'd like to test the plugin with some sample data you can set the `logdir`
path to the test data:
If you'd like to test the plugin with some sample data you can `download`_ the
cached spleen segmentation data, extract the directory to the location you'd
like, and then point to the data:

.. _download: https://drive.google.com/uc?export=download&id=1VRCEwo7tCzh3ys3lJj6UwAcQ4i68md4b

.. code-block::

$ tensorboard --logdir ~/path/to/logdir/test/data
$ tensorboard --logdir ~/path/to/extraction/location/demo_spleen_data

Open TensorBoard and select the ``TensorBoard 3D`` tab.

Expand Down
Binary file modified docs/images/label_with_output.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/old_output.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/spleen_with_label.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/toggle_data.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/toggle_demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@ Welcome to TensorBoard Plugin 3D's documentation!
=================================================

TensorBoardPlugin3D is an open-source TensorBoard plugin that supports
visualizing 3D output within the TensorBoard application, JupyterLab, and
Google Colab. This plugin frontend is built using ITK/VTK Viewer components.
visualizing 3D output within the TensorBoard application, JupyterLab,
Google Colab, and SageMaker. This plugin frontend is built using ITK/VTK Viewer
components.

To install the stable python package:

.. code-block:: bash

$ pip install tensorboard_plugin_3d
$ pip install tensorboard-plugin-3d

.. image:: images/label_with_output.gif
.. image:: images/toggle_demo.gif
:alt: Output model with input

.. toctree::
Expand Down