# Development

**URL:** https://discourse.slicer.org/c/dev/5.md?no_subcategories=false&page=70

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

**Page:** 71

---

## [Slicer Build takes too much time to compile using make command](https://discourse.slicer.org/t/slicer-build-takes-too-much-time-to-compile-using-make-command/15828)

<div class="topic-metadata">

**Author:** [@Hanumant\_Gawali](https://discourse.slicer.org/u/Hanumant_Gawali)\
**Replies:** 11\
**Last updated:** [August 24, 2021, 12:56pm UTC](https://discourse.slicer.org/t/slicer-build-takes-too-much-time-to-compile-using-make-command/15828 "2021-08-24T12:56:38Z")

</div>

Hi there, I am trying to build slicer from source code on ubuntu 20.04, I have executes command cmake and then make in debuge directory. It is taking too much time to build near about 10 hours. Please help me for unders…

---

## [About d pointer structure of slicer application](https://discourse.slicer.org/t/about-d-pointer-structure-of-slicer-application/19304)

<div class="topic-metadata">

**Author:** [@xianger-qi](https://discourse.slicer.org/u/xianger-qi)\
**Replies:** 3\
**Last updated:** [August 24, 2021, 1:56am UTC](https://discourse.slicer.org/t/about-d-pointer-structure-of-slicer-application/19304 "2021-08-24T01:56:23Z")

</div>

there are a question about d pointer structure of slicer application that is why using a number of d pointer, q pointer to wrap classes. Even if those classes locate in the same project. In my view, the purpose of d poin…

---

## [Programmatically setting a TransformProcessorNode](https://discourse.slicer.org/t/programmatically-setting-a-transformprocessornode/18335)

<div class="topic-metadata">

**Author:** [@atracsys-sbt](https://discourse.slicer.org/u/atracsys-sbt)\
**Replies:** 3\
**Last updated:** [August 23, 2021, 4:41pm UTC](https://discourse.slicer.org/t/programmatically-setting-a-transformprocessornode/18335 "2021-08-23T16:41:09Z")

</div>

Hi, I’m currently writing a module that handles two tracked markers (one attached to a phantom and one attached to a pointer i.e. a stylus). In a effort to obtain the pointer coordinates in the referential of the phant…

---

## [How to read data from a vtkMRMLScalarVolumeNode](https://discourse.slicer.org/t/how-to-read-data-from-a-vtkmrmlscalarvolumenode/6252)

<div class="topic-metadata">

**Author:** [@ZiyunLiang](https://discourse.slicer.org/u/ZiyunLiang)\
**Replies:** 8\
**Last updated:** [August 23, 2021, 4:35pm UTC](https://discourse.slicer.org/t/how-to-read-data-from-a-vtkmrmlscalarvolumenode/6252 "2021-08-23T16:35:26Z")

</div>

Hi all, I’m having some problem reading data in .nii format in a vtkMRMLScalarVolumeNode in python scripted module. I currently use data ,header= load(‘/‘directoryodmydata’/Sag.nii.gz’) to read data from my dataset…

---

## [Change interpolation method](https://discourse.slicer.org/t/change-interpolation-method/19318)

<div class="topic-metadata">

**Author:** [@riep](https://discourse.slicer.org/u/riep)\
**Replies:** 9\
**Last updated:** [August 23, 2021, 4:32pm UTC](https://discourse.slicer.org/t/change-interpolation-method/19318 "2021-08-23T16:32:43Z")

</div>

Hi everyone, Is there a way to interactively change the interpolation method of a volume node. I have tried the following withtout success. volumeNode=getNode(“my\_volume\_name”) volumeNode.GetDisplayNode().SetInterpo…

---

## [Why \`qMRMLThreeDWidget\` is not supposed to be inherited](https://discourse.slicer.org/t/why-qmrmlthreedwidget-is-not-supposed-to-be-inherited/19313)

<div class="topic-metadata">

**Author:** [@keri](https://discourse.slicer.org/u/keri)\
**Replies:** 1\
**Last updated:** [August 23, 2021, 2:14pm UTC](https://discourse.slicer.org/t/why-qmrmlthreedwidget-is-not-supposed-to-be-inherited/19313 "2021-08-23T14:14:54Z")

</div>

Hi, I wanted to set custom qMRMLThreeDViewControllerWidget to the qMRMLThreeDWidget . But qMRMLThreeDWidgetPrivate is declared and defined within qMRMLThreeDWidget.cxx (i.e. there is no qMRMLThreeDWidget\_p.h file). Also…

---

## [How to show chinese characters in vtk widget](https://discourse.slicer.org/t/how-to-show-chinese-characters-in-vtk-widget/19305)

<div class="topic-metadata">

**Author:** [@wycstar](https://discourse.slicer.org/u/wycstar)\
**Replies:** 1\
**Last updated:** [August 23, 2021, 1:50pm UTC](https://discourse.slicer.org/t/how-to-show-chinese-characters-in-vtk-widget/19305 "2021-08-23T13:50:11Z")

</div>

i want to show chinese characters in 3d view widget using this code view.cornerAnnotation().SetText(vtk.vtkCornerAnnotation.UpperRight,"Something") but can only show ascii characters, the non ascii part is missing

---

## [Apply Laplacian smoothing using Python script](https://discourse.slicer.org/t/apply-laplacian-smoothing-using-python-script/2438)

<div class="topic-metadata">

**Author:** [@anandmulay3](https://discourse.slicer.org/u/anandmulay3)\
**Replies:** 10\
**Last updated:** [August 23, 2021, 12:04pm UTC](https://discourse.slicer.org/t/apply-laplacian-smoothing-using-python-script/2438 "2021-08-23T12:04:15Z")

</div>

how can i set smoothing effect to laplacian filter type in scriptable module script ??

---

## [How to set the line width of a model in slice display?](https://discourse.slicer.org/t/how-to-set-the-line-width-of-a-model-in-slice-display/19300)

<div class="topic-metadata">

**Author:** [@jumbojing](https://discourse.slicer.org/u/jumbojing)\
**Replies:** 2\
**Last updated:** [August 23, 2021, 11:46am UTC](https://discourse.slicer.org/t/how-to-set-the-line-width-of-a-model-in-slice-display/19300 "2021-08-23T11:46:23Z")

</div>

How to set the line width of a modle in slice display by python? @lassoan@Juicy@jamesobutler @jcfr @pieper Like this:

---

## [BGFDG\_vtkMRMLModelNodeH.vtp does not contain coordinate system information. Assuming LPS](https://discourse.slicer.org/t/bgfdg-vtkmrmlmodelnodeh-vtp-does-not-contain-coordinate-system-information-assuming-lps/19268)

<div class="topic-metadata">

**Author:** [@Mahesh\_Timmanagoudar](https://discourse.slicer.org/u/Mahesh_Timmanagoudar)\
**Replies:** 4\
**Last updated:** [August 23, 2021, 9:30am UTC](https://discourse.slicer.org/t/bgfdg-vtkmrmlmodelnodeh-vtp-does-not-contain-coordinate-system-information-assuming-lps/19268 "2021-08-23T09:30:51Z")

</div>

Centerline.tre file created correctly. But there is no points in BranchCenterline\_0.fcsv file. We got message in log that is “BGFDG\_vtkMRMLModelNodeH.vtp does not contain coordinate system information” . I have atta…

---

## [Add button to maximize view](https://discourse.slicer.org/t/add-button-to-maximize-view/18092)

<div class="topic-metadata">

**Author:** [@trash\_imp](https://discourse.slicer.org/u/trash_imp)\
**Replies:** 16\
**Last updated:** [August 21, 2021, 4:48pm UTC](https://discourse.slicer.org/t/add-button-to-maximize-view/18092 "2021-08-21T16:48:58Z")

</div>

@lassoan For accessing qMRMLLayoutManager::setLayout function in qMRMLThreeDViewControllerWidget, I need an instance of qMRMLLayoutManager. So, how can I get the qMRMLLayoutManager instance in qMRMLThreeDViewContro…

---

## [Optimal way of filling \`vtkFloatArray\`](https://discourse.slicer.org/t/optimal-way-of-filling-vtkfloatarray/19262)

<div class="topic-metadata">

**Author:** [@keri](https://discourse.slicer.org/u/keri)\
**Replies:** 2\
**Last updated:** [August 21, 2021, 2:01pm UTC](https://discourse.slicer.org/t/optimal-way-of-filling-vtkfloatarray/19262 "2021-08-21T14:01:52Z")

</div>

Hi, Ususally when we deal with containers it is recommended that we prepare size of the container before filling it. For example instead of std::vector::push\_back() it is recommended to preliminary resize it and setting…

---

## [Screenshotting a hidden external view widget](https://discourse.slicer.org/t/screenshotting-a-hidden-external-view-widget/19258)

<div class="topic-metadata">

**Author:** [@nathanbmnt](https://discourse.slicer.org/u/nathanbmnt)\
**Replies:** 2\
**Last updated:** [August 18, 2021, 7:03pm UTC](https://discourse.slicer.org/t/screenshotting-a-hidden-external-view-widget/19258 "2021-08-18T19:03:01Z")

</div>

Hello, I have an external view widget I created with the code here but I never call viewWidget.show() because I want it hidden from the user. If I try to get a screenshot of the external slice view widget with vtkWindo…

---

## [Play a sound in script](https://discourse.slicer.org/t/play-a-sound-in-script/19171)

<div class="topic-metadata">

**Author:** [@atracsys-sbt](https://discourse.slicer.org/u/atracsys-sbt)\
**Replies:** 14\
**Last updated:** [August 18, 2021, 4:29pm UTC](https://discourse.slicer.org/t/play-a-sound-in-script/19171 "2021-08-18T16:29:45Z")

</div>

Hi, From this discussion, I’ve gathered that it is possible to play a sound in Slicer, based on QSound. As I’m writing a scripted module, I would like to be able to play a beep in certain circumstances. However, I could…

---

## [Programatically install extensions](https://discourse.slicer.org/t/programatically-install-extensions/19241)

<div class="topic-metadata">

**Author:** [@Srijeet\_Chatterjee](https://discourse.slicer.org/u/Srijeet_Chatterjee)\
**Replies:** 1\
**Last updated:** [August 18, 2021, 2:40am UTC](https://discourse.slicer.org/t/programatically-install-extensions/19241 "2021-08-18T02:40:49Z")

</div>

Hello everyone, I am really new to slicer (just a couple of weeks) and a novice programmer. My difficulty is to understand whether it is possible to load the slicer extensions without setting the additional module path …

---

## [Below/aboverange color show for model scalars](https://discourse.slicer.org/t/below-aboverange-color-show-for-model-scalars/19205)

<div class="topic-metadata">

**Author:** [@wabwan25](https://discourse.slicer.org/u/wabwan25)\
**Replies:** 3\
**Last updated:** [August 17, 2021, 3:11am UTC](https://discourse.slicer.org/t/below-aboverange-color-show-for-model-scalars/19205 "2021-08-17T03:11:26Z")

</div>

Using python code, I copied a colornode and set below/above-range-colors as I need specific colors for scalar values out of the range. The below/above-range-color show correctly on scalar volume node. However, when appli…

---

## [Change memory layout of images](https://discourse.slicer.org/t/change-memory-layout-of-images/19217)

<div class="topic-metadata">

**Author:** [@keri](https://discourse.slicer.org/u/keri)\
**Replies:** 1\
**Last updated:** [August 16, 2021, 10:40pm UTC](https://discourse.slicer.org/t/change-memory-layout-of-images/19217 "2021-08-16T22:40:08Z")

</div>

I’m working now with 3D vtkImageData with scalar set. I fill vtkFloatArray from pointer of Eigen::Matrix: vtkNew\<vtkFloatArray\> array; array-\>SetArray(TRACE-\>data(), TRACE-\>size(), 1); The problem is that vtkIm…

---

## [Adding volume in C++](https://discourse.slicer.org/t/adding-volume-in-c/19174)

<div class="topic-metadata">

**Author:** [@keri](https://discourse.slicer.org/u/keri)\
**Replies:** 6\
**Last updated:** [August 13, 2021, 4:42pm UTC](https://discourse.slicer.org/t/adding-volume-in-c/19174 "2021-08-13T16:42:25Z")

</div>

I’m working on custom slicer app and now I need to understand how to add volume in C++. For example I have Eigen::MatrixXf that can be represented as vtkImageData. To display my data I guess I need to call GetScene() (…

---

## [How to initialize module widget at application startup](https://discourse.slicer.org/t/how-to-initialize-module-widget-at-application-startup/19211)

<div class="topic-metadata">

**Author:** [@keri](https://discourse.slicer.org/u/keri)\
**Replies:** 1\
**Last updated:** [August 16, 2021, 2:28pm UTC](https://discourse.slicer.org/t/how-to-initialize-module-widget-at-application-startup/19211 "2021-08-16T14:28:30Z")

</div>

Thank you, good to know. What is a best way to initialize a module’s widget when Slicer CAT is started? For example I have a qSlicerStackLoadModule and qSlicerStackLoadModuleWidget classes. I can see that qSlicerStackL…

---

## [Loadable module questions: \`setBuiltIn()\` and set module active](https://discourse.slicer.org/t/loadable-module-questions-setbuiltin-and-set-module-active/19203)

<div class="topic-metadata">

**Author:** [@keri](https://discourse.slicer.org/u/keri)\
**Replies:** 1\
**Last updated:** [August 16, 2021, 5:34am UTC](https://discourse.slicer.org/t/loadable-module-questions-setbuiltin-and-set-module-active/19203 "2021-08-16T05:34:32Z")

</div>

Hi, I’m becoming familiar with creating loadable modules. I write some module and I think it should be built in. I can see that there is a method setBuiltIn() that is provided by qSlicerLoadableModule. I tried to: qSl…

---

## [Can I import slicer by python?](https://discourse.slicer.org/t/can-i-import-slicer-by-python/19189)

<div class="topic-metadata">

**Author:** [@zhang-qiang-github](https://discourse.slicer.org/u/zhang-qiang-github)\
**Replies:** 1\
**Last updated:** [August 14, 2021, 1:46pm UTC](https://discourse.slicer.org/t/can-i-import-slicer-by-python/19189 "2021-08-14T13:46:15Z")

</div>

Can I install slicer in python by pip install slicer or pip install pyslicer I can’t find such a way. I know that I can firstly compile 3D slicer in c++, and then wrap it with python. But, I have compiled 3D slicer se…

---

## [Changing cursor during long running script](https://discourse.slicer.org/t/changing-cursor-during-long-running-script/19190)

<div class="topic-metadata">

**Author:** [@ezgimercan](https://discourse.slicer.org/u/ezgimercan)\
**Replies:** 1\
**Last updated:** [August 14, 2021, 9:15am UTC](https://discourse.slicer.org/t/changing-cursor-during-long-running-script/19190 "2021-08-14T09:15:37Z")

</div>

Is there a way to change the cursor to spinning pinwheel when a long running function is called after a button is pressed in a scripted module? Right now the UI freezes until the function returns but no visual feedback t…

---

## [Unable to install extension - "Incompatible with Slicer r30110"](https://discourse.slicer.org/t/unable-to-install-extension-incompatible-with-slicer-r30110/19158)

<div class="topic-metadata">

**Author:** [@fedorov](https://discourse.slicer.org/u/fedorov)\
**Replies:** 2\
**Last updated:** [August 13, 2021, 8:03am UTC](https://discourse.slicer.org/t/unable-to-install-extension-incompatible-with-slicer-r30110/19158 "2021-08-13T08:03:56Z")

</div>

I tried and failed to install SlicerRadiomics extension with the current Slicer preview. Is it expected? Sorry if I missed announcements and migration guidelines. I searched, but not sure where I should search - the erro…

---

## [Function slicer.util.loadVolume does not accept periods in the filename](https://discourse.slicer.org/t/function-slicer-util-loadvolume-does-not-accept-periods-in-the-filename/19177)

<div class="topic-metadata">

**Author:** [@giovform](https://discourse.slicer.org/u/giovform)\
**Replies:** 1\
**Last updated:** [August 13, 2021, 4:33am UTC](https://discourse.slicer.org/t/function-slicer-util-loadvolume-does-not-accept-periods-in-the-filename/19177 "2021-08-13T04:33:03Z")

</div>

If the file has a period in its name, e.g. word1.word2.tif, then the loaded volume using slicer.util.loadVolume function will have its name as just word1. Is this intended? Tested on 4.11.20210226 r29738.

---

## [Error when installing SlicerDebuggingTools on SlicerCAT](https://discourse.slicer.org/t/error-when-installing-slicerdebuggingtools-on-slicercat/19007)

<div class="topic-metadata">

**Author:** [@keri](https://discourse.slicer.org/u/keri)\
**Replies:** 2\
**Last updated:** [August 12, 2021, 5:45pm UTC](https://discourse.slicer.org/t/error-when-installing-slicerdebuggingtools-on-slicercat/19007 "2021-08-12T17:45:36Z")

</div>

Hi, I’m trying to install SlicerDebuggingTools on SlicerCAT via Extension manager. Here are my steps: clone zipped SlicerDebuggingTools to C:\\C\\Extensions in Extension Manager I click on Install from file and choose …

---

## [BoneReconstructionPlanner main transform](https://discourse.slicer.org/t/bonereconstructionplanner-main-transform/19140)

<div class="topic-metadata">

**Author:** [@mau\_igna\_06](https://discourse.slicer.org/u/mau_igna_06)\
**Replies:** 0\
**Last updated:** [August 10, 2021, 1:32pm UTC](https://discourse.slicer.org/t/bonereconstructionplanner-main-transform/19140 "2021-08-10T13:32:14Z")

</div>

This post is to explain the BoneReconstructionPlanner main transform, that is the mandibleToFibula transform. The mandibleToFibula transform is used to create the fibulaPlanes from the mandiblePlanes like this: fibulaP…

---

## [RGY views from numpy array](https://discourse.slicer.org/t/rgy-views-from-numpy-array/19141)

<div class="topic-metadata">

**Author:** [@shatz](https://discourse.slicer.org/u/shatz)\
**Replies:** 1\
**Last updated:** [August 10, 2021, 2:04pm UTC](https://discourse.slicer.org/t/rgy-views-from-numpy-array/19141 "2021-08-10T14:04:17Z")

</div>

When I first import my imaging file, it looks like this: If I then get it as a numpy array through arr = array("imaging") and write it as a new volume by doing addVolumeFromArray(arr, name="newarray"), it looks like …

---

## [Import DICOM files from python interactor add extra volumes and nodes](https://discourse.slicer.org/t/import-dicom-files-from-python-interactor-add-extra-volumes-and-nodes/19087)

<div class="topic-metadata">

**Author:** [@hotsen](https://discourse.slicer.org/u/hotsen)\
**Replies:** 3\
**Last updated:** [August 9, 2021, 7:52pm UTC](https://discourse.slicer.org/t/import-dicom-files-from-python-interactor-add-extra-volumes-and-nodes/19087 "2021-08-09T19:52:22Z")

</div>

Operating system: win10 Slicer version: stable version 4.11.20210226 Expected behavior: Manually loading works fine Actual behavior: python interactor add extra volumes and nodes Hi all, I am new to Slicer. I got 5 …

---

## [Is there a way to get the volume of just one segment within a segmentation?](https://discourse.slicer.org/t/is-there-a-way-to-get-the-volume-of-just-one-segment-within-a-segmentation/19093)

<div class="topic-metadata">

**Author:** [@J1234](https://discourse.slicer.org/u/J1234)\
**Replies:** 1\
**Last updated:** [August 7, 2021, 1:59am UTC](https://discourse.slicer.org/t/is-there-a-way-to-get-the-volume-of-just-one-segment-within-a-segmentation/19093 "2021-08-07T01:59:12Z")

</div>

Apologies if this is fairly obvious, learning python has been a steep learning curve. I have a segmentation that includes two segments: blood and bone. Using the docs, I’ve been able to find code that automatically print…

---

## ['NoneType' Object has no attribute 'GetParentTransformNode'?](https://discourse.slicer.org/t/nonetype-object-has-no-attribute-getparenttransformnode/19089)

<div class="topic-metadata">

**Author:** [@J1234](https://discourse.slicer.org/u/J1234)\
**Replies:** 2\
**Last updated:** [August 6, 2021, 4:05am UTC](https://discourse.slicer.org/t/nonetype-object-has-no-attribute-getparenttransformnode/19089 "2021-08-06T04:05:10Z")

</div>

I’m not really sure what happened… my code was working well yesterday and this morning I can’t figure out what changed. My goal is to iterate through all the segmentation files in a directory and use the Segment Statist…

[Previous page](https://discourse.slicer.org/c/dev/5.md?no_subcategories=false&page=69)

[Next page](https://discourse.slicer.org/c/dev/5.md?no_subcategories=false&page=71)
