Skip to content

Commit

Permalink
ENH: Load Models(stl) from file and interate
Browse files Browse the repository at this point in the history
Loads Models form folder and iteratively generates each roi
  • Loading branch information
amymmorton committed Dec 12, 2024
1 parent 038abca commit c1ae7bd
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 151 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<item>
<widget class="ctkCollapsibleButton" name="inputsCollapsibleButton">
<property name="text">
<string>Inputs</string>
<string>ROI From Model</string>
</property>
<layout class="QFormLayout" name="formLayout_2">
<item row="0" column="0">
Expand All @@ -25,77 +25,43 @@
</widget>
</item>
<item row="0" column="1">
<widget class="qMRMLNodeComboBox" name="inputSelector">
<property name="toolTip">
<string>Pick the input to the algorithm.</string>
</property>
<property name="nodeTypes">
<stringlist notr="true">
<string>vtkMRMLModelNode</string>
</stringlist>
</property>
<property name="showChildNodeTypes">
<bool>false</bool>
</property>
<property name="addEnabled">
<bool>false</bool>
</property>
<property name="removeEnabled">
<bool>false</bool>
<widget class="ctkPathLineEdit" name="modelPath_lineEdit">
<property name="filters">
<set>ctkPathLineEdit::Dirs|ctkPathLineEdit::Drives|ctkPathLineEdit::Executable|ctkPathLineEdit::NoDot|ctkPathLineEdit::NoDotDot|ctkPathLineEdit::Readable</set>
</property>
<property name="SlicerParameterName" stdset="0">
<string>inputModel</string>
<string>modelFile_path</string>
</property>
</widget>
</item>
<item row="1" column="0">
<item row="1" column="0" colspan="2">
<widget class="QPushButton" name="showBounds_pb">
<property name="text">
<string>Show Model Bounds</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="inputVol_label">
<property name="text">
<string>Input Volume</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="qMRMLNodeComboBox" name="inputVolumeSelector">
<property name="nodeTypes">
<stringlist notr="true"/>
</property>
<property name="hideChildNodeTypes">
<stringlist notr="true"/>
</property>
<property name="interactionNodeSingletonTag">
<string notr="true"/>
</property>
<property name="SlicerParameterName" stdset="0">
<string>inputVolume</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="ctkCollapsibleButton" name="outputsCollapsibleButton">
<property name="text">
<string>Outputs</string>
<string>SubVol From ROI</string>
</property>
<layout class="QFormLayout" name="formLayout_4">
<item row="0" column="0">
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Model ROI</string>
</property>
</widget>
</item>
<item row="0" column="1">
<item row="1" column="1">
<widget class="qMRMLNodeComboBox" name="modelROISelector">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Pick the output to the algorithm.</string>
</property>
Expand All @@ -121,17 +87,20 @@
</property>
</widget>
</item>
<item row="1" column="0">
<item row="2" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Cropped volume:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<item row="2" column="1">
<widget class="qMRMLNodeComboBox" name="cropVolSelector">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Result with inverted threshold will be written into this volume</string>
<string>Crop ROI bounds of InputVolume will be written into this volume</string>
</property>
<property name="nodeTypes">
<stringlist notr="true">
Expand All @@ -155,22 +124,43 @@
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="qMRMLNodeComboBox" name="inputVolSelector">
<property name="enabled">
<bool>true</bool>
</property>
<property name="nodeTypes">
<stringlist notr="true">
<string>vtkMRMLScalarVolumeNode</string>
</stringlist>
</property>
<property name="showChildNodeTypes">
<bool>false</bool>
</property>
<property name="hideChildNodeTypes">
<stringlist/>
</property>
<property name="noneEnabled">
<bool>true</bool>
</property>
<property name="interactionNodeSingletonTag">
<string>Singleton</string>
</property>
<property name="SlicerParamterName" stdset="0">
<string>inputVolume</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="inputVol_label">
<property name="text">
<string>Input Volume</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QPushButton" name="applyButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Run the algorithm.</string>
</property>
<property name="text">
<string>Apply</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
Expand All @@ -193,6 +183,11 @@
<header>ctkCollapsibleButton.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>ctkPathLineEdit</class>
<extends>QWidget</extends>
<header>ctkPathLineEdit.h</header>
</customwidget>
<customwidget>
<class>qMRMLNodeComboBox</class>
<extends>QWidget</extends>
Expand All @@ -207,22 +202,6 @@
</customwidgets>
<resources/>
<connections>
<connection>
<sender>roiFromModelBounds</sender>
<signal>mrmlSceneChanged(vtkMRMLScene*)</signal>
<receiver>inputSelector</receiver>
<slot>setMRMLScene(vtkMRMLScene*)</slot>
<hints>
<hint type="sourcelabel">
<x>122</x>
<y>132</y>
</hint>
<hint type="destinationlabel">
<x>248</x>
<y>61</y>
</hint>
</hints>
</connection>
<connection>
<sender>roiFromModelBounds</sender>
<signal>mrmlSceneChanged(vtkMRMLScene*)</signal>
Expand Down
Loading

0 comments on commit c1ae7bd

Please sign in to comment.