zehret
(Zach)
July 2, 2024, 3:04pm
1
Hi,
I am trying to use a python script to run the Slicer RT Segment Comparison module. I am able to load the module and create buttons to compute the Hausdorff Distance and DICE metrics. I am struggling to set the structure set and segment for the reference and compare inputs. What is the general form of using python to select these inputs?
Thanks!
cpinter
(Csaba Pinter)
July 3, 2024, 11:53am
2
The recommended way is via MRML. The module has a parameter node that you can set up in Python
/*==============================================================================
Copyright (c) Laboratory for Percutaneous Surgery (PerkLab)
Queen's University, Kingston, ON, Canada. All Rights Reserved.
See COPYRIGHT.txt
or http://www.slicer.org/copyright/copyright.txt for details.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
This file was originally developed by Csaba Pinter, PerkLab, Queen's University
and was supported through the Applied Cancer Research Unit program of Cancer Care
Ontario with funds provided by the Ontario Ministry of Health and Long-Term Care
==============================================================================*/
This file has been truncated. show original
It defines all the selections and options. Then you can use this parameter node with the logic functions to do the computation.