Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0.7] polygonroi shift-click + remove contour #872

Merged
merged 2 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ endif()
cmake_policy(SET CMP0074 NEW)

if(NOT DEFINED ${MEDINRIA_SUPERBUILD_VERSION})
set(MEDINRIA_SUPERBUILD_VERSION 4.0.6)
set(MEDINRIA_SUPERBUILD_VERSION 4.0.7)
endif()

SET(CMAKE_CXX_STANDARD 17)
Expand Down
7 changes: 7 additions & 0 deletions RELEASE_NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
MUSICardio 4.0.7:
- PolygonROI:
* fix drawing a contour with shift-click to be able to change zoom/contrast with click.
* fix removing a last contour/node which reset the label tool and allow to draw again.
- Registration step in pipelines allows to use Mouse Interaction Toolbox.
- VOICutterToolBox fix a crash with metadata in pipelines sometimes if a cut has been made.

MUSICardio 4.0.6:
- Debug import of Carto .zip archives and .mesh files.
- PolygonROI: remove shift-click to draw, fix contrast after deactivation of repulsor and hide deactivated widgets.
Expand Down
2 changes: 1 addition & 1 deletion packaging/apple/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"window": { "position": { "x": 100, "y": 100 },
"size": { "width": 640, "height": 300 } },
"contents": [
{ "x": 140, "y": 165, "type": "file", "path": "/Volumes/MUSICardio 4.0.6/MUSICardio.app" },
{ "x": 140, "y": 165, "type": "file", "path": "/Volumes/MUSICardio 4.0.7/MUSICardio.app" },
{ "x": 480, "y": 165, "type": "link", "path": "/Applications" }
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ void polygonRoiToolBox::showHelp() const

QString main = QString("<h3>Main features</h3>")
+ QString("<ul>")
+ QString("<li><b>Draw a contour</b>: click on the data to create a contour</li>")
+ QString("<li><b>Draw a contour</b>: shift+click on the data to create a contour</li>")
+ QString("<li><b>Add a new label</b>: click on '+' button in the label list</li>")
+ QString("<li><b>Remove a label</b>: click on '-' button in the label list</li>")
+ QString("<li><b>Use a new label</b>: select a label in the list, then click on the data</li>")
Expand Down
16 changes: 15 additions & 1 deletion src/plugins/legacy/polygonRoi/viewevent/baseViewEvent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ bool baseViewEvent::mousePressEvent(medAbstractView * view, QMouseEvent *mouseEv
globalVtkLeftButtonBehaviour = view2d->GetLeftButtonInteractionStyle();
view2d->SetLeftButtonInteractionStyle(vtkInteractorStyleImageView2D::InteractionTypeNull);
}
else if (mouseEvent->modifiers() == Qt::NoModifier)
else if (mouseEvent->modifiers() == Qt::ShiftModifier)
{
for (polygonLabel *label : labelList)
{
Expand All @@ -237,6 +237,20 @@ bool baseViewEvent::mousePressEvent(medAbstractView * view, QMouseEvent *mouseEv
}
leftButtonBehaviour(view);
}
else if (mouseEvent->modifiers()==Qt::NoModifier)
{
if (!isRepulsorActivated )
{
vtkImageView2D *view2d = static_cast<medVtkViewBackend*>(currentView->backend())->view2D;
int currentLeftButtonBehaviour = view2d->GetLeftButtonInteractionStyle();
if (currentLeftButtonBehaviour != globalVtkLeftButtonBehaviour &&
currentLeftButtonBehaviour != vtkInteractorStyleImageView2D::InteractionTypeNull)
{
globalVtkLeftButtonBehaviour = currentLeftButtonBehaviour;
}
view2d->SetLeftButtonInteractionStyle(globalVtkLeftButtonBehaviour);
}
}
}
else if (mouseEvent->button()==Qt::RightButton)
{
Expand Down
4 changes: 3 additions & 1 deletion src/plugins/legacy/polygonRoi/viewevent/defaultViewEvent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ void defaultViewEvent::deleteLabel(polygonLabel *manager)
int position = deleteLabelBase(manager);
if (position==-1)
{
dLabelToolBox->unselectAll();
// The last contour/node of the data has been removed, we need to reset
dLabelToolBox->selectRow(0);
dLabelToolBox->forceItemSelection();
}
else
{
Expand Down
1 change: 0 additions & 1 deletion src/plugins/legacy/voiCutter/voiCutterToolBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,6 @@ medAbstractData *voiCutterToolBox::processOutput()
{
if (d->resultData)
{
fillOutputMetaData();
return d->resultData;
}
else if (d->currentView)
Expand Down
Loading