Skip to content

Commit

Permalink
Merge pull request #52 from Leengit/octseg
Browse files Browse the repository at this point in the history
Implement VPAWModelOCT
  • Loading branch information
Leengit committed Apr 16, 2024
2 parents 846ca05 + 0b28d11 commit 63a597e
Show file tree
Hide file tree
Showing 20 changed files with 2,442 additions and 59 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,10 @@ set(Slicer_EXTENSION_SOURCE_DIRS
#${vpaw_SOURCE_DIR}/Modules/CLI/MyCLIModule
#${vpaw_SOURCE_DIR}/Modules/Loadable/MyLoadableModule
${vpaw_SOURCE_DIR}/Modules/Scripted/Home
${vpaw_SOURCE_DIR}/Modules/Scripted/VPAWVisualize
${vpaw_SOURCE_DIR}/Modules/Scripted/VPAWModel
${vpaw_SOURCE_DIR}/Modules/Scripted/VPAWVisualize
${vpaw_SOURCE_DIR}/Modules/Scripted/VPAWModelOCT
${vpaw_SOURCE_DIR}/Modules/Scripted/VPAWVisualizeOCT
)

# Add remote extension source directories
Expand Down
25 changes: 21 additions & 4 deletions Modules/Scripted/Home/Home.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import logging

import qt
import slicer
import slicer.ScriptedLoadableModule
Expand Down Expand Up @@ -67,8 +68,12 @@ def setup(self):
self.applyApplicationStyle()

# Buttons
self.ui.VPAWVisualizeButton.connect("clicked(bool)", self.onVPAWVisualizeButton)
self.ui.VPAWModelButton.connect("clicked(bool)", self.onVPAWModelButton)
self.ui.VPAWVisualizeButton.connect("clicked(bool)", self.onVPAWVisualizeButton)
self.ui.VPAWModelOCTButton.connect("clicked(bool)", self.onVPAWModelOCTButton)
self.ui.VPAWVisualizeOCTButton.connect(
"clicked(bool)", self.onVPAWVisualizeOCTButton,
)

def setupNodes(self):
# Set up the layout / 3D View
Expand Down Expand Up @@ -156,17 +161,29 @@ def applyStyle(self, widgets, styleSheetName):
for widget in widgets:
widget.styleSheet = style

def onVPAWModelButton(self):
"""
Switch to the "VPAW Model" module when the user clicks the button.
"""
slicer.util.selectModule("VPAWModel")

def onVPAWVisualizeButton(self):
"""
Switch to the "VPAW Visualize" module when the user clicks the button.
"""
slicer.util.selectModule("VPAWVisualize")

def onVPAWModelButton(self):
def onVPAWModelOCTButton(self):
"""
Switch to the "VPAW Model" module when the user clicks the button.
Switch to the "VPAW Model OCT" module when the user clicks the button.
"""
slicer.util.selectModule("VPAWModel")
slicer.util.selectModule("VPAWModelOCT")

def onVPAWVisualizeOCTButton(self):
"""
Switch to the "VPAW Visualize OCT" module when the user clicks the button.
"""
slicer.util.selectModule("VPAWVisualizeOCT")


class HomeLogic(slicer.ScriptedLoadableModule.ScriptedLoadableModuleLogic):
Expand Down
26 changes: 26 additions & 0 deletions Modules/Scripted/Home/Resources/UI/Home.ui
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,32 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="VPAWModelOCTButton">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip">
<string>Go to VPAW Model OCT module</string>
</property>
<property name="text">
<string>Go to VPAW Model OCT module</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="VPAWVisualizeOCTButton">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip">
<string>Go to VPAW Visualize OCT module</string>
</property>
<property name="text">
<string>Go to VPAW Visualize OCT module</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
Expand Down
30 changes: 28 additions & 2 deletions Modules/Scripted/VPAWModel/Resources/UI/VPAWModel.ui
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,32 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="VPAWModelOCTButton">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip">
<string>Go to VPAW Model OCT module</string>
</property>
<property name="text">
<string>Go to VPAW Model OCT module</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="VPAWVisualizeOCTButton">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip">
<string>Go to VPAW Visualize OCT module</string>
</property>
<property name="text">
<string>Go to VPAW Visualize OCT module</string>
</property>
</widget>
</item>
<item>
<widget class="ctkCollapsibleButton" name="linkPediatricAirwayAtlasCollapsibleButton" native="true">
<property name="text" stdset="0">
Expand Down Expand Up @@ -97,14 +123,14 @@
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="VPAWModelsDirectoryLabel">
<widget class="QLabel" name="VPAWModelDirectoryLabel">
<property name="text">
<string>Models Directory</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="ctkPathLineEdit" name="VPAWModelsDirectory">
<widget class="ctkPathLineEdit" name="VPAWModelDirectory">
<property name="filters">
<set>ctkPathLineEdit::Dirs</set>
</property>
Expand Down
Loading

0 comments on commit 63a597e

Please sign in to comment.