UI improve.
This commit is contained in:
@@ -74,7 +74,6 @@ DICOMImageViewer::DICOMImageViewer()
|
|||||||
|
|
||||||
vtkNew<vtkTextProperty> prop;
|
vtkNew<vtkTextProperty> prop;
|
||||||
prop->SetFontFamilyToArial();
|
prop->SetFontFamilyToArial();
|
||||||
// prop->ShadowOn();
|
|
||||||
this->cornerAnnotation->SetTextProperty(prop);
|
this->cornerAnnotation->SetTextProperty(prop);
|
||||||
this->cornerAnnotation->GetTextProperty()->SetColor(0.0, 1, 1);
|
this->cornerAnnotation->GetTextProperty()->SetColor(0.0, 1, 1);
|
||||||
// Annotate the image with window/level and mouse over pixel information
|
// Annotate the image with window/level and mouse over pixel information
|
||||||
|
|||||||
@@ -18,10 +18,10 @@
|
|||||||
#include <vtkPiecewiseFunction.h>
|
#include <vtkPiecewiseFunction.h>
|
||||||
#include <vtkColorTransferFunction.h>
|
#include <vtkColorTransferFunction.h>
|
||||||
#include <vtkCornerAnnotation.h>
|
#include <vtkCornerAnnotation.h>
|
||||||
|
#include <vtkTextProperty.h>
|
||||||
#include <vtkPlane.h>
|
#include <vtkPlane.h>
|
||||||
#include <vtkBoundingBox.h>
|
#include <vtkBoundingBox.h>
|
||||||
#include <vtkAnnotatedCubeActor.h>
|
#include <vtkAnnotatedCubeActor.h>
|
||||||
#include <vtkVectorText.h>
|
|
||||||
|
|
||||||
#include "Interaction/VolumeInteractorStyle.h"
|
#include "Interaction/VolumeInteractorStyle.h"
|
||||||
#include "Rendering/Widget/ClickableOrientationMarkerWidget.h"
|
#include "Rendering/Widget/ClickableOrientationMarkerWidget.h"
|
||||||
@@ -126,6 +126,15 @@ VolumeRenderingViewer::VolumeRenderingViewer()
|
|||||||
volumeProperty->SetSpecularPower(10.0);
|
volumeProperty->SetSpecularPower(10.0);
|
||||||
VolumeActor->SetProperty(volumeProperty);
|
VolumeActor->SetProperty(volumeProperty);
|
||||||
VolumeActor->SetMapper(VolumeMapper);
|
VolumeActor->SetMapper(VolumeMapper);
|
||||||
|
vtkNew<vtkTextProperty> prop;
|
||||||
|
prop->SetFontFamilyToArial();
|
||||||
|
this->annotation->SetTextProperty(prop);
|
||||||
|
this->annotation->GetTextProperty()->SetColor(.0,1.,1.);
|
||||||
|
// Annotate the image with window/level and mouse over pixel information
|
||||||
|
this->annotation->SetLinearFontScaleFactor(2);
|
||||||
|
this->annotation->SetNonlinearFontScaleFactor(1);
|
||||||
|
this->annotation->SetMaximumFontSize(20);
|
||||||
|
this->annotation->SetMinimumFontSize(8);
|
||||||
}
|
}
|
||||||
|
|
||||||
VolumeRenderingViewer::~VolumeRenderingViewer() {
|
VolumeRenderingViewer::~VolumeRenderingViewer() {
|
||||||
@@ -459,14 +468,9 @@ void VolumeRenderingViewer::SetCoordsTransformMatrix(ExtendMedicalImagePropertie
|
|||||||
cube->GetXMinusFaceProperty()->SetColor(.882,.3,0.2);
|
cube->GetXMinusFaceProperty()->SetColor(.882,.3,0.2);
|
||||||
cube->GetXPlusFaceProperty()->SetColor(.882,.3,0.2);
|
cube->GetXPlusFaceProperty()->SetColor(.882,.3,0.2);
|
||||||
cube->GetTextEdgesProperty()->SetEdgeVisibility(0);
|
cube->GetTextEdgesProperty()->SetEdgeVisibility(0);
|
||||||
// cube->GetTextEdgesProperty()->SetEdgeColor(0.149,0.737,.835);
|
// cube->GetCubeProperty()->SetColor(0.11,0.471,.539);
|
||||||
// cube->GetTextEdgesProperty()->SetColor(1.0,1.0,.0);
|
cube->GetCubeProperty()->SetColor(0.05,0.55,0.5);
|
||||||
// cube->GetTextEdgesProperty()->SetLineWidth(2.0);
|
|
||||||
// cube->GetCubeProperty()->SetEdgeColor(1.0,1.0,.0);
|
|
||||||
// cube->GetCubeProperty()->SetEdgeVisibility(1);
|
|
||||||
cube->GetCubeProperty()->SetColor(0.11,0.471,.539);
|
|
||||||
cube->SetPickable(true);
|
cube->SetPickable(true);
|
||||||
vtkVectorText* text = vtkVectorText::New();
|
|
||||||
OrientationMarker->SetOrientationMarker(cube);
|
OrientationMarker->SetOrientationMarker(cube);
|
||||||
cube->AddObserver(vtkCommand::PickEvent,this,&VolumeRenderingViewer::pressedOrientationMarker);
|
cube->AddObserver(vtkCommand::PickEvent,this,&VolumeRenderingViewer::pressedOrientationMarker);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ void ClickableOrientationMarkerWidget::OnLeftButtonDown() {
|
|||||||
this->StartPosition[1] = Y;
|
this->StartPosition[1] = Y;
|
||||||
|
|
||||||
this->State = this->ComputeStateBasedOnPosition( X, Y, pos1, pos2 );
|
this->State = this->ComputeStateBasedOnPosition( X, Y, pos1, pos2 );
|
||||||
// this->SetCursor( this->State );
|
|
||||||
|
|
||||||
if (this->State == vtkOrientationMarkerWidget::Outside)
|
if (this->State == vtkOrientationMarkerWidget::Outside)
|
||||||
{
|
{
|
||||||
@@ -92,7 +91,6 @@ void ClickableOrientationMarkerWidget::OnLeftButtonDown() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
PressedFaceIndex = faceIndex;
|
PressedFaceIndex = faceIndex;
|
||||||
vtkErrorMacro("face index:" <<faceIndex);
|
|
||||||
obj->InvokeEvent(vtkCommand::PickEvent,&PressedFaceIndex);
|
obj->InvokeEvent(vtkCommand::PickEvent,&PressedFaceIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ VolumeRenderingToolBar::VolumeRenderingToolBar(QWidget *parent) : QToolBar(paren
|
|||||||
group->addButton(btnRotate,1);
|
group->addButton(btnRotate,1);
|
||||||
group->addButton(btnZoom,2);
|
group->addButton(btnZoom,2);
|
||||||
group->addButton(btnPan,3);
|
group->addButton(btnPan,3);
|
||||||
|
group->addButton(btnWindow,1024);
|
||||||
group->setExclusive(true);
|
group->setExclusive(true);
|
||||||
|
|
||||||
connect(group, static_cast<void(QButtonGroup::*)(int)>(&QButtonGroup::buttonClicked),this,&VolumeRenderingToolBar::modeButtonClicked);
|
connect(group, static_cast<void(QButtonGroup::*)(int)>(&QButtonGroup::buttonClicked),this,&VolumeRenderingToolBar::modeButtonClicked);
|
||||||
|
|||||||
Reference in New Issue
Block a user