View Issue Details

IDProjectCategoryView StatusLast Update
0001872Slicer4Core: Base Codepublic2014-05-13 11:05
ReporterjcfrAssigned Tofinetjul 
PrioritynormalSeverityfeatureReproducibilityN/A
Status acknowledgedResolutionopen 
Product VersionSlicer 4.1.0 RC 
Target VersionFixed in Version 
Summary0001872: Provide convenient function in C++ and/or python allowing to set current label/bg/fg
Description

Looking at code provided in EMSegment/Helper.py module, seems this could be useful for others. Especially considering the Helper file have copied all over.

@staticmethod
def SetLabelVolume(lb):
appLogic = slicer.app.applicationLogic()
selectionNode = appLogic.GetSelectionNode()
selectionNode.SetReferenceActiveLabelVolumeID(lb)
appLogic.PropagateVolumeSelection()

@staticmethod
def SetBgFgVolumes(bg, fg):
appLogic = slicer.app.applicationLogic()
selectionNode = appLogic.GetSelectionNode()
selectionNode.SetReferenceActiveVolumeID(bg)
selectionNode.SetReferenceSecondaryVolumeID(fg)
appLogic.PropagateVolumeSelection()

TagsNo tags attached.

Issue History

Date Modified Username Field Change
2012-04-08 07:33 jcfr New Issue
2012-04-08 07:33 jcfr Status new => assigned
2012-04-08 07:33 jcfr Assigned To => finetjul
2012-04-08 07:35 jcfr Summary Provide convenient function in C++ and/or python allowing to set current label => Provide convenient function in C++ and/or python allowing to set current label/bg/fg
2012-04-08 07:35 jcfr Description Updated
2012-04-09 06:41 finetjul Severity minor => feature
2012-04-09 06:41 finetjul Reproducibility have not tried => N/A
2012-04-09 06:41 finetjul Product Version => Slicer 4.1.0 RC*
2012-04-09 06:46 jcfr Note Added: 0003986
2012-04-09 06:50 jcfr Note Added: 0003987
2012-08-22 05:56 jcfr Target Version => Slicer 4.3.0
2013-08-09 04:37 finetjul Target Version Slicer 4.3.0 => Slicer 4.4.0
2014-05-13 11:05 jcfr Status assigned => acknowledged
2014-05-13 11:05 jcfr Target Version Slicer 4.4.0 =>