33 mDataManager = dataManager;
34 mAlwaysUseDefaultCenter =
false;
35 mUseTooltipOffset =
true;
36 connect(mDataManager.get(), SIGNAL(centerChanged()),
this, SLOT(centerChangedSlot()) ) ;
37 connect(mDataManager.get(), SIGNAL(clinicalApplicationChanged()),
this, SLOT(clinicalApplicationChangedSlot()));
39 mDefaultCenter = mDataManager->getCenter();
40 this->centerChangedSlot();
49 void SliceProxy::initCutplane()
51 mCutplane->setFixedCenter(mDefaultCenter);
52 mCutplane->setToolPosition(getSyntheticToolPos(mDefaultCenter));
60 disconnect(mTool.get(), SIGNAL(
toolVisible(
bool)),
this, SLOT(toolVisibleSlot(
bool)));
61 disconnect(mTool.get(), SIGNAL(tooltipOffset(
double)),
this, SLOT(tooltipOffsetSlot(
double)));
62 disconnect(mTool.get(), SIGNAL(toolProbeSector()),
this, SLOT(changed()));
70 connect(mTool.get(), SIGNAL(
toolVisible(
bool)),
this, SLOT(toolVisibleSlot(
bool)));
71 connect(mTool.get(), SIGNAL(tooltipOffset(
double)),
this, SLOT(tooltipOffsetSlot(
double)));
72 connect(mTool.get(), SIGNAL(toolProbeSector()),
this, SLOT(changed()));
75 toolTransformAndTimestampSlot(mTool->get_prMt(), 0);
76 tooltipOffsetSlot(mTool->getTooltipOffset());
79 this->centerChangedSlot();
83 void SliceProxy::toolTransformAndTimestampSlot(
Transform3D prMt,
double timestamp)
92 mCutplane->setToolPosition(rMt);
98 void SliceProxy::tooltipOffsetSlot(
double val)
100 if (mUseTooltipOffset)
102 mCutplane->setToolOffset(val);
111 tooltipOffsetSlot(0);
113 mUseTooltipOffset = use;
116 tooltipOffsetSlot(mTool->getTooltipOffset());
120 void SliceProxy::toolVisibleSlot(
bool visible)
137 this->centerChangedSlot();
142 mAlwaysUseDefaultCenter = on;
143 this->centerChangedSlot();
146 void SliceProxy::centerChangedSlot()
148 if (mAlwaysUseDefaultCenter)
150 mCutplane->setFixedCenter(mDefaultCenter);
154 Vector3D c = mDataManager->getCenter();
155 mCutplane->setFixedCenter(c);
162 void SliceProxy::clinicalApplicationChangedSlot()
164 mCutplane->setClinicalApplication(mDataManager->getClinicalApplication());
171 disconnect(mDataManager.get(), SIGNAL(clinicalApplicationChanged()),
this, SLOT(clinicalApplicationChangedSlot()));
173 mCutplane->setClinicalApplication(application);
181 Vector3D gravityDir = -mDataManager->getOperatingTable().getVectorUp();
188 mCutplane->initializeFromPlane(plane,
189 useGravity, gravityDir,
190 useViewOffset, viewportHeight, toolViewOffset,
191 mDataManager->getClinicalApplication());
209 mCutplane->setOrientationType(orientation);
215 mCutplane->setPlaneType(plane);
221 mCutplane->setFollowType(followType);
227 mCutplane->setGravity(use, dir);
232 mCutplane->setToolViewOffset(use, viewportHeight, toolViewOffset);
238 mCutplane->setToolViewportHeight(viewportHeight);
255 void SliceProxy::changed()
258 if (
similar(plane, mLastEmittedSlicePlane))
260 mLastEmittedSlicePlane = plane;
266 os << indent <<
"sliceproxy" << std::endl;
267 os << indent <<
"sMr: " << std::endl;