Commit 58d78a0b authored by promayon's avatar promayon
Browse files

FIXED Slice interactive viewer can now show all additional properties as well...

FIXED Slice interactive viewer can now show all additional properties as well as Geometry interactive viewer
FIXED metasyntaxical variable not needed

git-svn-id: svn+ssh://scm.forge.imag.fr/var/lib/gforge/chroot/scmrepos/svn/camitk/trunk/camitk@227 ec899d31-69d1-42ba-9299-647d76f65fb3
parent 6e8094bd
......@@ -53,7 +53,6 @@ public slots:
private:
/// helper method to simplify the target component processing
virtual void process(ImageComponent * comp);
int toto;
};
#endif // VOLUMERENDERINGACTION_H
This diff is collapsed.
......@@ -233,7 +233,7 @@ void InteractiveViewer::initSettings() {
RendererWidget::CameraOrientation cameraOrientation;
cameraOrientation = (RendererWidget::CameraOrientation) settings.value("cameraOrientation", rendererWidget->getCameraOrientation()).toInt();
rendererWidget->setCameraOrientation(cameraOrientation);
// highlight mode
highlightMode = (HighlightMode) settings.value("highlightMode", SELECTION).toInt();
......@@ -356,14 +356,14 @@ QWidget * InteractiveViewer::getWidget(QWidget * parent) {
// add the text as whatsThis
frame->setWhatsThis(whatsThis);
}
else {
if (frame->parentWidget() != parent) {
bool isVisible = frame->isVisible();
//frame->parentWidget()->layout()->removeWidget(frame);
frame->setParent(parent);
//parent->layout()->addWidget(frame);
frame->setVisible(isVisible);
}
else {
if (frame->parentWidget() != parent) {
bool isVisible = frame->isVisible();
//frame->parentWidget()->layout()->removeWidget(frame);
frame->setParent(parent);
//parent->layout()->addWidget(frame);
frame->setVisible(isVisible);
}
}
return frame;
......@@ -435,15 +435,15 @@ void InteractiveViewer::refresh(Viewer * v) {
addActor(comp, comp->getProp(i));
}
else {
if (comp->getRepresentation() == Component::SLICE)
{
if (comp->getRepresentation() == Component::SLICE) {
addActor(comp, comp->get3DImageActor());
// TODO : Nicolas, handle vtk prop for volume rendering in a dedicated interface
// => Create a specific vtkactor for each vtk image data
for (unsigned int i=0; i<comp->getNumberOfProp(); i++)
addActor(comp, comp->getProp(i));
}
// TODO : Nicolas, handle vtk prop for volume rendering in a dedicated interface
// => Create a specific vtkactor for each vtk image data
for (unsigned int i=0; i<comp->getNumberOfProp(); i++)
addActor(comp, comp->getProp(i));
}
}
}
}
......@@ -458,23 +458,26 @@ void InteractiveViewer::refresh(Viewer * v) {
}
// only display the last selected (if exists otherwise the last added)
int i = Application::getSelectedComponents().size() - 1;
int idOfLastSelected = Application::getSelectedComponents().size() - 1;
if (i >= 0) {
while (i >= 0 && !(Application::getSelectedComponents()[i]->getVisibility(this) && Application::getSelectedComponents()[i]->getRepresentation() == Component::SLICE)) {
i--;
if (idOfLastSelected >= 0) {
while (idOfLastSelected >= 0 && !(Application::getSelectedComponents()[idOfLastSelected]->getVisibility(this) && Application::getSelectedComponents()[idOfLastSelected]->getRepresentation() == Component::SLICE)) {
idOfLastSelected--;
}
}
if (i >= 0) {
if (idOfLastSelected >= 0) {
// there is valid Component to display
Component *comp = Application::getSelectedComponents()[i];
Component *comp = Application::getSelectedComponents()[idOfLastSelected];
// add both the slices, the plane used for picking and the pixel highlighter
addActor(comp, comp->getPixelActor());
addActor(comp, comp->get2DImageActor());
addActor(comp, comp->getPickPlaneActor());
for (unsigned int i = 0; i < comp->getNumberOfProp(); i++)
addActor(comp, comp->getProp(i));
// set the slider range and update widgets values
sliceSlider->setRange(0, comp->getNumberOfSlices() - 1);
sliceSlider->setValue(comp->getSlice());
......@@ -482,21 +485,24 @@ void InteractiveViewer::refresh(Viewer * v) {
else {
// no selection, get the last added Component
i = allComponents.size() - 1;
idOfLastSelected = allComponents.size() - 1;
while (i >= 0 && !(allComponents[i]->getVisibility(this) && allComponents[i]->getRepresentation() == Component::SLICE)) {
i--;
while (idOfLastSelected >= 0 && !(allComponents[idOfLastSelected]->getVisibility(this) && allComponents[idOfLastSelected]->getRepresentation() == Component::SLICE)) {
idOfLastSelected--;
}
if (i >= 0) {
if (idOfLastSelected >= 0) {
// there is valid Component to display
Component *comp = allComponents[i];
Component *comp = allComponents[idOfLastSelected];
// add both the slices, the plane used for picking and the pixel highlighter
addActor(comp, comp->getPixelActor());
addActor(comp, comp->get2DImageActor());
addActor(comp, comp->getPickPlaneActor());
for (unsigned int i = 0; i < comp->getNumberOfProp(); i++)
addActor(comp, comp->getProp(i));
// set the slider range and update widgets values
sliceSlider->setRange(0, comp->getNumberOfSlices() - 1);
sliceSlider->setValue(comp->getSlice());
......@@ -738,9 +744,9 @@ void InteractiveViewer::initActions() {
cameraOrientationRightDownAction->setChecked(rendererWidget->getCameraOrientation() == RendererWidget::RIGHT_DOWN);
cameraOrientationRightDownAction->setStatusTip(tr("Set the camera such as x points to the right, y points downward, z points backward"));
cameraOrientationRightDownAction->setWhatsThis(tr("Set the camera such as x points to the right, y points downward, z points backward"));
cameraOrientationLeftUpAction = new QAction(tr("x-left y-up z-back"), cameraOrientationGrp);
cameraOrientationLeftUpAction->setCheckable(true);
cameraOrientationLeftUpAction->setCheckable(true);
cameraOrientationLeftUpAction->setChecked(rendererWidget->getCameraOrientation() == RendererWidget::LEFT_UP);
cameraOrientationLeftUpAction->setStatusTip(tr("Set the camera such as x points to the left, y points upward, z points backward"));
cameraOrientationLeftUpAction->setWhatsThis(tr("Set the camera such as x points to the left, y points upward, z points backward"));
......@@ -750,8 +756,8 @@ void InteractiveViewer::initActions() {
cameraOrientationRightUpAction->setChecked(rendererWidget->getCameraOrientation() == RendererWidget::RIGHT_UP);
cameraOrientationRightUpAction->setStatusTip(tr("Set the camera such as x points to the right, y points upward, z points to the front"));
cameraOrientationRightUpAction->setWhatsThis(tr("Set the camera such as x points to the right, y points upward, z points to the front"));
//-- others
//-- others
backgroundColorAction = new QAction(tr("Background &Color"), this);
backgroundColorAction->setStatusTip(tr("Change background color"));
backgroundColorAction->setWhatsThis(tr("Change the color background of the InteractiveViewer"));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment