Skip to content

Commit

Permalink
ENH: support of n segmentation for n series types for each finding
Browse files Browse the repository at this point in the history
* list of findings is simple list
* upon finding selection a more detailed finding information widget
  is displayed and all available series types will be listed with an
  option to select one of three (segmentation, ruler, fiducial)
  annotation tools. For now we only support segmentations
* upon annotation tool selection display its annotation tool widget,
  which in the current situation will be a customized segment editor.
* added SeriesType class and subclasses where rules can be defined.
  Ideally this should also support the classification of DICOM files
  directly (issue SlicerProstate#1)
* added HangingProtocol class and three subclasses for PIRADS specific
  hanging.
* each finding can have n annotations of different annotation tools
  where n is the number of volumes used for PIRADS reading (issue SlicerProstate#3)
  • Loading branch information
che85 committed Mar 22, 2018
1 parent 6d8edcd commit 3b634bc
Show file tree
Hide file tree
Showing 15 changed files with 1,220 additions and 788 deletions.
195 changes: 110 additions & 85 deletions Documentation/Classes.puml
Original file line number Diff line number Diff line change
Expand Up @@ -8,130 +8,155 @@ package SlicerPIRADSWidget {
class MultiVolumeExplorerWidget {
}

class AssessmentDialog {
+ setAssessment(): Assessment
}

class PatientInfoWidget {
}

class FindingsWidget {
- __findingsTable
- __measurementToolWidget
}
package Finding {
class FindingsWidget {
- __findingList
- __findingsInformationWidget
- __AnnotationToolWidget
}

class FindingsList {
+ createFinding(): Finding
+ addAssessment()
}

class AnnotationToolSelectionWidget {
- __annotationTools: list
+ addAnnotationTool(AnnotationTool tool)
+ getAnnotationTools(): list
+ setActiveAnnotationTool(id): bool
}

class FindingInformationWidget {

}

class FindingsTable {
+ createFinding(): Finding
+ assessLesion():
class AnnotationToolWidget {
}
}

class MeasurementToolWidget {
- __measurementTools: list
+ addMeasurementTool(MeasurementTool tool)
+ getMeasurementTools(): list
+ setActiveMeasurementTool(id): bool
class DataSelectionDialog {
# _patientTable
# _studiesTable
}

' Connections

AssessmentDialog <|-- StudyAssessmentWidget
AssessmentDialog <|-- LesionAssessmentWidget
package Assessment {

FindingsWidget::__findingsTable ..> FindingsTable: has
FindingsWidget::__measurementToolWidget ..> MeasurementToolWidget: has
class AssessmentDialog {
+ setAssessment(): Assessment
}
AssessmentDialog <|-- StudyAssessmentWidget
AssessmentDialog <|-- FindingAssessmentWidget
}

}

class AssessmentHelp {

}
package SlicerPIRADSLogic {

interface Assessment {
- __schema: string
- __data=None
.. setter ..
+ loadSchema(fileName)
+ loadData(string): bool
.. getter ..
+ getSchema(): string
+ getData(): string
}
package AssessmentLogic {
interface Assessment {
- __schema: string
- __data=None
.. setter ..
+ loadSchema(fileName)
+ loadData(string): bool
.. getter ..
+ getSchema(): string
+ getData(): string
}

'interface DataHandler {
' + save()
' + load(fileName): bool
'}
'
'class ReportDataHandler {
'}
'DataHandler <|-- ReportDataHandler
'DataHandler <|-- StudyAssessmentHandler
'
'Assessment -> DataHandler: has_a

class LesionAssessment {
-lesion: Lesion
}
class FindingAssessment {
}

class StudyAssessment {
}
class StudyAssessment {
}
}

class Report {
- findings: Finding
- studyAssessment: StudyAssessment
__
+ startReport(): bool
+ closeReport(): bool
+ saveReport(): bool
+ loadReport(string jsonfilename): bool
}
'interface DataHandler {
' + save()
' + load(fileName): bool
'}
'
'class ReportDataHandler {
'}
'DataHandler <|-- ReportDataHandler
'DataHandler <|-- StudyAssessmentHandler
'
'Assessment -> DataHandler: has_a


class Finding {
+ createAnnotation(seriesType, mrmlNodeClass): Annotation
+ getAnnotation(seriesType, mrmlNodeClass): Annotation
}

interface Lesion {
- mrmlNode=None
- mrmlClass=None
__
+ setMRMLNode(mrmlNode)
}
class Report {
- findings: Finding
- studyAssessment: StudyAssessment
__
+ startReport(): bool
+ closeReport(): bool
+ saveReport(): bool
+ loadReport(string jsonfilename): bool
}

class Fiducial {
}
package AnnotationLogic {

class Segmentation {
}
interface Annotation {
- mrmlNode=None
- mrmlClass=None
__
+ setMRMLNode(mrmlNode)
}

class Ruler {
}
interface Annotation {
+id=None
}

class Fiducial {
}

class Segmentation {
}

interface MeasurementTool {
+id=None
class Ruler {
}
}
}


SlicerPIRADSWidget ..> Report: has_a

LesionAssessmentWidget ..> AssessmentHelp
'FindingAssessmentWidget ..> AssessmentHelp

LesionAssessmentWidget ..> LesionAssessment:generated_from
FindingAssessmentWidget ..> FindingAssessment:generated_from
StudyAssessmentWidget ..> StudyAssessment:generated_from

FindingsTable "1" ..> "0..*" Finding:has/creates

MeasurementToolWidget::__measurementTool "1" ..> "1" MeasurementTool: has
FindingsList "1" ..> "0..*" Finding:has/creates
FindingsWidget ..> FindingInformationWidget: has
FindingsWidget::_AnnotationToolWidget ..> AnnotationToolWidget: has
FindingsWidget::__FindingsList ..> FindingsList: has

MeasurementTool <|-- Fiducial
MeasurementTool <|-- Segmentation
MeasurementTool <|-- Ruler
Annotation <|-- Fiducial
Annotation <|-- Segmentation
Annotation <|-- Ruler

MeasurementTool ..> Lesion
FindingInformationWidget "1" .> "n" AnnotationToolSelectionWidget: has

Finding "1" *-- "1" LesionAssessment: has_a
Finding "1" *-- "1" Lesion: has_a
LesionAssessment::lesion "1" ..> "1" Lesion: has_a

Finding "1" *-- "1" FindingAssessment: has_a
Finding::_annotations "1" *-- "n" Annotation: has

Report::findings "1" ..> "n" Finding
Report::studyAssessment "1" ..> "1" StudyAssessment

Assessment <|-- LesionAssessment
Assessment <|-- FindingAssessment
Assessment <|-- StudyAssessment

@enduml
16 changes: 14 additions & 2 deletions SlicerPIRADS/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@ set(MODULE_PYTHON_SCRIPTS
${MODULE_NAME}.py
SlicerPIRADSLogic/__init__.py
SlicerPIRADSLogic/Configuration.py
SlicerPIRADSLogic/Annotation.py
SlicerPIRADSLogic/Finding.py
SlicerPIRADSLogic/HangingProtocol.py
SlicerPIRADSLogic/SeriesType.py
SlicerPIRADSWidgets/__init__.py
SlicerPIRADSWidgets/AssessmentDialog.py
SlicerPIRADSWidgets/AnnotationWidget.py
SlicerPIRADSWidgets/FindingsWidget.py
SlicerPIRADSWidgets/ProstateSectorMapDialog.py
SlicerPIRADSWidgets/DataSelectionDialog.py
)

Expand All @@ -15,11 +22,16 @@ set(MODULE_PYTHON_RESOURCES
Resources/Forms/Procedure_Information.json
Resources/UI/AssessmentDialog.ui
Resources/UI/DataSelectionDialog.ui
Resources/UI/FindingItemWidget.ui
Resources/UI/AnnotationItemWidget.ui
Resources/UI/FindingsWidget.ui
Resources/UI/MeasurementToolSelectionDialog.ui
Resources/UI/FindingInformationWidget.ui
Resources/UI/AnnotationItemWidget.ui
Resources/UI/ProstateSectorMapDialog.ui
Resources/UI/StudyLevelAssessmentWidget.ui
Resources/Icons/Fiducials.png
Resources/Icons/ProstateMap.png
Resources/Icons/Ruler.png
Resources/Icons/SegmentEditor.png
)

slicerMacroBuildScriptedModule(
Expand Down
Loading

0 comments on commit 3b634bc

Please sign in to comment.