Skip to content

Commit d799429

Browse files
committed
deploy: e287ff5
1 parent 8d84062 commit d799429

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

pull/139/index.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

pull/139/tutorials/image_processing/cpp_1/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
</span></span><span style=display:flex><span> {
6868
</span></span><span style=display:flex><span> <span style=color:#f92672>*</span>outVoxel <span style=color:#f92672>=</span> <span style=color:#f92672>*</span>inVoxel0 <span style=color:#f92672>+</span> constantValue;
6969
</span></span><span style=display:flex><span> }
70-
</span></span></code></pre></div></div></div><p>Compile the project in the development environment. Make sure to select a <em>Release</em> build.</p><h3 id=use-your-module-in-mevislab>Use Your Module in MeVisLab</h3><p>Your compiled *<em>.dll</em> is available in your project directory under <em>Sources/lib</em>. In order to use it in MeVisLab, it needs to be copied to the <em>lib</em> folder of your user package.</p><p>This only works in a post-build step.</p><p>If the environment variable <em>MLAB_AUTOMATIC_POSTBUILD_COPY</em> is set, the newly compiled DLLs and .lib files are copied to the correct location when MeVisLab restarts. Otherwise, they must be copied manually.</p><p>For testing purposes, you can use a <code>LocalImage</code> module and two <code>View2D</code> modules. Connect the <code>SimpleAdd</code> module to the second <code>View2D</code> and change the <field>Constant Value</field> field.</p><p><p class=page-image><a data-modal=bs-lightbox href=images/tutorials/image_processing/cpp/cpp1_6.png title="Testing Network"><img id="Testing Network" class="img-fluid rounded" src=images/tutorials/image_processing/cpp/cpp1_6.png alt="Testing Network" title="Testing Network"></a><figcaption class=figure-caption>Testing Network</figcaption></p></p><p>The output image of the module <code>SimpleAdd</code> is automatically recalculated on changing the field <field>Constant Value</field>. This is already implemented in the generated code of the file below:</p><div class=card style=margin-bottom:2rem><div class="card-header d-flex justify-content-between"><p class="card-title m-0">mlSimpleAdd.cpp</p></div><div class=card-body><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none><code class=language-c++ data-lang=c++><span style=display:flex><span> <span style=color:#66d9ef>void</span> SimpleAdd<span style=color:#f92672>::</span>handleNotification(Field<span style=color:#f92672>*</span> field)
70+
</span></span></code></pre></div></div></div><p>Compile the project in the development environment. Make sure to select a <em>Release</em> build.</p><h3 id=use-your-module-in-mevislab>Use Your Module in MeVisLab</h3><p>Your compiled *<em>.dll</em> is available in your project directory under <em>Sources/lib</em>. In order to use it in MeVisLab, it needs to be copied to the <em>lib</em> folder of your user package.</p><p>This only works in a post-build step.</p><p>If the environment variable <em>MLAB_AUTOMATIC_POSTBUILD_COPY</em> is set, the newly compiled DLLs and <em>.lib</em> files are copied to the correct location when MeVisLab restarts. Otherwise, they must be copied manually.</p><p>For testing purposes, you can use a <code>LocalImage</code> module and two <code>View2D</code> modules. Connect the <code>SimpleAdd</code> module to the second <code>View2D</code> and change the <field>Constant Value</field> field.</p><p><p class=page-image><a data-modal=bs-lightbox href=images/tutorials/image_processing/cpp/cpp1_6.png title="Testing Network"><img id="Testing Network" class="img-fluid rounded" src=images/tutorials/image_processing/cpp/cpp1_6.png alt="Testing Network" title="Testing Network"></a><figcaption class=figure-caption>Testing Network</figcaption></p></p><p>The output image of the module <code>SimpleAdd</code> is automatically recalculated on changing the field <field>Constant Value</field>. This is already implemented in the generated code of the file below:</p><div class=card style=margin-bottom:2rem><div class="card-header d-flex justify-content-between"><p class="card-title m-0">mlSimpleAdd.cpp</p></div><div class=card-body><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none><code class=language-c++ data-lang=c++><span style=display:flex><span> <span style=color:#66d9ef>void</span> SimpleAdd<span style=color:#f92672>::</span>handleNotification(Field<span style=color:#f92672>*</span> field)
7171
</span></span><span style=display:flex><span> {
7272
</span></span><span style=display:flex><span> <span style=color:#75715e>// Handle changes of module parameters and input image fields here.
7373
</span></span></span><span style=display:flex><span> <span style=color:#66d9ef>bool</span> touchOutputs <span style=color:#f92672>=</span> false;
@@ -86,5 +86,5 @@
8686
</span></span></span><span style=display:flex><span> touchOutputImageFields();
8787
</span></span><span style=display:flex><span> }
8888
</span></span><span style=display:flex><span> }
89-
</span></span></code></pre></div></div></div><h2 id=summary>Summary</h2><ul><li>MeVisLab allows to develop your own C++ modules.</li><li>The Project Wizard already generates all necessary *<em>.cpp</em> and *<em>.h</em> files and a loop through all voxels of the input image.</li><li>Changes of user-defined fields automatically lead to a recalculation of the input image.</li></ul></div></div><script>const body_element=document.querySelector("html body"),modal_div=document.createElement("div");let modal_window=document.body.appendChild(modal_div),modal_html='<div class="modal fade" id="lightboxModalFullscreen" tabindex="-1" aria-labelledby="lightboxModalFullscreenLabel" aria-hidden="true"><div class="modal-dialog modal-fullscreen" data-bs-dismiss="modal" aria-label="Close"><div class="modal-content border-0"><div class="modal-body d-flex align-self-center align-items-center justify-content-center"><div class="modal-custom"><img src="" id="LightboxCanvas" class="img-fluid" data-bs-dismiss="modal" aria-label="Close" /><figcaption id="LightboxCaption" class="figure-caption"></figcaption></div></div></div></div></div>';modal_window.innerHTML=modal_html,Array.from(document.querySelectorAll('[data-modal*="bs-lightbox"]')).forEach(e=>{e.setAttribute("data-bs-toggle","modal"),e.setAttribute("data-bs-target","#lightboxModalFullscreen"),e.addEventListener("click",t=>{const n=e.getAttribute("href"),s=e.getAttribute("title");document.getElementById("LightboxCanvas").src=n,document.getElementById("LightboxCaption").innerHTML=s,t.preventDefault(),console.log(n)})})</script><hr><div class=row style=margin:25px!important><div class=col><a href=https://mevislab.github.io/examples/pull/139/tutorials/image_processing/cpp_development/ title="Developing Your Own C++ Modules" class="btn btn-outline-secondary btn-sm" role=button aria-pressed=true><svg width="16" height="16" fill="currentColor" class="bi bi-skip-start-fill" viewBox="0 0 16 16"><path d="M4 4a.5.5.0 011 0v3.248l6.267-3.636c.54-.313 1.232.066 1.232.696v7.384c0 .63-.692 1.01-1.232.697L5 8.753V12a.5.5.0 01-1 0V4z"/></svg>&nbsp;Developing Your Own C++ Modules</a></div><div class=col style=text-align:right><a href=https://mevislab.github.io/examples/pull/139/tutorials/image_processing/image_processing1/ title="Example 1: Applying Scalar Functions to Two Images" class="btn btn-outline-secondary btn-sm" role=button aria-pressed=true>Example 1: Applying Scalar Functions to Two Images&nbsp;
89+
</span></span></code></pre></div></div></div><h2 id=summary>Summary</h2><ul><li>MeVisLab allows to develop your own C++ modules.</li><li>The Project Wizard already generates all necessary <em>.cpp</em> and <em>.h</em> files and a loop through all voxels of the input image.</li><li>Changes of user-defined fields automatically lead to a recalculation of the input image.</li></ul></div></div><script>const body_element=document.querySelector("html body"),modal_div=document.createElement("div");let modal_window=document.body.appendChild(modal_div),modal_html='<div class="modal fade" id="lightboxModalFullscreen" tabindex="-1" aria-labelledby="lightboxModalFullscreenLabel" aria-hidden="true"><div class="modal-dialog modal-fullscreen" data-bs-dismiss="modal" aria-label="Close"><div class="modal-content border-0"><div class="modal-body d-flex align-self-center align-items-center justify-content-center"><div class="modal-custom"><img src="" id="LightboxCanvas" class="img-fluid" data-bs-dismiss="modal" aria-label="Close" /><figcaption id="LightboxCaption" class="figure-caption"></figcaption></div></div></div></div></div>';modal_window.innerHTML=modal_html,Array.from(document.querySelectorAll('[data-modal*="bs-lightbox"]')).forEach(e=>{e.setAttribute("data-bs-toggle","modal"),e.setAttribute("data-bs-target","#lightboxModalFullscreen"),e.addEventListener("click",t=>{const n=e.getAttribute("href"),s=e.getAttribute("title");document.getElementById("LightboxCanvas").src=n,document.getElementById("LightboxCaption").innerHTML=s,t.preventDefault(),console.log(n)})})</script><hr><div class=row style=margin:25px!important><div class=col><a href=https://mevislab.github.io/examples/pull/139/tutorials/image_processing/cpp_development/ title="Developing Your Own C++ Modules" class="btn btn-outline-secondary btn-sm" role=button aria-pressed=true><svg width="16" height="16" fill="currentColor" class="bi bi-skip-start-fill" viewBox="0 0 16 16"><path d="M4 4a.5.5.0 011 0v3.248l6.267-3.636c.54-.313 1.232.066 1.232.696v7.384c0 .63-.692 1.01-1.232.697L5 8.753V12a.5.5.0 01-1 0V4z"/></svg>&nbsp;Developing Your Own C++ Modules</a></div><div class=col style=text-align:right><a href=https://mevislab.github.io/examples/pull/139/tutorials/image_processing/image_processing1/ title="Example 1: Applying Scalar Functions to Two Images" class="btn btn-outline-secondary btn-sm" role=button aria-pressed=true>Example 1: Applying Scalar Functions to Two Images&nbsp;
9090
<svg width="16" height="16" fill="currentColor" class="bi bi-skip-end-fill" viewBox="0 0 16 16"><path d="M12.5 4a.5.5.0 00-1 0v3.248L5.233 3.612C4.693 3.3 4 3.678 4 4.308v7.384c0 .63.692 1.01 1.233.697L11.5 8.753V12a.5.5.0 001 0V4z"/></svg></a></div></div></div><footer class="footer fixed-bottom mt-auto py-3"><div class="row footer-text"><div class="col-12 col-md text-center text-md-left text-white">&copy; Copyright 2026 <a href=https://www.mevis.de target=_blank>MeVis Medical Solutions AG</a> | <a href=https://www.mevislab.de/imprint target=_blank>Imprint</a> | <a href=https://www.mevislab.de target=_blank>https://www.mevislab.de</a></div></div><script src=https://mevislab.github.io/examples/pull/139/js/bundle.min.js defer></script><script>hljs.highlightAll(),hljs.configure({ignoreUnescapedHTML:!0}),hljs.addPlugin(new CopyButtonPlugin)</script></footer></body></html>

0 commit comments

Comments
 (0)