# Development

**URL:** https://discourse.slicer.org/c/dev/5.md?page=20

[Latest](https://discourse.slicer.org/latest.md) · [Categories](https://discourse.slicer.org/categories.md) · [Tags](https://discourse.slicer.org/tags.md)

**Page:** 21

---

## [Run slicer on windows with log / terminal output?](https://discourse.slicer.org/t/run-slicer-on-windows-with-log-terminal-output/36234)

<div class="topic-metadata">

**Author:** [@dangerweenie](https://discourse.slicer.org/u/dangerweenie)\
**Replies:** 0\
**Last updated:** [May 17, 2024, 5:18pm UTC](https://discourse.slicer.org/t/run-slicer-on-windows-with-log-terminal-output/36234 "2024-05-17T17:18:10Z")

</div>

Hi there! New to slicer here, excited to dig in. I’m trying to run the HDBrainExtraction module and it seems to hang (30 minutes or more) when initialzing / installing pytorch. Not sure if slicer uses a .venv, i have …

---

## [Set to outline mode when a segmentation node is added, NOT WORKING](https://discourse.slicer.org/t/set-to-outline-mode-when-a-segmentation-node-is-added-not-working/36203)

<div class="topic-metadata">

**Author:** [@mrlongzhang](https://discourse.slicer.org/u/mrlongzhang)\
**Replies:** 5\
**Last updated:** [May 17, 2024, 9:00am UTC](https://discourse.slicer.org/t/set-to-outline-mode-when-a-segmentation-node-is-added-not-working/36203 "2024-05-17T09:00:39Z")

</div>

I used the follow code in .slicerrc.py to modify the default behavior of slicer 2D slice (up to 5.6.x) to display in outline mode instead of in filled mode for a segmentation. def SetOutline(caller,event): for node i…

---

## [Change active widget](https://discourse.slicer.org/t/change-active-widget/36005)

<div class="topic-metadata">

**Author:** [@dfajtai](https://discourse.slicer.org/u/dfajtai)\
**Replies:** 2\
**Last updated:** [May 17, 2024, 7:53am UTC](https://discourse.slicer.org/t/change-active-widget/36005 "2024-05-17T07:53:48Z")

</div>

I am curious if there is a way to jump from one module to another programmatically using Python. I have a module in which several automatic segmentations were generated. I would like to give an easy option for the user …

---

## [Missing “Reference Volume” option in FreeSurfer Importer (it looks like version 5.6 onwards)](https://discourse.slicer.org/t/missing-reference-volume-option-in-freesurfer-importer-it-looks-like-version-5-6-onwards/35977)

<div class="topic-metadata">

**Author:** [@Nis175](https://discourse.slicer.org/u/Nis175)\
**Replies:** 4\
**Last updated:** [May 16, 2024, 9:17pm UTC](https://discourse.slicer.org/t/missing-reference-volume-option-in-freesurfer-importer-it-looks-like-version-5-6-onwards/35977 "2024-05-16T21:17:20Z")

</div>

Dear 3D Slicer Team, I have noticed that the “Reference Volume” option available in version 5.4.0 of the FreeSurfer importer has been removed in the latest versions, including 5.6.2. Please see the attached screenshots…

---

## [Python code for getting current displayed slice on a red window](https://discourse.slicer.org/t/python-code-for-getting-current-displayed-slice-on-a-red-window/35891)

<div class="topic-metadata">

**Author:** [@mlh](https://discourse.slicer.org/u/mlh)\
**Replies:** 2\
**Last updated:** [May 16, 2024, 12:03pm UTC](https://discourse.slicer.org/t/python-code-for-getting-current-displayed-slice-on-a-red-window/35891 "2024-05-16T12:03:35Z")

</div>

Hi all! Would you please share to me python snippet on how to get a slice index which is shown on a red window? Please point me to similar post if already answered. I couldn’t find it though. Thanks a lot!

---

## [Retrieve the segmentation and source volume from Segment Editor (segmentEditorWidget)](https://discourse.slicer.org/t/retrieve-the-segmentation-and-source-volume-from-segment-editor-segmenteditorwidget/36162)

<div class="topic-metadata">

**Author:** [@waromero](https://discourse.slicer.org/u/waromero)\
**Replies:** 0\
**Last updated:** [May 15, 2024, 9:37am UTC](https://discourse.slicer.org/t/retrieve-the-segmentation-and-source-volume-from-segment-editor-segmenteditorwidget/36162 "2024-05-15T09:37:51Z")

</div>

Hello, I embedded the segmentEditorWidget from the Segment Editor module into my custom-made module. Now I want to retrieve the vtkMRMLScalarVolumeNode from the sourceVolumeNodeSelector; and the vtkMRMLSegmentationNode …

---

## [Colormap loading issue after scene save](https://discourse.slicer.org/t/colormap-loading-issue-after-scene-save/36147)

<div class="topic-metadata">

**Author:** [@connorh](https://discourse.slicer.org/u/connorh)\
**Replies:** 0\
**Last updated:** [May 14, 2024, 3:20pm UTC](https://discourse.slicer.org/t/colormap-loading-issue-after-scene-save/36147 "2024-05-14T15:20:49Z")

</div>

I’m creating custom colormaps for a tool I’ve developed. If I create a continuous colormap I can save the scene, close, reload, and the colormap works as expect. When I create discrete colormaps, it works initially, but…

---

## [Using async socket network](https://discourse.slicer.org/t/using-async-socket-network/35654)

<div class="topic-metadata">

**Author:** [@dael0207](https://discourse.slicer.org/u/dael0207)\
**Replies:** 6\
**Last updated:** [May 12, 2024, 3:51pm UTC](https://discourse.slicer.org/t/using-async-socket-network/35654 "2024-05-12T15:51:17Z")

</div>

Hello Slicer community. I’d like to incorporate a function within Slicer that asynchronously waits for reception. What I want is for the function to execute when Slicer is turned on, asynchronously wait for reception, …

---

## [SimpleITK WriteImage() fails \*silently\* when writing DICOM -- why? And what to do?](https://discourse.slicer.org/t/simpleitk-writeimage-fails-silently-when-writing-dicom-why-and-what-to-do/20369)

<div class="topic-metadata">

**Author:** [@masonbogue](https://discourse.slicer.org/u/masonbogue)\
**Replies:** 9\
**Last updated:** [May 11, 2024, 7:51am UTC](https://discourse.slicer.org/t/simpleitk-writeimage-fails-silently-when-writing-dicom-why-and-what-to-do/20369 "2024-05-11T07:51:22Z")

</div>

Here’s what’s happening (at the Slicer Python console): import SimpleITK as sitk sitk.WriteImage(slices\[0\], "C:\\\\Users\\\\username\\\\test\\\\0000.mhd") # works fine sitk.WriteImage(slices\[0\], "C:\\\\Users\\\\username\\\\test\\\\0000…

---

## [Add vtkVectorText programmatically](https://discourse.slicer.org/t/add-vtkvectortext-programmatically/33977)

<div class="topic-metadata">

**Author:** [@Jeff\_Zeyl](https://discourse.slicer.org/u/Jeff_Zeyl)\
**Replies:** 4\
**Last updated:** [May 8, 2024, 7:48pm UTC](https://discourse.slicer.org/t/add-vtkvectortext-programmatically/33977 "2024-05-08T19:48:30Z")

</div>

I would like to engrave many text models onto a skin model, programmatically, based on a set of markup control point coordinates. My current approach is to generate vtk.vtkVectorText models, set their location, and subt…

---

## [Load ScriptedModule using python scripts](https://discourse.slicer.org/t/load-scriptedmodule-using-python-scripts/35984)

<div class="topic-metadata">

**Author:** [@park](https://discourse.slicer.org/u/park)\
**Replies:** 0\
**Last updated:** [May 8, 2024, 7:26am UTC](https://discourse.slicer.org/t/load-scriptedmodule-using-python-scripts/35984 "2024-05-08T07:26:34Z")

</div>

Hi all, For security reasons, we want to place our module on a web server and use web APIs to read it when Slicer is opened. This way, we can identify who called the module and execute it without downloading the source …

---

## [Strategies for Distributing Python Programs Securely](https://discourse.slicer.org/t/strategies-for-distributing-python-programs-securely/35807)

<div class="topic-metadata">

**Author:** [@park](https://discourse.slicer.org/u/park)\
**Replies:** 4\
**Last updated:** [May 8, 2024, 7:28am UTC](https://discourse.slicer.org/t/strategies-for-distributing-python-programs-securely/35807 "2024-05-08T07:28:40Z")

</div>

Hello all, I’m looking to develop a commercial program using a slicer. However, I’ve discovered that when I package and distribute this custom program, the source code remains exposed in the scripted model folder. Afte…

---

## [How to use python to scroll through a dataset](https://discourse.slicer.org/t/how-to-use-python-to-scroll-through-a-dataset/35973)

<div class="topic-metadata">

**Author:** [@Tobias](https://discourse.slicer.org/u/Tobias)\
**Replies:** 2\
**Last updated:** [May 8, 2024, 7:07am UTC](https://discourse.slicer.org/t/how-to-use-python-to-scroll-through-a-dataset/35973 "2024-05-08T07:07:17Z")

</div>

Hi I use slicer alot in education but am very new to programing. I would like to make a python script that scrolls through a dataset from the first to the last image in z. So ideally it should be able to get the min an…

---

## [Could I edit qMRML~Widget in Qt designer?](https://discourse.slicer.org/t/could-i-edit-qmrml-widget-in-qt-designer/35684)

<div class="topic-metadata">

**Author:** [@park](https://discourse.slicer.org/u/park)\
**Replies:** 2\
**Last updated:** [April 24, 2024, 2:26am UTC](https://discourse.slicer.org/t/could-i-edit-qmrml-widget-in-qt-designer/35684 "2024-04-24T02:26:39Z")

</div>

Hello everyone, I’m interested in creating a custom widget using the qMRML~Widget in Qt Designer, particularly the qMRMLMarksupROIWidget. For the qMRMLMarksupROIWidget, I only require a slider to adjust the size of the…

---

## [CTK/Slicer UI customization with stylesheet](https://discourse.slicer.org/t/ctk-slicer-ui-customization-with-stylesheet/35936)

<div class="topic-metadata">

**Author:** [@Davide\_Punzo](https://discourse.slicer.org/u/Davide_Punzo)\
**Replies:** 0\
**Last updated:** [May 6, 2024, 8:01am UTC](https://discourse.slicer.org/t/ctk-slicer-ui-customization-with-stylesheet/35936 "2024-05-06T08:01:37Z")

</div>

Hey @Sam\_Horvath @lassoan @pieper @jcfr @cpinter I just wanted to bring to your attention this draft PR Reference: visual DICOM browser (and in general CTK) uses Qpalette to change colors dynamically. This does not…

---

## [How to Align a vtk Cylinder to a Known Vector](https://discourse.slicer.org/t/how-to-align-a-vtk-cylinder-to-a-known-vector/35880)

<div class="topic-metadata">

**Author:** [@Teresa\_Marotta](https://discourse.slicer.org/u/Teresa_Marotta)\
**Replies:** 3\
**Last updated:** [May 3, 2024, 7:01pm UTC](https://discourse.slicer.org/t/how-to-align-a-vtk-cylinder-to-a-known-vector/35880 "2024-05-03T19:01:05Z")

</div>

Hi all, I’m looking to create a model of a cylinder and orient it along a known vector using python. More specifically, I have two control points, but I want to create a line that goes between them but extends past the c…

---

## [Calculating RAS locations directly from DICOM image tags (ImagePosition/ ImageOrientation)](https://discourse.slicer.org/t/calculating-ras-locations-directly-from-dicom-image-tags-imageposition-imageorientation/35858)

<div class="topic-metadata">

**Author:** [@Hesam](https://discourse.slicer.org/u/Hesam)\
**Replies:** 5\
**Last updated:** [May 2, 2024, 12:30pm UTC](https://discourse.slicer.org/t/calculating-ras-locations-directly-from-dicom-image-tags-imageposition-imageorientation/35858 "2024-05-02T12:30:07Z")

</div>

Hello everyone, I’m currently using 3D Slicer to identify microbleeds in brain MRIs, utilizing RAS coordinates provided in an accompanying Excel file. While manual identification works perfectly, automating the process …

---

## [A few parametric shapes controlled by markups points](https://discourse.slicer.org/t/a-few-parametric-shapes-controlled-by-markups-points/35854)

<div class="topic-metadata">

**Author:** [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Replies:** 0\
**Last updated:** [May 1, 2024, 2:11pm UTC](https://discourse.slicer.org/t/a-few-parametric-shapes-controlled-by-markups-points/35854 "2024-05-01T14:11:25Z")

</div>

Hello, I have pushed this branch in the ExtraMarkups extension. It offers a few parametric shapes that are controlled by 4 markups control points. More parameters are controlled in the module’s widget. They are all vtkP…

---

## [Editing an Existing NRRD File](https://discourse.slicer.org/t/editing-an-existing-nrrd-file/35817)

<div class="topic-metadata">

**Author:** [@DrBorg](https://discourse.slicer.org/u/DrBorg)\
**Replies:** 4\
**Last updated:** [April 30, 2024, 12:50pm UTC](https://discourse.slicer.org/t/editing-an-existing-nrrd-file/35817 "2024-04-30T12:50:07Z")

</div>

Hello! I have a quick question. I’m using pynrrd to open an existing segmented NRRD file. I’m trying to remove certain segments that are there, then re-save without those removed segments. I have many Segments, and e…

---

## [How to log click on a button in segment editor?](https://discourse.slicer.org/t/how-to-log-click-on-a-button-in-segment-editor/35574)

<div class="topic-metadata">

**Author:** [@lskog](https://discourse.slicer.org/u/lskog)\
**Replies:** 4\
**Last updated:** [April 30, 2024, 2:39am UTC](https://discourse.slicer.org/t/how-to-log-click-on-a-button-in-segment-editor/35574 "2024-04-30T02:39:33Z")

</div>

Hello everyone, while trying to create personal module for slicer a problem occured. I need to log then the user click on “add” button in segment editor and changes tools. I want to create a timer, which will log how lon…

---

## [CLI module output image segmentation](https://discourse.slicer.org/t/cli-module-output-image-segmentation/35797)

<div class="topic-metadata">

**Author:** [@Franciska](https://discourse.slicer.org/u/Franciska)\
**Replies:** 1\
**Last updated:** [April 29, 2024, 2:27pm UTC](https://discourse.slicer.org/t/cli-module-output-image-segmentation/35797 "2024-04-29T14:27:37Z")

</div>

Hi! I would like to create a custom module, just like the BlurImage example. I put mine under Segmentation modules. When using the module, under the IO parameters I can chose Output Volume as creating a new volume, or…

---

## [Move a Qt Dockwidget](https://discourse.slicer.org/t/move-a-qt-dockwidget/35746)

<div class="topic-metadata">

**Author:** [@SANTIAGO\_PENDON\_MING](https://discourse.slicer.org/u/SANTIAGO_PENDON_MING)\
**Replies:** 1\
**Last updated:** [April 29, 2024, 1:51pm UTC](https://discourse.slicer.org/t/move-a-qt-dockwidget/35746 "2024-04-29T13:51:17Z")

</div>

Hi to all the community. The task today is move my DockWidgetArea from here: to here: At this moment I’m doing it manually, but I’m sure that specifying the correct configuration it could be made automatically. …

---

## [TI1 module for T1 map](https://discourse.slicer.org/t/ti1-module-for-t1-map/35756)

<div class="topic-metadata">

**Author:** [@abarat21](https://discourse.slicer.org/u/abarat21)\
**Replies:** 0\
**Last updated:** [April 26, 2024, 5:56pm UTC](https://discourse.slicer.org/t/ti1-module-for-t1-map/35756 "2024-04-26T17:56:35Z")

</div>

I have a T1 map file that I have loaded into Slicer. I want to create a simple module that has a TI1 slider that the user slides to change the TI value of the T1 map using the equation 1 - 2 exp(-TI / Tone), and that ou…

---

## [Is there any api update in Slicer 5.7?](https://discourse.slicer.org/t/is-there-any-api-update-in-slicer-5-7/35741)

<div class="topic-metadata">

**Author:** [@derekcbr](https://discourse.slicer.org/u/derekcbr)\
**Replies:** 1\
**Last updated:** [April 26, 2024, 7:26am UTC](https://discourse.slicer.org/t/is-there-any-api-update-in-slicer-5-7/35741 "2024-04-26T07:26:30Z")

</div>

args = \[slicer\_output\_file, "--additional-module-paths", slice\_installation\_path, "--python-code", "print('Start Slicer from Blender!')", "--python-script", startup\_slice\_script\_file\] process = subprocess.Popen(\[slicer\_p…

---

## [How to get output result in ScriptedCLI module?](https://discourse.slicer.org/t/how-to-get-output-result-in-scriptedcli-module/35700)

<div class="topic-metadata">

**Author:** [@nnzzll](https://discourse.slicer.org/u/nnzzll)\
**Replies:** 0\
**Last updated:** [April 24, 2024, 3:59am UTC](https://discourse.slicer.org/t/how-to-get-output-result-in-scriptedcli-module/35700 "2024-04-24T03:59:48Z")

</div>

I’m developing a ScriptedCLI module, doing some image processing. The result of this module is a numpy array which represents a group of points. How can I get this result in Slicer?

---

## [Hide mainWindow title bar](https://discourse.slicer.org/t/hide-mainwindow-title-bar/35666)

<div class="topic-metadata">

**Author:** [@park](https://discourse.slicer.org/u/park)\
**Replies:** 3\
**Last updated:** [April 23, 2024, 3:58pm UTC](https://discourse.slicer.org/t/hide-mainwindow-title-bar/35666 "2024-04-23T15:58:26Z")

</div>

Hi all. I would like to hide the title bar of the mainWindow (as shown in the figure below). Thus, I have tried the code below, But the mainWindow itself closed. Could I get solution about this ? flags = qt.Qt.Framel…

---

## [How to show a fiducial in only specified views?](https://discourse.slicer.org/t/how-to-show-a-fiducial-in-only-specified-views/35682)

<div class="topic-metadata">

**Author:** [@koeglfryderyk](https://discourse.slicer.org/u/koeglfryderyk)\
**Replies:** 1\
**Last updated:** [April 23, 2024, 2:58pm UTC](https://discourse.slicer.org/t/how-to-show-a-fiducial-in-only-specified-views/35682 "2024-04-23T14:58:19Z")

</div>

I have a vtkMRMLMarkupsFiducialNode and want to show it only a few views, e.g. Red+, Green+ and Yellow+. How can I do that?

---

## [Is it possible to control the crosshair to only be visible in certain views?](https://discourse.slicer.org/t/is-it-possible-to-control-the-crosshair-to-only-be-visible-in-certain-views/35406)

<div class="topic-metadata">

**Author:** [@matrosica0808](https://discourse.slicer.org/u/matrosica0808)\
**Replies:** 1\
**Last updated:** [April 23, 2024, 9:48am UTC](https://discourse.slicer.org/t/is-it-possible-to-control-the-crosshair-to-only-be-visible-in-certain-views/35406 "2024-04-23T09:48:21Z")

</div>

The extension is configured to enable tracking of data at various points in time. I want to use crosshair according to each point of view. Is there a way to create a crosshair instance as below? If you do this, they all…

---

## [Deleting segment increases RAM usage](https://discourse.slicer.org/t/deleting-segment-increases-ram-usage/35626)

<div class="topic-metadata">

**Author:** [@Kostr](https://discourse.slicer.org/u/Kostr)\
**Replies:** 2\
**Last updated:** [April 22, 2024, 12:00pm UTC](https://discourse.slicer.org/t/deleting-segment-increases-ram-usage/35626 "2024-04-22T12:00:29Z")

</div>

Hello, For my undergraduate project, I am developing a Slicer extension that opens a volume and a segmentation containing numerous segments. Since some segments within the segmentation are incorrect, my extension shoul…

---

## [Did anyone try to install  Brain-Tumor-Segmentaion-on-3D-Slicer Extension?](https://discourse.slicer.org/t/did-anyone-try-to-install-brain-tumor-segmentaion-on-3d-slicer-extension/35614)

<div class="topic-metadata">

**Author:** [@JSteinJ](https://discourse.slicer.org/u/JSteinJ)\
**Replies:** 2\
**Last updated:** [April 22, 2024, 9:22am UTC](https://discourse.slicer.org/t/did-anyone-try-to-install-brain-tumor-segmentaion-on-3d-slicer-extension/35614 "2024-04-22T09:22:31Z")

</div>

I found Brain-Tumor-Segmentation-on-3D-Slicer extension on git which looks very interesting. In the tutorial video Slicer 5.0.3 is used on a Mac. I tried to install it on win11 and ubnuntu 22.04 which works but the l…

[Previous page](https://discourse.slicer.org/c/dev/5.md?page=19)

[Next page](https://discourse.slicer.org/c/dev/5.md?page=21)
