I am wondering, if it’s possible to load nodes (volume, fiducial) into a Slicer scene without having them displayed immediately within the slice views.
I am asking this, because I want to load a bunch of data programmatically but I don’t want the slice views to flicker for each loaded volume.
There’s a flag on the SliceCompositeNode to turn this off on a per-slice view basis. It could be good to have some slicer.util or other place to turn them all on or off, but I don’t think that exists yet.
Background volume and FOV reset on volume loading has bothered me a couple of times, too. I’ve now added a new ‘show’ option (enabled by default) to the Add data dialog for volumes that can be unchecked if the user does not want the volume to be propagated to slice views. See pull request here: https://github.com/Slicer/Slicer/pull/800
Thank you, that’s a great feature. I had asked something very similar to this post a couple of months ago. If I load a volume with ‘show’ set to False, how would I then display it in one (and only one) of the slice views?
Hi Andras,
I am loading the model node and want it to be displayed automatically using scripting. I am loading it using python scripting. but I need to actually go to models and then click on it to display it but I need an automatic way.= thorugh scripting. how to? please suggest.
This means you don’t need to specify returnNode=True anymore. If you don’t specify it then only one value, the volume node is returned. This is just a small change in the API to make the syntax simpler.
You can change it in the display node of the segmentation node.
By default outline is displayed, so if you don’t see it then it may be because it is occluded by some other content (for example, after you imported the segmentation from labelmap node, you did not hide or delete the labelmap node).
On the left side in the REpresentation I am selecting surface with edges. I need to do it through scripting on the model surface. Any suggestions?
nn = n.GetModelDisplayNode()
nn.EdgeVisibilityOn()
I used the above it displays the edges. Is this true for every model either surface or volumetric mesh model.
is there any page online of scripting available for help?
You can hide the segmentation immediately after loading. If it still shows up for a moment then you can pause rendering before you start loading and resume rendering after you completed loading and made the segmentation hidden.
Alternatively, you can save the segmentation and its display node into a scene (.mrml or .mrb file) and load that. Display properties that are specified in the display node are applied immediately. If the visibility is turned off in the display node then the segmentation will not be displayed upon loading the scene.