Skip to content

Commit 6993145

Browse files
committed
common_septum_guide_points_start
1 parent 6304082 commit 6993145

4 files changed

Lines changed: 25 additions & 3 deletions

File tree

CemrgApp/Modules/CemrgAppModule/include/FourChamberCommon.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1124,7 +1124,7 @@ struct HeartLabels {
11241124
}
11251125
};
11261126

1127-
enum AtrialLandmarksType {NOT_SET = -1, LA_APEX=11, LA_SEPTUM=13, RA_APEX=15, RA_SEPTUM=17, RAA_APEX=19};
1127+
enum AtrialLandmarksType {NOT_SET = -1, LA_APEX=11, LA_SEPTUM=13, RA_APEX=15, RA_SEPTUM=17, RAA_APEX=19, ATRIAL_SEPTUM=21};
11281128
class PickedPointType {
11291129
public :
11301130
PickedPointType() {

CemrgApp/Modules/CemrgAppModule/src/CemrgMeshPointSelector.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,11 @@ std::string CemrgMeshPointSelector::PrintManyCoordTxt(QStringList names) {
313313
}
314314

315315
void CemrgMeshPointSelector::SaveToFile(QString path, QStringList names, QString type ) {
316+
// show error if type is not "vtx" or "coord"
317+
if (type != "vtx" && type != "coord") {
318+
MITK_WARN << "Type must be 'vtx' or 'coord'";
319+
return;
320+
}
316321
std::string toPrint;
317322
if (type == "vtx") {
318323
toPrint = PrintManyVtx(names);

CemrgApp/Plugins/kcl.cemrgapp.fourchamber/src/internal/FourChamberGuidePointsView.cpp

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ void FourChamberGuidePointsView::CreateQtPartControl(QWidget *parent) {
146146

147147
//Initialisation
148148
m_Controls.radio_load_la->setChecked(true);
149+
m_Selector.radioBtn_ATRIAL_SEPTUM->setEnabled(false); // Not yet implemented
149150
iniPreSurf();
150151
if (surface.IsNotNull()) {
151152
InitialisePickerObjects();
@@ -388,6 +389,8 @@ void FourChamberGuidePointsView::KeyCallBackFunc(vtkObject*, long unsigned int,
388389
self->m_Selector.radioBtn_RA_SEPTUM->setEnabled(true);
389390
else if (lastLabel == AtrialLandmarksType::RAA_APEX)
390391
self->m_Selector.radioBtn_RAA_APEX->setEnabled(true);
392+
else if (lastLabel == AtrialLandmarksType::ATRIAL_SEPTUM)
393+
self->m_Selector.radioBtn_ATRIAL_SEPTUM->setEnabled(true);
391394

392395
}//_if
393396

@@ -468,8 +471,12 @@ void FourChamberGuidePointsView::Save() {
468471

469472
// Save points
470473
for (auto& point : points) {
471-
QString savetype = pickedPointsHandler->GetPointData(point).pointName.contains("vtx") ? "vtx" : "coord";
474+
bool isVtxType = pickedPointsHandler->GetPointData(point).pointName.contains("vtx");
475+
QString savetype = isVtxType ? "vtx" : "coord";
472476
pickedPointsHandler->SaveToFile(APEX_SEPTUM(point), (QStringList(point)), savetype);
477+
if (isVtxType) {
478+
pickedPointsHandler->SaveToFile(APEX_SEPTUM(point), (QStringList(point.replace(".vtx", "_coord.txt"))), "coord");
479+
}
473480
}
474481

475482
QMessageBox::information(NULL, "Info", "Points saved, please close this window.");
@@ -501,7 +508,10 @@ void FourChamberGuidePointsView::UserSelectPvLabel(){
501508
} else if (m_Selector.radioBtn_RAA_APEX->isChecked()) {
502509
pushedLabel = AtrialLandmarksType::RAA_APEX; // RAA_APEX
503510
m_Selector.radioBtn_RAA_APEX->setEnabled(false);
504-
}
511+
} else if (m_Selector.radioBtn_ATRIAL_SEPTUM->isChecked()) {
512+
pushedLabel = AtrialLandmarksType::ATRIAL_SEPTUM; // ATRIAL_SEPTUM
513+
m_Selector.radioBtn_ATRIAL_SEPTUM->setEnabled(false);
514+
}
505515
MITK_INFO << "Label selected: " << pushedLabel;
506516

507517
} else if (dialogCode == QDialog::Rejected) {

CemrgApp/Plugins/kcl.cemrgapp.fourchamber/src/internal/FourChamberGuidePointsViewSelector.ui

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,13 @@
118118
</property>
119119
</widget>
120120
</item>
121+
<item row="4" column="0">
122+
<widget class="QRadioButton" name="radioBtn_ATRIAL_SEPTUM">
123+
<property name="text">
124+
<string>Guide Septum</string>
125+
</property>
126+
</widget>
127+
</item>
121128
</layout>
122129
</item>
123130
<item>

0 commit comments

Comments
 (0)