You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pull/112/tags/tutorial/index.html
+34-1Lines changed: 34 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -120,4 +120,37 @@
120
120
The documentation on Matplotlib along with general examples, cheat sheets and a starting guide can be found <ahref=https://matplotlib.org/target=_blankrel=noopener>here</a>.</div></div><p>As MeVisLab supports the integration of Python scripts e. g. for test automation, Matplotlib can be used to visualize any data you might want to see. And as it is directly integrated into MeVisLab, you don’t have to install it (via <code>PythonPip</code> module) first.</p><h4><ahref=https://mevislab.github.io/examples/pull/112/tutorials/thirdparty/matplotlib/modulesetup/>Example 1: Module Setup</a></h4><h1id=example-1-module-setup>Example 1: Module Setup</h1><h2id=introduction>Introduction</h2><p>To be able to access the data needed for our grayscale distribution plots, we need a network consisting of a module that imports DICOM data, a module that differentiates between slices and another that ouputs histogram data.</p><h2id=steps-to-do>Steps to do</h2><p>Open up your MeVisLab workspace and add the modules <code>LocalImage</code>, <code>SubImage</code> and <code>Histogram</code> to it.
121
121
Connect the output of <code>LocalImage</code> to the input of <code>SubImage</code> and the output of <code>SubImage</code> with the input of <code>Histogram</code>.
122
122
If you feel like using a shortcut, you can also download the base network below and open it in your MeVisLab.</p><h4><ahref=https://mevislab.github.io/examples/pull/112/tutorials/thirdparty/matplotlib/2dplotting/>Example 2: 2D Plotting</a></h4><h1id=example-2-2d-plotting>Example 2: 2D Plotting</h1><h2id=introduction>Introduction</h2><p>In this tutorial, we will equip the macro module we created in the <ahref=https://mevislab.github.io/examples/pull/112/tutorials/thirdparty/matplotlib/modulesetup>previous tutorial</a> with a responsive and interactable panel to plot grayscale distributions of single slices as well as defined sequences of slices in 2D.</p><h2id=steps-to-do>Steps to do</h2><p>Open the module definition folder of your macro module and the related .script file in MATE. Then activate the Preview as shown below:</p><p><pclass=page-image><adata-modal=bs-lightboxhref=https://mevislab.github.io/examples/pull/112/images/tutorials/thirdparty/Matplotlib7.pngtitle><imgclass="img-fluid rounded" src=https://mevislab.github.io/examples/pull/112/images/tutorials/thirdparty/Matplotlib7.pngalt="MATE Preview"></a><figcaptionclass=figure-caption></figcaption></p><h4><ahref=https://mevislab.github.io/examples/pull/112/tutorials/thirdparty/matplotlib/slicecomparison/>Example 3: Slice Comparison</a></h4><h1id=example-3-slice-comparison>Example 3: Slice Comparison</h1><h2id=introduction>Introduction</h2><p>We will adapt the previously created macro module to be able to overlay two defined slices to compare their grayscale distributions.</p><ul><li>The module we are adapting has been set up in the <ahref=https://mevislab.github.io/examples/pull/112/tutorials/thirdparty/matplotlib/modulesetup>Example 1: Module Setup</a> tutorial.</li><li>The panel and two-dimensional plotting functionality has been added in [Example 2: 2D Plotting]
(/tutorials/thirdparty/matplotlib/2dplotting).</li></ul><h2id=steps-to-do>Steps to do</h2><p>At first, we will extend the panel: Open your <code>BaseNetwork</code> macro module within an empty MeVisLab workspace and select the .script file from its related files.</p><h4><ahref=https://mevislab.github.io/examples/pull/112/tutorials/thirdparty/matplotlib/3dplotting/>Example 4: 3D Plotting</a></h4><h1id=example-4-3d-plotting>Example 4: 3D Plotting</h1><h2id=introduction>Introduction</h2><p>In this tutorial, we will equip the macro module we created in the <ahref=https://mevislab.github.io/examples/pull/112/tutorials/thirdparty/matplotlib/modulesetup>Example 1: Module Setup</a> and later on adapted by enabling it to plot grayscale distributions of single slices and sequences in 2D in <ahref=https://mevislab.github.io/examples/pull/112/tutorials/thirdparty/matplotlib/2dplotting>Example 2: 2D Plotting</a> with a three dimensional plotting functionality.</p><h2id=steps-to-do>Steps to do</h2><p>The fields and commands needed have already been prepared in the second tutorial. We will just have to modify our .py file a little to make them usable. Integrate the following code into your .py file and import numpy.</p><h4><ahref=https://mevislab.github.io/examples/pull/112/tutorials/shorts/>Tips and Tricks</a></h4><h1id=mevislab-tips-and-tricks>MeVisLab Tips and Tricks</h1><p>This chapter shows some features and functionalities which are helpful but do not provide its own tutorial.</p><ul><li><ahref=https://mevislab.github.io/examples/pull/112/tutorials/shorts#shortcuts>Keyboard Shortcuts</a></li><li><ahref=https://mevislab.github.io/examples/pull/112/tutorials/shorts#snippets>Using Snippets</a></li><li><ahref=https://mevislab.github.io/examples/pull/112/tutorials/shorts#scriptingassistant>Scripting Assistant</a></li><li><ahref=https://mevislab.github.io/examples/pull/112/tutorials/shorts#user_scripts>User Scripts</a></li><li><ahref=https://mevislab.github.io/examples/pull/112/tutorials/shorts#mlimagestate>Show status of module in- and output</a></li><li><ahref=https://mevislab.github.io/examples/pull/112/tutorials/shorts#modulesuggest>Module suggestion of module in- and output</a></li></ul><h2id=shortcuts>Keyboard Shortcuts</h2><p>This is a collection of useful keyboard shortcuts in MeVisLab, hopefully it grows continuously.</p><tableclass="table table-striped"><thead><tr><th>Shortcut</th><th>Functionality</th></tr></thead><tbody><tr><td><kbd>CTRL
124
+
</kbd>+
125
+
<kbd>1</kbd></td><td>Automatically arrange selection of modules / in the current network</td></tr><tr><td><kbd>CTRL
126
+
</kbd>+
127
+
<kbd>2</kbd></td><td>Open most recent network file</td></tr><tr><td><kbd>CTRL
128
+
</kbd>+
129
+
<kbd>3</kbd></td><td>Run most recent test case (extremely useful for developers)</td></tr><tr><td><kbd>CTRL
<imgwidth=22pxsrc=https://mevislab.github.io/examples/pull/112/images/mmb.svgalt="Middle Mouse Button / Mouse Wheel"></td><td>Show Internal Network</td></tr><tr><td><kbd>SPACE</kbd></td><td>Show hidden outputs of the currently selected module</td></tr><tr><td><kbd>CTRL
146
+
</kbd>+
147
+
<kbd>ALT
148
+
</kbd>+
149
+
<kbd>T</kbd></td><td>Start test center</td></tr><tr><td><kbd>CTRL
150
+
</kbd>+
151
+
<kbd>K</kbd></td><td>Restart MeVisLab with current network(s)</td></tr><tr><td><kbd>CTRL
152
+
</kbd>+
153
+
<kbd>R</kbd></td><td>Run script file with the same name of your network file if available in the same directory.</td></tr><tr><td><kbd>ALT
0 commit comments