fix: fix a measure reload bug
This commit is contained in:
@@ -419,6 +419,20 @@ void DICOMImageViewer::Render() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DICOMImageViewer::RenderReloadMeasure()
|
||||||
|
{
|
||||||
|
if (this->GetInput()) {
|
||||||
|
if (Fusion && FusionActor && !this->ImageStack->HasImage(FusionActor)) {
|
||||||
|
this->ImageStack->AddImage(FusionActor);
|
||||||
|
}
|
||||||
|
if (!Fusion && FusionActor && this->ImageStack->HasImage(FusionActor)) {
|
||||||
|
this->ImageStack->RemoveImage(FusionActor);
|
||||||
|
}
|
||||||
|
this->LoadMeasures(true);
|
||||||
|
this->RenderWindow->Render();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// slice about-----------------------------------------------------------------
|
// slice about-----------------------------------------------------------------
|
||||||
void DICOMImageViewer::GetSliceRange(int &min, int &max) {
|
void DICOMImageViewer::GetSliceRange(int &min, int &max) {
|
||||||
vtkAlgorithm *input = this->GetInputAlgorithm();
|
vtkAlgorithm *input = this->GetInputAlgorithm();
|
||||||
|
|||||||
@@ -88,6 +88,8 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual void Render();
|
virtual void Render();
|
||||||
|
|
||||||
|
virtual void RenderReloadMeasure();
|
||||||
|
|
||||||
//@{
|
//@{
|
||||||
/**
|
/**
|
||||||
* Set/Get the input image to the viewer.
|
* Set/Get the input image to the viewer.
|
||||||
|
|||||||
@@ -253,8 +253,12 @@ void ImageViewManager::smartDo(SmartDoCallback cb,SmartDoCallback otherCb, Dico
|
|||||||
|
|
||||||
//Slots and actions------------------------------------------------------------
|
//Slots and actions------------------------------------------------------------
|
||||||
void ImageViewManager::viewClicked(DicomImageView *view) {
|
void ImageViewManager::viewClicked(DicomImageView *view) {
|
||||||
|
//current view show measure
|
||||||
|
view->RenderReloadMeasure();
|
||||||
|
|
||||||
if (!view) return;
|
if (!view) return;
|
||||||
this->setCurrentView(view);
|
this->setCurrentView(view);
|
||||||
|
renderAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImageViewManager::viewDoubleClicked(DicomImageView *view) {
|
void ImageViewManager::viewDoubleClicked(DicomImageView *view) {
|
||||||
@@ -407,6 +411,14 @@ void ImageViewManager::renderAll() {
|
|||||||
}, nullptr, nullptr, All);
|
}, nullptr, nullptr, All);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ImageViewManager::renderAllReloadMeasure() {
|
||||||
|
smartDo([](auto v, auto) {
|
||||||
|
if (v->hasSeries()) {
|
||||||
|
v->RenderReloadMeasure();
|
||||||
|
}
|
||||||
|
}, nullptr, nullptr, All);
|
||||||
|
}
|
||||||
|
|
||||||
void ImageViewManager::activeMeasure() {
|
void ImageViewManager::activeMeasure() {
|
||||||
|
|
||||||
smartDo([](auto v, auto) {
|
smartDo([](auto v, auto) {
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ public:
|
|||||||
void setInteractionMode(int InteractionMode);
|
void setInteractionMode(int InteractionMode);
|
||||||
|
|
||||||
void renderAll();
|
void renderAll();
|
||||||
|
void renderAllReloadMeasure();
|
||||||
|
|
||||||
void activeMeasure();
|
void activeMeasure();
|
||||||
|
|
||||||
|
|||||||
@@ -162,6 +162,12 @@ bool DicomImageView::hasSeries() {
|
|||||||
return mSeries;
|
return mSeries;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DicomImageView::RenderReloadMeasure()
|
||||||
|
{
|
||||||
|
if (!hasSeries()) return;
|
||||||
|
mImageViewer->RenderReloadMeasure();
|
||||||
|
}
|
||||||
|
|
||||||
void DicomImageView::loadSeries(SeriesImageSet *series) {
|
void DicomImageView::loadSeries(SeriesImageSet *series) {
|
||||||
if (!series) return;
|
if (!series) return;
|
||||||
initImageViewer();
|
initImageViewer();
|
||||||
|
|||||||
@@ -46,6 +46,8 @@ public:
|
|||||||
|
|
||||||
void render();
|
void render();
|
||||||
|
|
||||||
|
void RenderReloadMeasure();
|
||||||
|
|
||||||
//Series
|
//Series
|
||||||
void setDicomImageView(SeriesImageSet *series);
|
void setDicomImageView(SeriesImageSet *series);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user