35 #include <ctkPluginContext.h>
56 std::cout <<
"VisualizationImplService got no viewManager" << std::endl;
77 return viewManager()->
get3DView(group, index);
96 CX_LOG_DEBUG() <<
"About to destruct the visualizationservice and viewmanager, making sure timers are stopped.";
167 if (threshold.size()==1)
169 if (threshold.size()==2)
178 void VisualizationImplService::onSessionChanged()
181 void VisualizationImplService::onSessionCleared()
183 viewManager()->
clear();
185 void VisualizationImplService::onSessionLoad(QDomElement& node)
187 XMLNodeParser root(node);
188 QDomElement viewManagerNode = root.descend(
"managers/viewManager").node().toElement();
189 if (!viewManagerNode.isNull())
190 viewManager()->
parseXml(viewManagerNode);
192 void VisualizationImplService::onSessionSave(QDomElement& node)
194 XMLNodeAdder root(node);
195 QDomElement managerNode = root.descend(
"managers").node().toElement();
196 viewManager()->
addXml(managerNode);
virtual void removePreview()
virtual int getActiveGroup() const
static VisualizationServiceOldPtr create(CoreServicesPtr backend)
boost::shared_ptr< class ViewGroupData > ViewGroupDataPtr
virtual InteractiveCropperPtr getCropper()
void isLoading(QDomElement &root)
emitted while loading a session. Xml storage is available, getRootFolder() is set to loaded value...
void activeViewChanged()
emitted when the active view changes
static RepManager * getInstance()
get the only instance of this class
boost::shared_ptr< class LayoutRepository > LayoutRepositoryPtr
virtual CyclicActionLoggerPtr getRenderTimer()
void renderingEnabledChanged()
emitted then rendering is enabled/disabled
virtual void setPreview(ImagePtr image, const std::vector< double > &threshold)
void fps(int number)
Emits number of frames per second.
NavigationPtr getNavigation()
LayoutRepositoryPtr getLayoutRepository()
virtual bool renderingIsEnabled() const
virtual void autoShowData(DataPtr data)
void activeLayoutChanged()
emitted when the active layout changes
virtual void enableRender(bool val)
QActionGroup * createInteractorStyleActionGroup()
void fps(int number)
Emits number of frames per second.
boost::shared_ptr< class Image > ImagePtr
CameraControlPtr getCameraControl()
static SessionStorageServicePtr create(ctkPluginContext *pluginContext)
boost::shared_ptr< class InteractiveClipper > InteractiveClipperPtr
boost::shared_ptr< class View > ViewPtr
void autoShowData(DataPtr data)
boost::shared_ptr< class Navigation > NavigationPtr
virtual ViewGroupDataPtr getGroup(int groupIdx) const
VisualizationImplService(ctkPluginContext *context)
virtual void setActiveLayout(const QString &uid, int widgetIndex)
void sessionChanged()
emitted after change to a new session (new or loaded or cleared)
virtual QWidget * getLayoutWidget(QWidget *parent, int index)
virtual InteractiveClipperPtr getClipper()
void addXml(QDomNode &parentNode)
boost::shared_ptr< class Data > DataPtr
void parseXml(QDomNode viewmanagerNode)
QWidget * getLayoutWidget(QWidget *parent, int index)
virtual ViewPtr get3DView(int group=0, int index=0)
InteractiveClipperPtr getClipper()
static CoreServicesPtr create(ctkPluginContext *context)
boost::shared_ptr< class CyclicActionLogger > CyclicActionLoggerPtr
virtual QActionGroup * createInteractorStyleActionGroup()
virtual NavigationPtr getNavigation()
boost::shared_ptr< class InteractiveCropper > InteractiveCropperPtr
InteractiveCropperPtr getCropper()
void setActiveLayout(const QString &uid, int widgetIndex=0)
change the layout
void cleared()
emitted when session is cleared, before isLoading is called
virtual int getActiveViewGroup() const
virtual QString getActiveLayout(int widgetIndex) const
boost::shared_ptr< class CameraControl > CameraControlPtr
void activeViewChanged()
emitted when the active view changes
void enableRender(bool val)
CyclicActionLoggerPtr getRenderTimer()
virtual LayoutRepositoryPtr getLayoutRepository()
boost::shared_ptr< class CoreServices > CoreServicesPtr
bool renderingIsEnabled() const
virtual ViewGroupDataPtr getViewGroup(int groupIdx) const
void activeLayoutChanged()
emitted when the active layout changes
virtual ~VisualizationImplService()
void isSaving(QDomElement &root)
xml storage is available
virtual CameraControlPtr getCameraControl()
virtual void aboutToStop()
ViewPtr get3DView(int group=0, int index=0)
void renderingEnabledChanged()
emitted then rendering is enabled/disabled
QString getActiveLayout(int widgetIndex=0) const
returns the active layout
ThresholdPreviewPtr getThresholdPreview()
Get the ThresholdPreview object.