12 #ifndef MITKTOTALSEGMENTATORTOOL_H
13 #define MITKTOTALSEGMENTATORTOOL_H
40 itkFactorylessNewMacro(
Self);
43 const char *GetName()
const override;
44 const char **GetXPM()
const override;
46 void Activated()
override;
48 itkSetMacro(MitkTempDir, std::string);
49 itkGetConstMacro(MitkTempDir, std::string);
51 itkSetMacro(SubTask, std::string);
52 itkGetConstMacro(SubTask, std::string);
54 itkSetMacro(PythonPath, std::string);
55 itkGetConstMacro(PythonPath, std::string);
57 itkSetMacro(GpuId,
unsigned int);
58 itkGetConstMacro(GpuId,
unsigned int);
60 itkSetMacro(Fast,
bool);
61 itkGetConstMacro(Fast,
bool);
62 itkBooleanMacro(Fast);
69 static void onPythonProcessEvent(itk::Object *,
const itk::EventObject &e,
void *);
90 void UpdatePrepare()
override;
98 void run_totalsegmentator(
ProcessExecutor*,
const std::string&,
const std::string&,
bool,
bool,
unsigned int,
const std::string&);
111 void ParseLabelMapTotalDefault();
118 std::string GetLabelMapPath();
131 std::string m_MitkTempDir;
132 std::string m_PythonPath;
133 std::string m_SubTask =
"total";
134 unsigned int m_GpuId = 0;
135 std::map<mitk::Label::PixelType, std::string> m_LabelMapTotal;
137 const std::string TEMPLATE_FILENAME =
"XXXXXX_000_0000.nii.gz";
138 const std::string DEFAULT_TOTAL_TASK =
"total";
139 const std::unordered_map<std::string, std::vector<std::string>> SUBTASKS_MAP =
141 {
"body", {
"body.nii.gz",
"body_trunc.nii.gz",
"body_extremities.nii.gz",
"skin.nii.gz"}},
142 {
"hip_implant", {
"hip_implant.nii.gz"}},
143 {
"cerebral_bleed", {
"intracerebral_hemorrhage.nii.gz"}},
144 {
"coronary_arteries", {
"coronary_arteries.nii.gz"}},
145 {
"lung_vessels", {
"lung_vessels.nii.gz",
"lung_trachea_bronchia.nii.gz"}},
146 {
"pleural_pericard_effusion", {
"pleural_effusion.nii.gz",
"pericardial_effusion.nii.gz"}}