Refactor dicomimageview. 2
This commit is contained in:
@@ -63,7 +63,7 @@ void ExportDialog::onBtnExportClicked()
|
||||
//export files
|
||||
if (ui->rbCurrentImage->isChecked())//current image
|
||||
{
|
||||
if (cur_view->HasSeries())
|
||||
if (cur_view->hasSeries())
|
||||
{
|
||||
QString imageName(cur_view->getSeriesInstance()->getCurImageName());
|
||||
options.inputData.push_back(imageName);
|
||||
@@ -71,7 +71,7 @@ void ExportDialog::onBtnExportClicked()
|
||||
}
|
||||
else if (ui->rbCurrentSeries->isChecked())//current series
|
||||
{
|
||||
if (cur_view->HasSeries())
|
||||
if (cur_view->hasSeries())
|
||||
{
|
||||
QString serieName(cur_view->getSeriesInstance()->getSeriesName());
|
||||
options.inputData.push_back(serieName);
|
||||
|
||||
@@ -41,7 +41,7 @@ void ImageViewManager::smartDo(SmartDoCallback cb, DicomImageView *sourceView, v
|
||||
std::for_each(vList.begin(),vList.end(),[=](auto v){
|
||||
//check series
|
||||
auto series = sourceView->getSeriesInstance();
|
||||
if (v->getSeriesInstance()==series && v->GetSliceOrientation() == sourceView->GetSliceOrientation()){
|
||||
if (v->getSeriesInstance()==series && v->getSliceOrientation() == sourceView->getSliceOrientation()){
|
||||
cb(v, callData);
|
||||
}
|
||||
|
||||
@@ -51,14 +51,14 @@ void ImageViewManager::smartDo(SmartDoCallback cb, DicomImageView *sourceView, v
|
||||
case DoScope::EStudyEBoundsSeries:{
|
||||
std::for_each(vList.begin(),vList.end(),[=](auto v) {
|
||||
if (v == sourceView) return;
|
||||
if (!v->HasSeries()) return;
|
||||
if (!v->hasSeries()) return;
|
||||
//check series
|
||||
auto series = sourceView->getSeriesInstance();
|
||||
auto currentSeries = v->getSeriesInstance();
|
||||
//same series
|
||||
if (series == currentSeries
|
||||
//equal slice orientation
|
||||
&& v->GetSliceOrientation() == sourceView->GetSliceOrientation()) {
|
||||
&& v->getSliceOrientation() == sourceView->getSliceOrientation()) {
|
||||
cb(v, callData);
|
||||
}
|
||||
//equal study
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -32,7 +32,7 @@ public:
|
||||
|
||||
~DicomImageView() override;
|
||||
|
||||
void ShowMetaData();
|
||||
void showMetaData();
|
||||
|
||||
QVTKOpenGLNativeWidget *getGLWidget() {
|
||||
return mGLWidget;
|
||||
@@ -44,12 +44,12 @@ public:
|
||||
|
||||
void setHighlight(bool yes);
|
||||
|
||||
void Render();
|
||||
void render();
|
||||
|
||||
//Series
|
||||
void setDicomImageView(SeriesImageSet *series);
|
||||
|
||||
bool HasSeries();
|
||||
bool hasSeries();
|
||||
|
||||
int getSeriesNumber();
|
||||
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
}
|
||||
|
||||
//Reset
|
||||
void ResetView();
|
||||
void resetView();
|
||||
|
||||
|
||||
//Corner Info
|
||||
@@ -67,50 +67,50 @@ public:
|
||||
void updateCornerInfoPrivacy();
|
||||
|
||||
//Window level
|
||||
void GetWindowLevel(double &level, double &width);
|
||||
void getWindowLevel(double &level, double &width);
|
||||
|
||||
void SetWindowLevel(double level, double width);
|
||||
void setWindowLevel(double level, double width);
|
||||
|
||||
//Transformation
|
||||
void ClearTransformations();
|
||||
|
||||
void HFlip();
|
||||
void hFlipImage();
|
||||
|
||||
void VFlip();
|
||||
void vFlipImage();
|
||||
|
||||
void Rotate(double angle, TransFormType operation);
|
||||
void rotateImage(double angle, TransFormType operation);
|
||||
|
||||
|
||||
//Fusion
|
||||
bool IsFusion();
|
||||
bool isFusion();
|
||||
|
||||
void SetFusionOpacity(double percent);
|
||||
void setFusionOpacity(double percent);
|
||||
|
||||
void SetFusionInput(DicomImageView *overlap);
|
||||
void setFusionInput(DicomImageView *overlay);
|
||||
|
||||
void removeViewWithFusion();
|
||||
|
||||
|
||||
//Measure
|
||||
void ActiveMeasure(Measure *m);
|
||||
void activeMeasure(Measure *m);
|
||||
|
||||
void DeleteSelectedMeasure();
|
||||
void deleteSelectedMeasure();
|
||||
|
||||
void DeleteCurrentSliceMeasure();
|
||||
void deleteCurrentSliceMeasure();
|
||||
|
||||
void DeleteCurrentSeriesMeasure();
|
||||
void deleteCurrentSeriesMeasure();
|
||||
|
||||
void removeViewWithMeasure();
|
||||
|
||||
|
||||
//Sync slice
|
||||
void AddSlice(int step);
|
||||
void addSlice(int step);
|
||||
|
||||
void SetSlice(int slice);
|
||||
void setSlice(int slice);
|
||||
|
||||
void SetZoomScale(double scale);
|
||||
void setZoomScale(double scale);
|
||||
|
||||
void SetPanOffset(double *p);
|
||||
void setPanOffset(double *p);
|
||||
|
||||
void SyncScrollBar();
|
||||
|
||||
@@ -144,11 +144,11 @@ public:
|
||||
}
|
||||
|
||||
//Negative
|
||||
void ToggleNegativeMode();
|
||||
void negativeWindow();
|
||||
|
||||
void SetSliceOrientation(int orientation);
|
||||
void getSliceOrientation(int orientation);
|
||||
|
||||
int GetSliceOrientation();
|
||||
int getSliceOrientation();
|
||||
|
||||
bool CompareWorldSliceOrientation(DicomImageView *view) {
|
||||
return this->mImageViewer->GetWorldSliceOrientation() == view->mImageViewer->GetWorldSliceOrientation();
|
||||
@@ -177,17 +177,17 @@ signals:
|
||||
public slots:
|
||||
|
||||
//for title bar use
|
||||
void Slot_viewDoubleclicked();
|
||||
void doubleClicked();
|
||||
|
||||
void Slot_ViewEmpty();
|
||||
void viewCleared();
|
||||
|
||||
void Slot_scrollValueChanged(int);
|
||||
void scrollBarValueChanged(int);
|
||||
|
||||
void Slot_WindowLevelEventForFusion(double level, double width);
|
||||
void fusionWindowChanged(double level, double width);
|
||||
|
||||
void Slot_Transformation();
|
||||
void imageTransformed();
|
||||
|
||||
void viewerClicked();
|
||||
void clicked();
|
||||
|
||||
protected:
|
||||
/**
|
||||
@@ -255,11 +255,11 @@ private:
|
||||
|
||||
|
||||
//Callback
|
||||
void doubleclickedEventCb(vtkObject *sender, unsigned long eventId, void *calldata = nullptr);
|
||||
void doubleclickedEventCb();
|
||||
|
||||
void scalarEventCb(vtkObject *sender, unsigned long eventId, void *calldata = nullptr);
|
||||
|
||||
void updateWindowLevelCb(vtkObject *caller, unsigned long eid, void *calldata);
|
||||
void updateWindowLevelCb();
|
||||
|
||||
void syncEventFunc(vtkObject *caller, unsigned long eid, void *calldata);
|
||||
|
||||
@@ -272,31 +272,31 @@ private:
|
||||
*/
|
||||
MyTitleBar *createMyTitleBar();
|
||||
|
||||
void ResetPanZoom();
|
||||
void resetPanZoom();
|
||||
|
||||
void initScrollbar();
|
||||
|
||||
void LoadSeries(SeriesImageSet *series);
|
||||
void loadSeries(SeriesImageSet *series);
|
||||
|
||||
vtkSmartPointer<vtkGenericOpenGLRenderWindow> mGLRenWin;
|
||||
|
||||
infinitiViewer *mImageViewer = nullptr;
|
||||
SeriesImageSet *mSeries = nullptr;
|
||||
ClickableScrollBar *mScrollBar = nullptr;
|
||||
MyTitleBar *mTitleBar = nullptr;
|
||||
QVTKOpenGLNativeWidget *mGLWidget = nullptr;
|
||||
pqVCRToolbar *mVcrToolbar = nullptr;
|
||||
pqVCRController *mVcrController = nullptr;
|
||||
infinitiViewer *mImageViewer;
|
||||
SeriesImageSet *mSeries;
|
||||
ClickableScrollBar *mScrollBar;
|
||||
MyTitleBar *mTitleBar;
|
||||
QVTKOpenGLNativeWidget *mGLWidget;
|
||||
pqVCRToolbar *mVcrToolbar ;
|
||||
pqVCRController *mVcrController;
|
||||
QThread mVcrControlThread;
|
||||
DicomImageView *mOverlayView = nullptr;
|
||||
DicomImageView *mBaseView = nullptr;
|
||||
DicomImageView *mOverlayView;
|
||||
DicomImageView *mBaseView;
|
||||
|
||||
int mSliceOrientation = 2;
|
||||
int mSliceOrientation;
|
||||
|
||||
bool mIsCine = false;
|
||||
bool mIsNegative = false;
|
||||
bool mIsOverlay = false;
|
||||
bool mIsSlotInited = false;
|
||||
bool mIsCine;
|
||||
bool mIsNegative;
|
||||
bool mIsOverlay;
|
||||
bool mIsSlotInited;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -173,7 +173,7 @@ void ThumbnailBarWidget::Slot_setCurrentThumbnail(DicomImageView *view)
|
||||
{
|
||||
if (view != nullptr)
|
||||
{
|
||||
if (view->HasSeries()) {
|
||||
if (view->hasSeries()) {
|
||||
SeriesImageSet *series = view->getSeriesInstance();
|
||||
auto iter = std::find_if(LabelList.begin(),LabelList.end(),[=](QWidget* widget){
|
||||
if(0 == strcmp(widget->metaObject()->className(),"thumbnailImage")){
|
||||
|
||||
@@ -70,7 +70,7 @@ void ViewContainerWidget::Slot_SyncEvent(DicomImageView *view, int interactionMo
|
||||
if (SyncHelper::getSyncState() == AUTO_SYNC)
|
||||
{
|
||||
manager.smartDo([](auto v,auto callData){
|
||||
if (v->HasSeries()) {
|
||||
if (v->hasSeries()) {
|
||||
double* r = (double*) callData;
|
||||
v->SyncSlicePoint(r);
|
||||
v->SyncScrollBar();
|
||||
@@ -80,10 +80,10 @@ void ViewContainerWidget::Slot_SyncEvent(DicomImageView *view, int interactionMo
|
||||
if (SyncHelper::getSyncState() == MANUAL_SYNC)
|
||||
{
|
||||
manager.smartDo([](auto v,auto callData){
|
||||
if (v->HasSeries()) {
|
||||
if (v->hasSeries()) {
|
||||
//disable global trigger slot
|
||||
int *r = (int *) callData;
|
||||
v->AddSlice(r[1]);
|
||||
v->addSlice(r[1]);
|
||||
}
|
||||
},view, calldata,ImageViewManager::EStudyEBoundsSeries);
|
||||
}
|
||||
@@ -94,10 +94,10 @@ void ViewContainerWidget::Slot_SyncEvent(DicomImageView *view, int interactionMo
|
||||
if (SyncHelper::getSyncItem(ZOOM_PAN))
|
||||
{
|
||||
manager.smartDo([](auto v,auto callData){
|
||||
if (v->HasSeries()) {
|
||||
if (v->hasSeries()) {
|
||||
double *d = (double *)callData;
|
||||
double vector[3] = { d[3] - d[0],d[4] - d[1],d[5] - d[2] };
|
||||
v->SetPanOffset(vector);
|
||||
v->setPanOffset(vector);
|
||||
}
|
||||
},view, calldata,ImageViewManager::EStudyEBoundsSeries);
|
||||
}
|
||||
@@ -106,9 +106,9 @@ void ViewContainerWidget::Slot_SyncEvent(DicomImageView *view, int interactionMo
|
||||
if (SyncHelper::getSyncItem(ZOOM_PAN))
|
||||
{
|
||||
manager.smartDo([](auto v,auto callData){
|
||||
if (v->HasSeries()) {
|
||||
if (v->hasSeries()) {
|
||||
double *d = (double *)callData;
|
||||
v->SetZoomScale(d[1]);
|
||||
v->setZoomScale(d[1]);
|
||||
}
|
||||
},view, calldata,ImageViewManager::EStudyEBoundsSeries);
|
||||
}
|
||||
@@ -117,9 +117,9 @@ void ViewContainerWidget::Slot_SyncEvent(DicomImageView *view, int interactionMo
|
||||
if (SyncHelper::getSyncItem(WIDTH_LEVEL))
|
||||
{
|
||||
manager.smartDo([](auto v,auto callData){
|
||||
if (v->HasSeries()) {
|
||||
if (v->hasSeries()) {
|
||||
double *d = (double *)callData;
|
||||
v->SetWindowLevel(d[1], d[0]);
|
||||
v->setWindowLevel(d[1], d[0]);
|
||||
}
|
||||
},view, calldata,ImageViewManager::EStudyEBoundsSeries);
|
||||
}
|
||||
@@ -287,7 +287,7 @@ void ViewContainerWidget::Slot_ViewEmpty(DicomImageView *view)
|
||||
{
|
||||
if (view != nullptr)
|
||||
{
|
||||
view->ResetView();
|
||||
view->resetView();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -330,7 +330,7 @@ void ViewContainerWidget::replaceViewWithSerie(const std::string& uniqueid, Dico
|
||||
curV->removeViewWithFusion();
|
||||
DicomLoader *helper = DicomLoader::GetInstance();
|
||||
curV->setDicomImageView(helper->getSeriesImageSet(uniqueid));
|
||||
curV->Render();
|
||||
curV->render();
|
||||
}
|
||||
|
||||
void ViewContainerWidget::toggleViewWithFusion()
|
||||
@@ -338,7 +338,7 @@ void ViewContainerWidget::toggleViewWithFusion()
|
||||
if (manager.getCurrentView())
|
||||
{
|
||||
|
||||
if (manager.getCurrentView()->HasSeries() && manager.getCurrentView()->IsFusion())
|
||||
if (manager.getCurrentView()->hasSeries() && manager.getCurrentView()->isFusion())
|
||||
{
|
||||
removeCurrentViewWithFusion();
|
||||
}
|
||||
@@ -358,10 +358,10 @@ void ViewContainerWidget::replaceViewWithFusion()
|
||||
if (checkFusionStatus(manager.getCurrentView(), overlap_view))
|
||||
{
|
||||
connect(overlap_view, &DicomImageView::Signal_WindowLevelEventForFusion,
|
||||
manager.getCurrentView(), &DicomImageView::Slot_WindowLevelEventForFusion);
|
||||
manager.getCurrentView(), &DicomImageView::fusionWindowChanged);
|
||||
|
||||
manager.getCurrentView()->SetFusionInput(overlap_view);
|
||||
manager.getCurrentView()->Render();
|
||||
manager.getCurrentView()->setFusionInput(overlap_view);
|
||||
manager.getCurrentView()->render();
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -380,7 +380,7 @@ bool ViewContainerWidget::checkFusionStatus(DicomImageView *base, DicomImageView
|
||||
SeriesImageSet* baseSeries = base->getSeriesInstance();
|
||||
SeriesImageSet* overlapSeries = overlap->getSeriesInstance();
|
||||
// no data
|
||||
if (!base->HasSeries() || !overlap->HasSeries()) return false;
|
||||
if (!base->hasSeries() || !overlap->hasSeries()) return false;
|
||||
// diff study
|
||||
if (baseSeries->getStudyUID() == nullptr ||
|
||||
strcmp(baseSeries->getStudyUID(), overlapSeries->getStudyUID())!=0) return false;
|
||||
@@ -391,7 +391,7 @@ bool ViewContainerWidget::checkFusionStatus(DicomImageView *base, DicomImageView
|
||||
|
||||
void ViewContainerWidget::updateCornerInfoAll() {
|
||||
manager.smartDo([](auto v, auto calldata) {
|
||||
if (v->HasSeries()){
|
||||
if (v->hasSeries()){
|
||||
v->updateCornerInfoAll();
|
||||
}
|
||||
}, nullptr, nullptr, ImageViewManager::All);
|
||||
@@ -399,7 +399,7 @@ void ViewContainerWidget::updateCornerInfoAll() {
|
||||
|
||||
void ViewContainerWidget::updateCornerInfoPrivacy() {
|
||||
manager.smartDo([](auto v, auto calldata) {
|
||||
if (v->HasSeries()){
|
||||
if (v->hasSeries()){
|
||||
v->updateCornerInfoPrivacy();
|
||||
}
|
||||
}, nullptr, nullptr, ImageViewManager::All);
|
||||
@@ -407,8 +407,8 @@ void ViewContainerWidget::updateCornerInfoPrivacy() {
|
||||
|
||||
void ViewContainerWidget::render() {
|
||||
manager.smartDo([](auto v, auto calldata) {
|
||||
if (v->HasSeries()){
|
||||
v->Render();
|
||||
if (v->hasSeries()){
|
||||
v->render();
|
||||
}
|
||||
}, nullptr, nullptr, ImageViewManager::All);
|
||||
}
|
||||
@@ -416,18 +416,18 @@ void ViewContainerWidget::render() {
|
||||
void ViewContainerWidget::activeMeasure() {
|
||||
|
||||
manager.smartDo([](auto v, auto calldata) {
|
||||
if (v->HasSeries()){
|
||||
if (v->hasSeries()){
|
||||
Measure* measure = MeasureFactory::getMeasure((AnnotationActorType)MeasureHelper::getMeasureType());
|
||||
v->ActiveMeasure(measure);
|
||||
v->activeMeasure(measure);
|
||||
}
|
||||
}, nullptr, nullptr, ImageViewManager::All);
|
||||
}
|
||||
|
||||
void ViewContainerWidget::SetCurrentViewSliceOrientation(int type) {
|
||||
manager.getCurrentView()->SetSliceOrientation(type);
|
||||
manager.getCurrentView()->getSliceOrientation(type);
|
||||
}
|
||||
|
||||
int ViewContainerWidget::GetCurrentViewSliceOrientation() {
|
||||
return manager.getCurrentView()->GetSliceOrientation();;
|
||||
return manager.getCurrentView()->getSliceOrientation();;
|
||||
}
|
||||
|
||||
|
||||
@@ -300,9 +300,9 @@ void QDicomViewer::SetupAnnoTool(QToolButton* annoBtn)
|
||||
|
||||
m->addAction(tr("Show Dicom tags"), this, [&] {
|
||||
DicomImageView* curV = ui->viewContainer->getCurrentView();
|
||||
if (curV->HasSeries())
|
||||
if (curV->hasSeries())
|
||||
{
|
||||
curV->ShowMetaData();
|
||||
curV->showMetaData();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -327,19 +327,19 @@ void QDicomViewer::executeActiveMeasure()
|
||||
case AnnotationActorType::DeleteSelectedAnn:
|
||||
if (curV != nullptr)
|
||||
{
|
||||
curV->DeleteSelectedMeasure();
|
||||
curV->deleteSelectedMeasure();
|
||||
}
|
||||
break;
|
||||
case AnnotationActorType::DeleteSliceAnn:
|
||||
if (curV != nullptr)
|
||||
{
|
||||
curV->DeleteCurrentSliceMeasure();
|
||||
curV->deleteCurrentSliceMeasure();
|
||||
}
|
||||
break;
|
||||
case AnnotationActorType::DeleteSeriesAnn:
|
||||
if (curV != nullptr)
|
||||
{
|
||||
curV->DeleteCurrentSeriesMeasure();
|
||||
curV->deleteCurrentSeriesMeasure();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -422,7 +422,7 @@ void QDicomViewer::SetupMeasureTool(QToolButton* measureBtn)
|
||||
DicomImageView* curV = ui->viewContainer->getCurrentView();
|
||||
if (curV != nullptr)
|
||||
{
|
||||
curV->DeleteSelectedMeasure();
|
||||
curV->deleteSelectedMeasure();
|
||||
}
|
||||
});
|
||||
m->addAction(tr("Delete all in current slice"), this, [=] {
|
||||
@@ -431,7 +431,7 @@ void QDicomViewer::SetupMeasureTool(QToolButton* measureBtn)
|
||||
DicomImageView* curV = ui->viewContainer->getCurrentView();
|
||||
if (curV != nullptr)
|
||||
{
|
||||
curV->DeleteCurrentSliceMeasure();
|
||||
curV->deleteCurrentSliceMeasure();
|
||||
}
|
||||
});
|
||||
m->addAction(tr("Delete all in current series"), this, [=] {
|
||||
@@ -441,7 +441,7 @@ void QDicomViewer::SetupMeasureTool(QToolButton* measureBtn)
|
||||
DicomImageView* curV = ui->viewContainer->getCurrentView();
|
||||
if (curV != nullptr)
|
||||
{
|
||||
curV->DeleteCurrentSeriesMeasure();
|
||||
curV->deleteCurrentSeriesMeasure();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -468,7 +468,7 @@ void QDicomViewer::SetupCineTool(QToolButton* cineBtn)
|
||||
cineBtn->setToolTip(QString("Cine"));
|
||||
connect(cineBtn, &QToolButton::clicked, this, [&] {
|
||||
DicomImageView* curV = ui->viewContainer->getCurrentView();
|
||||
if (curV->HasSeries())
|
||||
if (curV->hasSeries())
|
||||
{
|
||||
if (curV->IsCine())
|
||||
{
|
||||
@@ -563,9 +563,9 @@ void QDicomViewer::SetupAdjustTool(QToolButton* winlevelBtn)
|
||||
m->addAction(tr("Negative"), this, [=](bool value) {
|
||||
winlevelBtn->setChecked(true);
|
||||
DicomImageView* curV = ui->viewContainer->getCurrentView();
|
||||
if (curV != nullptr && curV->HasSeries())
|
||||
if (curV != nullptr && curV->hasSeries())
|
||||
{
|
||||
curV->ToggleNegativeMode();
|
||||
curV->negativeWindow();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -591,47 +591,47 @@ void QDicomViewer::SetupFlipTool(QToolButton* flipBtn)
|
||||
m = new QMenu(this);
|
||||
m->addAction(tr("Rotate 90 CCW"), this, [&] {
|
||||
DicomImageView* curV = ui->viewContainer->getCurrentView();
|
||||
if (curV != nullptr && curV->HasSeries())
|
||||
if (curV != nullptr && curV->hasSeries())
|
||||
{
|
||||
curV->Rotate(90, ROTATE_90_CCW);
|
||||
curV->rotateImage(90, ROTATE_90_CCW);
|
||||
}
|
||||
|
||||
});
|
||||
m->addAction(tr("Rotate 90 CW"), this, [&] {
|
||||
DicomImageView* curV = ui->viewContainer->getCurrentView();
|
||||
if (curV != nullptr && curV->HasSeries())
|
||||
if (curV != nullptr && curV->hasSeries())
|
||||
{
|
||||
curV->Rotate(-90, ROTATE_90_CW);
|
||||
curV->rotateImage(-90, ROTATE_90_CW);
|
||||
}
|
||||
});
|
||||
m->addAction(tr("Rotate 180"), this, [&] {
|
||||
DicomImageView* curV = ui->viewContainer->getCurrentView();
|
||||
if (curV != nullptr && curV->HasSeries())
|
||||
if (curV != nullptr && curV->hasSeries())
|
||||
{
|
||||
curV->Rotate(180, ROTATE_180);
|
||||
curV->rotateImage(180, ROTATE_180);
|
||||
}
|
||||
|
||||
});
|
||||
m->addSeparator();
|
||||
m->addAction(tr("Flip horizontal"), this, [&] {
|
||||
DicomImageView* curV = ui->viewContainer->getCurrentView();
|
||||
if (curV != nullptr && curV->HasSeries())
|
||||
if (curV != nullptr && curV->hasSeries())
|
||||
{
|
||||
curV->HFlip();
|
||||
curV->hFlipImage();
|
||||
}
|
||||
});
|
||||
m->addAction(tr("Flip vertical"), this, [&] {
|
||||
DicomImageView* curV = ui->viewContainer->getCurrentView();
|
||||
if (curV != nullptr && curV->HasSeries())
|
||||
if (curV != nullptr && curV->hasSeries())
|
||||
{
|
||||
curV->VFlip();
|
||||
curV->vFlipImage();
|
||||
}
|
||||
|
||||
});
|
||||
m->addSeparator();
|
||||
m->addAction(tr("Clear transformations"), this, [&] {
|
||||
DicomImageView* curV = ui->viewContainer->getCurrentView();
|
||||
if (curV != nullptr && curV->HasSeries())
|
||||
if (curV != nullptr && curV->hasSeries())
|
||||
{
|
||||
curV->ClearTransformations();
|
||||
}
|
||||
@@ -641,9 +641,9 @@ void QDicomViewer::SetupFlipTool(QToolButton* flipBtn)
|
||||
|
||||
connect(flipBtn, &QPushButton::clicked, this, [&] {
|
||||
DicomImageView* curV = ui->viewContainer->getCurrentView();
|
||||
if (curV != nullptr && curV->HasSeries())
|
||||
if (curV != nullptr && curV->hasSeries())
|
||||
{
|
||||
curV->Rotate(90, ROTATE_90_CCW);
|
||||
curV->rotateImage(90, ROTATE_90_CCW);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ void Customwindow::setCurrentView(DicomImageView *cur)
|
||||
}
|
||||
double width = 0;
|
||||
double level = 0;
|
||||
m_curV->GetWindowLevel(level, width);
|
||||
m_curV->getWindowLevel(level, width);
|
||||
ui.led_WL->setText(QString("%1").arg(level));
|
||||
ui.led_WW->setText(QString("%1").arg(width));
|
||||
}
|
||||
@@ -38,6 +38,6 @@ void Customwindow::setCurrentView(DicomImageView *cur)
|
||||
|
||||
void Customwindow::onBtnOKClicked()
|
||||
{
|
||||
m_curV->SetWindowLevel(ui.led_WL->text().toDouble(), ui.led_WW->text().toDouble());
|
||||
m_curV->setWindowLevel(ui.led_WL->text().toDouble(), ui.led_WW->text().toDouble());
|
||||
this->close();
|
||||
}
|
||||
Reference in New Issue
Block a user