|
|
|
|
@@ -7,30 +7,52 @@
|
|
|
|
|
#include <QButtonGroup>
|
|
|
|
|
#include <QActionGroup>
|
|
|
|
|
#include <QMessageBox>
|
|
|
|
|
|
|
|
|
|
#include "Rendering/Measure/Measure.h"
|
|
|
|
|
#include "UI/Widget/ImageView/DicomImageView.h"
|
|
|
|
|
#include "UI/Manager/ImageViewManager.h"
|
|
|
|
|
|
|
|
|
|
#include "Common/QGlobals.h"
|
|
|
|
|
#include "Rendering/Core/RenderingDefines.h"
|
|
|
|
|
|
|
|
|
|
#include "ExportToolButton.h"
|
|
|
|
|
|
|
|
|
|
typedef tuple< const char *, int> ActionProperty;
|
|
|
|
|
typedef tuple< const char *,const char *, int> ActionProperty;
|
|
|
|
|
namespace {
|
|
|
|
|
const char *SYNC_MANUAL_URL = ":/InfiniteViewer/Icon/sync/sync_manual.png";
|
|
|
|
|
const char *SYNC_AUTO_URL = ":/InfiniteViewer/Icon/sync/sync_auto.png";
|
|
|
|
|
const char *SYNC_AUTO_D_URL = ":/InfiniteViewer/Icon/sync/sync_autod.png";
|
|
|
|
|
const char *SYNC_DIS_URL = ":/InfiniteViewer/Icon/sync/sync_dis.png";
|
|
|
|
|
const int ACTION_COUNT = 9;
|
|
|
|
|
const ActionProperty MEASURE_ACTIIONS[ACTION_COUNT] = {
|
|
|
|
|
{ ":/InfiniteViewer/Icon/distance.png", AnnotationActorType::RulerAnn},
|
|
|
|
|
{ ":/InfiniteViewer/Icon/angle.png", AnnotationActorType::AngleAnn},
|
|
|
|
|
{ ":/InfiniteViewer/Icon/polygon.png", AnnotationActorType::ClosedPolygonAnn},
|
|
|
|
|
{ ":/InfiniteViewer/Icon/polyline.png", AnnotationActorType::OpenPolygonAnn},
|
|
|
|
|
{ ":/InfiniteViewer/Icon/arrow.png", AnnotationActorType::ArrowAnn},
|
|
|
|
|
{ ":/InfiniteViewer/Icon/ellipse.png", AnnotationActorType::EllipseAnn},
|
|
|
|
|
{ ":/InfiniteViewer/Icon/diameter.png", AnnotationActorType::DiameterAnn},
|
|
|
|
|
{ ":/InfiniteViewer/Icon/text.png", AnnotationActorType::TextAnn},
|
|
|
|
|
{ ":/InfiniteViewer/Icon/crosshair.png", AnnotationActorType::SyncPoint}
|
|
|
|
|
const char *SYNC_DIS_D_URL = ":/InfiniteViewer/Icon/sync/sync_disd.png";
|
|
|
|
|
const char *ANONYMIZE_URL = ":/InfiniteViewer/Icon/anno.png";
|
|
|
|
|
const char *ANONYMIZE_D_URL = ":/InfiniteViewer/Icon/annod.png";
|
|
|
|
|
const char *SLICE_URL = ":/InfiniteViewer/Icon/slice.png";
|
|
|
|
|
const char *SLICE_D_URL = ":/InfiniteViewer/Icon/sliced.png";
|
|
|
|
|
const char *WINDOW_URL = ":/InfiniteViewer/Icon/windowlevel.png";
|
|
|
|
|
const char *WINDOW_D_URL = ":/InfiniteViewer/Icon/windowleveld.png";
|
|
|
|
|
const char *PAN_URL = ":/InfiniteViewer/Icon/pan.png";
|
|
|
|
|
const char *PAN_D_URL = ":/InfiniteViewer/Icon/pand.png";
|
|
|
|
|
const char *ZOOM_URL = ":/InfiniteViewer/Icon/zoom.png";
|
|
|
|
|
const char *ZOOM_D_URL = ":/InfiniteViewer/Icon/zoomd.png";
|
|
|
|
|
const char *FLIP_URL = ":/InfiniteViewer/Icon/flip.png";
|
|
|
|
|
const char *FLIP_D_URL = ":/InfiniteViewer/Icon/flipd.png";
|
|
|
|
|
const char *MPR_URL = ":/InfiniteViewer/Icon/MPR.png";
|
|
|
|
|
const char *MPR_D_URL = ":/InfiniteViewer/Icon/unMPR.png";
|
|
|
|
|
const char *LOC_POINT_URL = ":/InfiniteViewer/Icon/crosshair.png";
|
|
|
|
|
const char *LOC_POINT_D_URL = ":/InfiniteViewer/Icon/crosshaird.png";
|
|
|
|
|
const char *GRID_URL = ":/InfiniteViewer/Icon/grid.png";
|
|
|
|
|
const char *GRID_D_URL = ":/InfiniteViewer/Icon/gridd.png";
|
|
|
|
|
|
|
|
|
|
const int ACTION_COUNT = 8;
|
|
|
|
|
const ActionProperty MEASURE_ACTIIONS[ACTION_COUNT] = {
|
|
|
|
|
{ ":/InfiniteViewer/Icon/distance.png", ":/InfiniteViewer/Icon/distanced.png", AnnotationActorType::RulerAnn},
|
|
|
|
|
{ ":/InfiniteViewer/Icon/angle.png", ":/InfiniteViewer/Icon/angled.png", AnnotationActorType::AngleAnn},
|
|
|
|
|
{ ":/InfiniteViewer/Icon/polygon.png", ":/InfiniteViewer/Icon/polygond.png", AnnotationActorType::ClosedPolygonAnn},
|
|
|
|
|
{ ":/InfiniteViewer/Icon/polyline.png", ":/InfiniteViewer/Icon/polylined.png", AnnotationActorType::OpenPolygonAnn},
|
|
|
|
|
{ ":/InfiniteViewer/Icon/arrow.png", ":/InfiniteViewer/Icon/arrowd.png", AnnotationActorType::ArrowAnn},
|
|
|
|
|
{ ":/InfiniteViewer/Icon/ellipse.png", ":/InfiniteViewer/Icon/ellipsed.png", AnnotationActorType::EllipseAnn},
|
|
|
|
|
{ ":/InfiniteViewer/Icon/diameter.png", ":/InfiniteViewer/Icon/diameterd.png", AnnotationActorType::DiameterAnn},
|
|
|
|
|
{ ":/InfiniteViewer/Icon/text.png", ":/InfiniteViewer/Icon/textd.png", AnnotationActorType::TextAnn}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -71,7 +93,11 @@ DefaultToolBar::DefaultToolBar(QWidget *parent) : QToolBar(parent)
|
|
|
|
|
//init icons
|
|
|
|
|
mManualIcon.addFile(SYNC_MANUAL_URL);
|
|
|
|
|
mAutoIcon.addFile(SYNC_AUTO_URL);
|
|
|
|
|
mAutoIcon.addFile(SYNC_AUTO_D_URL, QSize(), QIcon::Disabled);
|
|
|
|
|
|
|
|
|
|
mDisIcon.addFile(SYNC_DIS_URL);
|
|
|
|
|
mDisIcon.addFile(SYNC_DIS_D_URL, QSize(), QIcon::Disabled);
|
|
|
|
|
|
|
|
|
|
initToolBarButtons();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -97,11 +123,28 @@ void DefaultToolBar::resetToolbarMode(bool aHasSeries)
|
|
|
|
|
if (aHasSeries){
|
|
|
|
|
|
|
|
|
|
mActionVolumeDetail->setVisible(false);
|
|
|
|
|
QPixmap map(std::get<0>(MEASURE_ACTIIONS[0]));
|
|
|
|
|
mBtnMeasure->setIcon(QIcon(map));
|
|
|
|
|
MeasureHelper::setMeasureType(std::get<1>(MEASURE_ACTIIONS[0]));
|
|
|
|
|
mBtnSlice->click();
|
|
|
|
|
mBtnSlice->setChecked(true);
|
|
|
|
|
|
|
|
|
|
QIcon icon;
|
|
|
|
|
icon.addFile(std::get<0>(MEASURE_ACTIIONS[0]));
|
|
|
|
|
icon.addFile(std::get<1>(MEASURE_ACTIIONS[0]), QSize(), QIcon::Disabled);
|
|
|
|
|
mBtnMeasure->setIcon(icon);
|
|
|
|
|
|
|
|
|
|
MeasureHelper::setMeasureType(std::get<2>(MEASURE_ACTIIONS[0]));
|
|
|
|
|
setMode(VTKIS_IMAGE_SLICE);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int DefaultToolBar::mode() const
|
|
|
|
|
{
|
|
|
|
|
return mValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void DefaultToolBar::setMode(int aValue)
|
|
|
|
|
{
|
|
|
|
|
if (aValue != mValue){
|
|
|
|
|
int temp = mValue;
|
|
|
|
|
mValue = aValue;
|
|
|
|
|
emit modeChanged(temp, mValue);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -135,27 +178,23 @@ void DefaultToolBar::initToolBarButtons() {
|
|
|
|
|
mBtnGrid->setEnabled(false);
|
|
|
|
|
{
|
|
|
|
|
QIcon icon;
|
|
|
|
|
icon.addFile(":/InfiniteViewer/Icon/grid.png");
|
|
|
|
|
icon.addFile(":/InfiniteViewer/Icon/gridd.png", QSize(), QIcon::Disabled);
|
|
|
|
|
icon.addFile(GRID_URL);
|
|
|
|
|
icon.addFile(GRID_D_URL, QSize(), QIcon::Disabled);
|
|
|
|
|
mBtnGrid->setIcon(icon);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
addButton(mBtnSync, "sync");
|
|
|
|
|
mBtnSync->setEnabled(false);
|
|
|
|
|
{
|
|
|
|
|
QIcon icon;
|
|
|
|
|
icon.addFile(":/InfiniteViewer/Icon/sync/sync_dis.png");
|
|
|
|
|
icon.addFile(":/InfiniteViewer/Icon/sync/sync_disd.png", QSize(), QIcon::Disabled);
|
|
|
|
|
mBtnSync->setIcon(icon);
|
|
|
|
|
}
|
|
|
|
|
mBtnSync->setIcon(mDisIcon);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
addButton(mBtnAnonymize, "anonymize");
|
|
|
|
|
mBtnAnonymize->setEnabled(false);
|
|
|
|
|
{
|
|
|
|
|
QIcon icon;
|
|
|
|
|
icon.addFile(":/InfiniteViewer/Icon/anno.png");
|
|
|
|
|
icon.addFile(":/InfiniteViewer/Icon/annod.png", QSize(), QIcon::Disabled);
|
|
|
|
|
icon.addFile(ANONYMIZE_URL);
|
|
|
|
|
icon.addFile(ANONYMIZE_D_URL, QSize(), QIcon::Disabled);
|
|
|
|
|
mBtnAnonymize->setIcon(icon);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -166,8 +205,8 @@ void DefaultToolBar::initToolBarButtons() {
|
|
|
|
|
mBtnSlice->setEnabled(false);
|
|
|
|
|
{
|
|
|
|
|
QIcon icon;
|
|
|
|
|
icon.addFile(":/InfiniteViewer/Icon/slice.png");
|
|
|
|
|
icon.addFile(":/InfiniteViewer/Icon/sliced.png", QSize(), QIcon::Disabled);
|
|
|
|
|
icon.addFile(SLICE_URL);
|
|
|
|
|
icon.addFile(SLICE_D_URL, QSize(), QIcon::Disabled);
|
|
|
|
|
mBtnSlice->setIcon(icon);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -175,8 +214,8 @@ void DefaultToolBar::initToolBarButtons() {
|
|
|
|
|
mBtnWindow->setEnabled(false);
|
|
|
|
|
{
|
|
|
|
|
QIcon icon;
|
|
|
|
|
icon.addFile(":/InfiniteViewer/Icon/windowlevel.png");
|
|
|
|
|
icon.addFile(":/InfiniteViewer/Icon/windowleveld.png", QSize(), QIcon::Disabled);
|
|
|
|
|
icon.addFile(WINDOW_URL);
|
|
|
|
|
icon.addFile(WINDOW_D_URL, QSize(), QIcon::Disabled);
|
|
|
|
|
mBtnWindow->setIcon(icon);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -184,8 +223,8 @@ void DefaultToolBar::initToolBarButtons() {
|
|
|
|
|
mBtnPan->setEnabled(false);
|
|
|
|
|
{
|
|
|
|
|
QIcon icon;
|
|
|
|
|
icon.addFile(":/InfiniteViewer/Icon/pan.png");
|
|
|
|
|
icon.addFile(":/InfiniteViewer/Icon/pand.png", QSize(), QIcon::Disabled);
|
|
|
|
|
icon.addFile(PAN_URL);
|
|
|
|
|
icon.addFile(PAN_D_URL, QSize(), QIcon::Disabled);
|
|
|
|
|
mBtnPan->setIcon(icon);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -193,8 +232,8 @@ void DefaultToolBar::initToolBarButtons() {
|
|
|
|
|
mBtnZoom->setEnabled(false);
|
|
|
|
|
{
|
|
|
|
|
QIcon icon;
|
|
|
|
|
icon.addFile(":/InfiniteViewer/Icon/zoom.png");
|
|
|
|
|
icon.addFile(":/InfiniteViewer/Icon/zoomd.png", QSize(), QIcon::Disabled);
|
|
|
|
|
icon.addFile(ZOOM_URL);
|
|
|
|
|
icon.addFile(ZOOM_D_URL, QSize(), QIcon::Disabled);
|
|
|
|
|
mBtnZoom->setIcon(icon);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -202,8 +241,8 @@ void DefaultToolBar::initToolBarButtons() {
|
|
|
|
|
mBtnMeasure->setEnabled(false);
|
|
|
|
|
{
|
|
|
|
|
QIcon icon;
|
|
|
|
|
icon.addFile(":/InfiniteViewer/Icon/distance.png");
|
|
|
|
|
icon.addFile(":/InfiniteViewer/Icon/distanced.png", QSize(), QIcon::Disabled);
|
|
|
|
|
icon.addFile(std::get<0>(MEASURE_ACTIIONS[0]));
|
|
|
|
|
icon.addFile(std::get<1>(MEASURE_ACTIIONS[0]), QSize(), QIcon::Disabled);
|
|
|
|
|
mBtnMeasure->setIcon(icon);
|
|
|
|
|
}
|
|
|
|
|
mActionVolumeDetail = addWidget(mLblMeasure);
|
|
|
|
|
@@ -221,8 +260,8 @@ void DefaultToolBar::initToolBarButtons() {
|
|
|
|
|
mBtnFlip->setEnabled(false);
|
|
|
|
|
{
|
|
|
|
|
QIcon icon;
|
|
|
|
|
icon.addFile(":/InfiniteViewer/Icon/flip.png");
|
|
|
|
|
icon.addFile(":/InfiniteViewer/Icon/flipd.png", QSize(), QIcon::Disabled);
|
|
|
|
|
icon.addFile(FLIP_URL);
|
|
|
|
|
icon.addFile(FLIP_D_URL, QSize(), QIcon::Disabled);
|
|
|
|
|
mBtnFlip->setIcon(icon);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -239,8 +278,8 @@ void DefaultToolBar::initToolBarButtons() {
|
|
|
|
|
mBtnMPR->setEnabled(false);
|
|
|
|
|
{
|
|
|
|
|
QIcon icon;
|
|
|
|
|
icon.addFile(":/InfiniteViewer/Icon/MPR.png");
|
|
|
|
|
icon.addFile(":/InfiniteViewer/Icon/unMPR.png", QSize(), QIcon::Disabled);
|
|
|
|
|
icon.addFile(MPR_URL);
|
|
|
|
|
icon.addFile(MPR_D_URL, QSize(), QIcon::Disabled);
|
|
|
|
|
mBtnMPR->setIcon(icon);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -370,7 +409,7 @@ void DefaultToolBar::initModeButtons() {
|
|
|
|
|
mBtnWindow->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
|
|
|
|
|
mBtnWindow->setToolTip(tr("Adjust window level"));
|
|
|
|
|
connect(mBtnWindow, &QToolButton::clicked, this, [=]() {
|
|
|
|
|
emit modeChanged(7);
|
|
|
|
|
setMode(VTKIS_IMAGE_WINDOWLEVEL);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// Menu
|
|
|
|
|
@@ -404,17 +443,17 @@ void DefaultToolBar::initModeButtons() {
|
|
|
|
|
|
|
|
|
|
mBtnPan->setToolTip(tr("Pan image"));
|
|
|
|
|
connect(mBtnPan, &QToolButton::clicked, this, [=]() {
|
|
|
|
|
emit modeChanged(5);
|
|
|
|
|
setMode(VTKIS_IMAGE_PAN);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
mBtnZoom->setToolTip(tr("Zoom image"));
|
|
|
|
|
connect(mBtnZoom, &QToolButton::clicked, this, [=]() {
|
|
|
|
|
emit modeChanged(6);
|
|
|
|
|
setMode(VTKIS_IMAGE_ZOOM);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
mBtnSlice->setToolTip(tr("Browse series"));
|
|
|
|
|
connect(mBtnSlice, &QToolButton::clicked, this, [=]() {
|
|
|
|
|
emit modeChanged(4);
|
|
|
|
|
setMode(VTKIS_IMAGE_SLICE);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
initMeasureButton();
|
|
|
|
|
@@ -489,16 +528,16 @@ void DefaultToolBar::initMeasureButton() {
|
|
|
|
|
|
|
|
|
|
mBtnMeasure->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
|
|
|
|
|
mBtnMeasure->setToolTip(tr("Measuring tool"));
|
|
|
|
|
mBtnMeasure->setProperty("mode",36);
|
|
|
|
|
mBtnMeasure->setProperty("mode",VTKIS_MEASURE);
|
|
|
|
|
|
|
|
|
|
connect(mBtnMeasure, &QToolButton::clicked, [=](){
|
|
|
|
|
int mode = mBtnMeasure->property("mode").toInt();
|
|
|
|
|
if (mode != 36)
|
|
|
|
|
if (mode != VTKIS_MEASURE)
|
|
|
|
|
{
|
|
|
|
|
emit modeChanged(mode);
|
|
|
|
|
setMode(mode);
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
emit modeChanged(36);
|
|
|
|
|
setMode(VTKIS_MEASURE);
|
|
|
|
|
MeasureHelper::setMeasureType(MeasureHelper::getMeasureType());
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
@@ -506,31 +545,37 @@ void DefaultToolBar::initMeasureButton() {
|
|
|
|
|
QMenu *m;
|
|
|
|
|
m = new QMenu(this);
|
|
|
|
|
|
|
|
|
|
for (int j = 0; j < ACTION_COUNT-1; ++j) {
|
|
|
|
|
for (int j = 0; j < ACTION_COUNT; ++j) {
|
|
|
|
|
m->addAction(measures[j], this, [=] {
|
|
|
|
|
mBtnMeasure->setChecked(true);
|
|
|
|
|
QPixmap map(std::get<0>(MEASURE_ACTIIONS[j]));
|
|
|
|
|
mBtnMeasure->setIcon(QIcon(map));
|
|
|
|
|
emit modeChanged(36);
|
|
|
|
|
MeasureHelper::setMeasureType(std::get<1>(MEASURE_ACTIIONS[j]));
|
|
|
|
|
mBtnMeasure->setProperty("mode",36);
|
|
|
|
|
QIcon icon;
|
|
|
|
|
icon.addFile(std::get<0>(MEASURE_ACTIIONS[j]));
|
|
|
|
|
icon.addFile(std::get<1>(MEASURE_ACTIIONS[j]), QSize(), QIcon::Disabled);
|
|
|
|
|
mBtnMeasure->setIcon(icon);
|
|
|
|
|
setMode(VTKIS_MEASURE);
|
|
|
|
|
MeasureHelper::setMeasureType(std::get<2>(MEASURE_ACTIIONS[j]));
|
|
|
|
|
mBtnMeasure->setProperty("mode",VTKIS_MEASURE);
|
|
|
|
|
mActionVolumeDetail->setVisible(false);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
m->addAction(tr("Location Point"), this,[=](){
|
|
|
|
|
mBtnMeasure->setChecked(true);
|
|
|
|
|
QPixmap map(":/InfiniteViewer/Icon/crosshair.png");
|
|
|
|
|
mBtnMeasure->setIcon(QIcon(map));
|
|
|
|
|
mBtnMeasure->setProperty("mode",38);
|
|
|
|
|
emit modeChanged(38);
|
|
|
|
|
QIcon icon;
|
|
|
|
|
icon.addFile(LOC_POINT_URL);
|
|
|
|
|
icon.addFile(LOC_POINT_D_URL, QSize(), QIcon::Disabled);
|
|
|
|
|
mBtnMeasure->setIcon(icon);
|
|
|
|
|
mBtnMeasure->setProperty("mode",VTKIS_SYNCPOINT);
|
|
|
|
|
setMode(VTKIS_SYNCPOINT);
|
|
|
|
|
});
|
|
|
|
|
m->addAction(tr("Volume Measure"), this,[=](){
|
|
|
|
|
mBtnMeasure->setChecked(true);
|
|
|
|
|
QPixmap map(":/InfiniteViewer/Icon/volmeasure.png");
|
|
|
|
|
mBtnMeasure->setIcon(QIcon(map));
|
|
|
|
|
mBtnMeasure->setProperty("mode",39);
|
|
|
|
|
emit modeChanged(39);
|
|
|
|
|
QIcon icon;
|
|
|
|
|
icon.addFile(":/InfiniteViewer/Icon/volmeasure.png");
|
|
|
|
|
icon.addFile(":/InfiniteViewer/Icon/volmeasured.png", QSize(), QIcon::Disabled);
|
|
|
|
|
mBtnMeasure->setIcon(icon);
|
|
|
|
|
mBtnMeasure->setProperty("mode",VTKIS_VOLUMEMEASURE);
|
|
|
|
|
setMode(VTKIS_VOLUMEMEASURE);
|
|
|
|
|
});
|
|
|
|
|
m->addSeparator();
|
|
|
|
|
ADD_DEL_ACTION(tr("Delete selected"), AnnotationDeleteType::DeleteSelectedAnn);
|
|
|
|
|
@@ -677,7 +722,7 @@ void DefaultToolBar::initMPRButton(){
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void DefaultToolBar::resetNeedCheckFunctionButtons(){
|
|
|
|
|
void DefaultToolBar::resetModeButtons(){
|
|
|
|
|
mBtnMPR->setEnabled(false);
|
|
|
|
|
mBtnFusion->setEnabled(false);
|
|
|
|
|
for(auto var : mPseudocolorGroup->actions())
|
|
|
|
|
@@ -690,10 +735,18 @@ void DefaultToolBar::resetNeedCheckFunctionButtons(){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void DefaultToolBar::updateNeedCheckFunctionButtons(ViewFunctionState state)
|
|
|
|
|
void DefaultToolBar::updateModeButtonsState(ViewFunctionState state)
|
|
|
|
|
{
|
|
|
|
|
if (state.none)
|
|
|
|
|
{
|
|
|
|
|
mBtnAnonymize->setCheckable(false);
|
|
|
|
|
mBtnSlice->setCheckable(false);
|
|
|
|
|
mBtnWindow->setCheckable(false);
|
|
|
|
|
mBtnPan->setCheckable(false);
|
|
|
|
|
mBtnZoom->setCheckable(false);
|
|
|
|
|
mBtnMeasure->setCheckable(false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mBtnSave->setEnabled(false);
|
|
|
|
|
mBtnGrid->setEnabled(false);
|
|
|
|
|
mBtnSync->setEnabled(false);
|
|
|
|
|
@@ -711,6 +764,13 @@ void DefaultToolBar::updateNeedCheckFunctionButtons(ViewFunctionState state)
|
|
|
|
|
mBtnVR->setEnabled(false);
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
mBtnAnonymize->setCheckable(true);
|
|
|
|
|
mBtnSlice->setCheckable(true);
|
|
|
|
|
mBtnWindow->setCheckable(true);
|
|
|
|
|
mBtnPan->setCheckable(true);
|
|
|
|
|
mBtnZoom->setCheckable(true);
|
|
|
|
|
mBtnMeasure->setCheckable(true);
|
|
|
|
|
|
|
|
|
|
mBtnSave->setEnabled(true);
|
|
|
|
|
mBtnGrid->setEnabled(true);
|
|
|
|
|
mBtnSync->setEnabled(true);
|
|
|
|
|
@@ -737,6 +797,38 @@ void DefaultToolBar::updateNeedCheckFunctionButtons(ViewFunctionState state)
|
|
|
|
|
mMPRActions[state.canMPR]->setChecked(true);
|
|
|
|
|
}
|
|
|
|
|
mBtnFusion->setEnabled(state.canFusion);
|
|
|
|
|
switch (mode())
|
|
|
|
|
{
|
|
|
|
|
case VTKIS_IMAGE_PAN:
|
|
|
|
|
{
|
|
|
|
|
mBtnPan->setChecked(true);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case VTKIS_IMAGE_ZOOM:
|
|
|
|
|
{
|
|
|
|
|
mBtnZoom->setChecked(true);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case VTKIS_IMAGE_SLICE:
|
|
|
|
|
{
|
|
|
|
|
mBtnSlice->setChecked(true);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case VTKIS_IMAGE_WINDOWLEVEL:
|
|
|
|
|
{
|
|
|
|
|
mBtnWindow->setChecked(true);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case VTKIS_MEASURE:
|
|
|
|
|
case VTKIS_SYNCPOINT:
|
|
|
|
|
case VTKIS_VOLUMEMEASURE:
|
|
|
|
|
{
|
|
|
|
|
mBtnMeasure->setChecked(true);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|