Skip to content

Commit

Permalink
Added support for using previous ultrasound frames as model input in …
Browse files Browse the repository at this point in the history
…TorchSequenceSegmentation
  • Loading branch information
chriscyyeung committed Jul 30, 2024
1 parent 231a7a4 commit ce13a7f
Show file tree
Hide file tree
Showing 2 changed files with 217 additions and 124 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>395</width>
<height>775</height>
<height>988</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
Expand Down Expand Up @@ -269,49 +269,43 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QCheckBox" name="reconstructCheckBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Reconstruct the segmentation and render in 3D.</string>
</property>
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string>Reconstruct 3D volume:</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="startButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Start segmentation and/or reconstruction of the ultrasound sequence.</string>
</property>
<property name="text">
<string>Start</string>
</property>
</widget>
</item>
</layout>
<widget class="QPushButton" name="recordAsSegmentationButton">
<property name="text">
<string>Record prediction as segmentation</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="reconstructButton">
<property name="text">
<string>Reconstruct 3D volume</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="startButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Start segmentation and/or reconstruction of the ultrasound sequence.</string>
</property>
<property name="text">
<string>Start</string>
</property>
</widget>
</item>
</layout>
</widget>
Expand Down Expand Up @@ -542,14 +536,14 @@
</property>
</widget>
</item>
<item row="4" column="0">
<item row="7" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Model input size:</string>
</property>
</widget>
</item>
<item row="4" column="1">
<item row="7" column="1">
<widget class="QSpinBox" name="modelInputSizeSpinbox">
<property name="toolTip">
<string>Size of the input image of the loaded model. Assumes a square image. Only modify if shape metadata is not included in the TorchScript model.</string>
Expand All @@ -559,14 +553,14 @@
</property>
</widget>
</item>
<item row="5" column="0">
<item row="8" column="0">
<widget class="QLabel" name="label_11">
<property name="text">
<string>Output transform:</string>
</property>
</widget>
</item>
<item row="5" column="1">
<item row="8" column="1">
<widget class="qMRMLNodeComboBox" name="outputTransformSelector">
<property name="enabled">
<bool>true</bool>
Expand All @@ -593,14 +587,14 @@
</property>
</widget>
</item>
<item row="7" column="0">
<item row="10" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Scan conversion config:</string>
</property>
</widget>
</item>
<item row="7" column="1">
<item row="10" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="ctkPathLineEdit" name="scanConversionPathLineEdit">
Expand Down Expand Up @@ -635,14 +629,14 @@
</item>
</layout>
</item>
<item row="8" column="0">
<item row="11" column="0">
<widget class="QLabel" name="label_19">
<property name="text">
<string>Mask edge erosion x (%):</string>
</property>
</widget>
</item>
<item row="8" column="1">
<item row="11" column="1">
<widget class="QDoubleSpinBox" name="edgeErosionXSpinBox">
<property name="decimals">
<number>2</number>
Expand All @@ -655,14 +649,14 @@
</property>
</widget>
</item>
<item row="9" column="0">
<item row="12" column="0">
<widget class="QLabel" name="label_20">
<property name="text">
<string>Mask edge erosion y (%):</string>
</property>
</widget>
</item>
<item row="9" column="1">
<item row="12" column="1">
<widget class="QDoubleSpinBox" name="edgeErosionYSpinBox">
<property name="maximum">
<double>1.000000000000000</double>
Expand All @@ -672,6 +666,43 @@
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_21">
<property name="text">
<string>Segmentation threshold:</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QSpinBox" name="thresholdSpinBox">
<property name="maximum">
<number>255</number>
</property>
<property name="value">
<number>127</number>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_22">
<property name="text">
<string>Segment name:</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLineEdit" name="segmentNameLineEdit"/>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_23">
<property name="text">
<string>Number of previous frames:</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QSpinBox" name="previousFramesSpinBox"/>
</item>
</layout>
</widget>
</item>
Expand Down
Loading

0 comments on commit ce13a7f

Please sign in to comment.