fw4spl
visuVTKAdaptor::SImageText Class Reference

Adaptor to display window image information (width, heigth, picked position) More...

#include <SImageText.hpp>

+ Inheritance diagram for visuVTKAdaptor::SImageText:
+ Collaboration diagram for visuVTKAdaptor::SImageText:

Public Member Functions

virtual bool isA (const std::string &type) const override
 
- Public Member Functions inherited from visuVTKAdaptor::SText
virtual VISUVTKADAPTOR_API void setText (const std::string &str)
 
std::string getText () const
 
- Public Member Functions inherited from fwRenderVTK::IAdaptor
FWRENDERVTK_API void setRenderService (SRender::sptr service)
 Sets the assiciated render service. More...
 
FWRENDERVTK_API SRender::sptr getRenderService () const
 Returd the associated render service.
 
FWRENDERVTK_API void setRendererId (SRender::RendererIdType newID)
 Sets the renderer identifier.
 
FWRENDERVTK_API SRender::RendererIdType getRendererId () const
 Returns the renderer identifier.
 
FWRENDERVTK_API vtkRenderer * getRenderer ()
 Returns the renderer.
 
FWRENDERVTK_API void setPickerId (SRender::PickerIdType newID)
 Sets the identifier of the picker used by this adaptor.
 
FWRENDERVTK_API SRender::PickerIdType getPickerId () const
 Gets the identifier of the picker used by this adaptor.
 
FWRENDERVTK_API vtkAbstractPropPicker * getPicker (std::string pickerId="")
 Get the picker. More...
 
FWRENDERVTK_API void setTransformId (SRender::VtkObjectIdType newID)
 Sets the identifier of the transform used by this adaptor.
 
FWRENDERVTK_API SRender::VtkObjectIdType getTransformId () const
 Returns the identifier of the transform used by this adaptor.
 
FWRENDERVTK_API vtkTransform * getTransform ()
 Returns the transform used by this adaptor.
 
FWRENDERVTK_API vtkObject * getVtkObject (const SRender::VtkObjectIdType &objectId) const
 Returns the vtk object defined by 'objectId' in the vtk scene.
 
FWRENDERVTK_API vtkRenderWindowInteractor * getInteractor ()
 Returns the render interactor.
 
FWRENDERVTK_API IAdaptor::sptr getAssociatedAdaptor (vtkProp *prop, int depth)
 Returns the adaptor associated to the vtkProp. More...
 
FWRENDERVTK_API void getAllSubProps (vtkPropCollection *propc, int depth=-1)
 Gets all the vtkProp associated to this adaptor. More...
 
FWRENDERVTK_API void setVtkPipelineModified ()
 End-user have to call this method when a vtk structure has been modified, thus a render request will be sent.
 
FWRENDERVTK_API bool getAutoRender () const
 Returns true if the service automatically triggers the rendering.
 
- Public Member Functions inherited from fwServices::IService
FWSERVICES_API void registerInput (const ::fwData::Object::csptr &obj, const std::string &key, const bool autoConnect=false, const bool optional=false)
 Register an input object for this service. More...
 
FWSERVICES_API void registerInOut (const ::fwData::Object::sptr &obj, const std::string &key, const bool autoConnect=false, const bool optional=false)
 Register an in/out object for this service. More...
 
FWSERVICES_API void setConfiguration (const ::fwRuntime::ConfigurationElement::sptr _cfgElement)
 Affect the configuration, using a generic XML like structure. More...
 
FWSERVICES_API void setConfiguration (const Config &_configuration)
 Set the configuration. More...
 
FWSERVICES_API void setConfiguration (const ConfigType &ptree)
 Affect the configuration, using a boost property tree. More...
 
FWSERVICES_API void configure ()
 Invoke configuring() if m_globalState == STOPPED. Invoke reconfiguring() if m_globalState == STARTED. Does nothing otherwise. More...
 
FWSERVICES_API SharedFutureType start ()
 Invoke starting() if m_globalState == STOPPED. Does nothing otherwise. More...
 
FWSERVICES_API SharedFutureType stop ()
 Invoke stopping() if m_globalState == STARTED. Does nothing otherwise. Stops all observations. More...
 
FWSERVICES_API SharedFutureType update ()
 Invoke updating() if m_globalState == STARTED. Does nothing otherwise. More...
 
FWSERVICES_API SharedFutureType swap (::fwData::Object::sptr _obj)
 Associate the service to another object. More...
 
FWSERVICES_API SharedFutureType swapKey (const KeyType &_key,::fwData::Object::sptr _obj)
 Associate the service to another object. More...
 
FWSERVICES_API GlobalStatus getStatus () const noexcept
 Return the global process status. More...
 
FWSERVICES_API bool isStarted () const noexcept
 Test if the service is started or not. More...
 
FWSERVICES_API bool isStopped () const noexcept
 Test if the service is stopped or not. More...
 
FWSERVICES_API ConfigurationStatus getConfigurationStatus () const noexcept
 Return the configuration process status. More...
 
FWSERVICES_API UpdatingStatus getUpdatingStatus () const noexcept
 Return the update process status. More...
 
FWSERVICES_API::fwRuntime::ConfigurationElement::sptr getConfiguration () const
 Return the configuration, in an xml format read using runtime library. More...
 
FWSERVICES_API ConfigType getConfigTree () const
 Return the configuration, in an boost property tree.
 
FWSERVICES_API::fwData::Object::sptr getObject ()
 Return the object associated to service. More...
 
template<class DATATYPE >
std::shared_ptr< DATATYPE > getObject ()
 Return the object associated to service. The object is casted. More...
 
FWSERVICES_API const InputMapType & getInputs () const
 Return the inputs map associated to service. More...
 
FWSERVICES_API const InOutMapType & getInOuts () const
 Return the inouts map associated to service. More...
 
FWSERVICES_API const OutputMapType & getOutputs () const
 Return the outouts map associated to service. More...
 
FWSERVICES_API std::vector< ::fwData::Object::csptr > getObjects () const
 Return the objects associated to service. More...
 
template<class DATATYPE >
std::shared_ptr< const DATATYPE > getInput (const KeyType &key) const
 Return the input object at the given key. Asserts if the data is not of the right type. More...
 
template<class DATATYPE >
std::shared_ptr< DATATYPE > getInOut (const KeyType &key) const
 Return the inout object at the given key. Asserts if the data is not of the right type. More...
 
template<class DATATYPE >
std::shared_ptr< DATATYPE > getOutput (const KeyType &key) const
 Return the output object at the given key. Asserts if the data is not of the right type. More...
 
template<class DATATYPE >
std::shared_ptr< const DATATYPE > getInput (const KeyType &keybase, size_t index) const
 Return the input object at the given key. Asserts if the data is not of the right type. More...
 
template<class DATATYPE >
std::shared_ptr< DATATYPE > getInOut (const KeyType &keybase, size_t index) const
 Return the inout object at the given key. Asserts if the data is not of the right type. More...
 
template<class DATATYPE >
std::shared_ptr< DATATYPE > getOutput (const KeyType &keybase, size_t index) const
 Return the output object at the given key. Asserts if the data is not of the right type. More...
 
FWSERVICES_API void setOutput (const ::fwServices::IService::KeyType &key, const ::fwData::Object::sptr &object, size_t index=0)
 Register an output object at a given key in the OSR, replacing it if it already exists. More...
 
size_t getKeyGroupSize (const KeyType &keybase) const
 Return the number of key in a group of keys. More...
 
FWSERVICES_API void setWorker (std::shared_ptr< ::fwThread::Worker > worker)
 Initializes m_associatedWorker and associates this worker to all service slots.
 
FWSERVICES_API std::shared_ptr< ::fwThread::WorkergetWorker () const
 Returns associate worker.
 
virtual FWSERVICES_API KeyConnectionsType getObjSrvConnections () const
 Returns proposals to connect service slots to associated object signals, this method is used for obj/srv auto connection. More...
 
FWSERVICES_API bool hasObjectId (const KeyType &_key) const
 Return true if the object with the given key has an identifier. More...
 
FWSERVICES_API IdType getObjectId (const KeyType &_key) const
 Return the id of the object, throw if it is not found.
 
FWSERVICES_API void setObjectId (const KeyType &_key, const IdType &_id)
 Set the id of an object key.
 
- Public Member Functions inherited from fwTools::Object
- Public Member Functions inherited from fwCore::BaseObject
- Public Member Functions inherited from fwCom::HasSlots
std::shared_ptr< SlotBaseslot (const Slots::SlotKeyType &key) const
 
template<typename SlotType >
std::shared_ptr< SlotType > slot (const Slots::SlotKeyType &key) const
 
template<typename F , typename A >
std::shared_ptr< Slot< typename::fwCom::util::convert_function_type< F >::type > > newSlot (const Slots::SlotKeyType &key, F f, A a)
 
- Public Member Functions inherited from fwCom::HasSignals
std::shared_ptr< SignalBasesignal (const Signals::SignalKeyType &key) const
 
template<typename SignalType >
std::shared_ptr< SignalType > signal (const Signals::SignalKeyType &key) const
 
template<typename SignalType >
std::shared_ptr< SignalType > newSignal (const Signals::SignalKeyType &key)
 
- Public Member Functions inherited from fwServices::IHasServices
const ServiceVector & getRegisteredServices () const
 Get all subservices linked to this service. More...
 
FWSERVICES_API std::shared_ptr< const ::fwServices::IServicegetRegisteredService (const ::fwTools::fwID::IDType &_id) const
 Return a specific registered service. More...
 
- Public Member Functions inherited from fwDataTools::helper::MedicalImageAdaptor
virtual FWDATATOOLS_API ~MedicalImageAdaptor ()
 Destructor. Do nothing.
 
virtual FWDATATOOLS_API void setOrientation (Orientation orientation)
 Set the image orientation.
 
Orientation getOrientation () const
 Return the image orientation.
 
FWDATATOOLS_API void setTransferFunction (const ::fwData::TransferFunction::sptr &tf)
 Set the current TransferFunction.
 

Static Public Member Functions

static bool isTypeOf (const std::string &type)
 
- Static Public Member Functions inherited from visuVTKAdaptor::SText
static bool isTypeOf (const std::string &type)
 
static const std::string & leafClassname ()
 return object's classname without its namespace, i.e. BaseObject
 
static const std::string & classname ()
 return object's classname without its namespace, i.e. BaseObject
 
- Static Public Member Functions inherited from fwRenderVTK::IAdaptor
static bool isTypeOf (const std::string &type)
 
static const std::string & leafClassname ()
 return object's classname without its namespace, i.e. BaseObject
 
static const std::string & classname ()
 return object's classname without its namespace, i.e. BaseObject
 
- Static Public Member Functions inherited from fwServices::IService
static bool isTypeOf (const std::string &type)
 
static const std::string & leafClassname ()
 return object's classname without its namespace, i.e. BaseObject
 
static const std::string & classname ()
 return object's classname without its namespace, i.e. BaseObject
 
- Static Public Member Functions inherited from fwTools::Object
static bool isTypeOf (const std::string &type)
 
static const std::string & classname ()
 return full object's classname with its namespace, i.e. fwCore::BaseObject
 
- Static Public Member Functions inherited from fwCore::BaseObject
static bool isTypeOf (const std::string &type)
 
static const std::string & leafClassname ()
 return object's classname without its namespace, i.e. BaseObject
 
static const std::string & classname ()
 return object's classname without its namespace, i.e. BaseObject
 
- Static Public Member Functions inherited from fwDataTools::helper::MedicalImageAdaptor
static bool isTypeOf (const std::string &type)
 
static const std::string & leafClassname ()
 return object's classname without its namespace, i.e. BaseObject
 
static const std::string & classname ()
 return object's classname without its namespace, i.e. BaseObject
 

Protected Member Functions

VISUVTKADAPTOR_API void configuring () override
 Configure the service before starting. Apply the configuration to service. More...
 
VISUVTKADAPTOR_API void starting () override
 Initialize the service activity. More...
 
VISUVTKADAPTOR_API void updating () override
 Perform some computations according to object (this service is attached to) attribute values and its internal state. More...
 
VISUVTKADAPTOR_API void stopping () override
 Uninitialize the service activity. The stop() method is always invoked before destroying a service. More...
 
VISUVTKADAPTOR_API void swapping (const KeyType &key) override
 Select the current tf.
 
virtual VISUVTKADAPTOR_API KeyConnectionsMap getAutoConnections () const override
 Returns proposals to connect service slots to associated object signals, this method is used for obj/srv auto connection. More...
 
virtual VISUVTKADAPTOR_API void updateTFPoints () override
 Update the text according to the new windowing.
 
virtual VISUVTKADAPTOR_API void updateTFWindowing (double window, double level) override
 Update the text according to the new windowing.
 
Slots
void updateSliceIndex (int axial, int frontal, int sagittal)
 Slot: update image slice index.
 
- Protected Member Functions inherited from fwRenderVTK::IAdaptor
FWRENDERVTK_API IAdaptor () noexcept
 constructor
 
virtual FWRENDERVTK_API ~IAdaptor () noexcept
 destructor
 
FWRENDERVTK_API void configureParams ()
 Parse the xml configuration for renderer, picker and transform.
 
FWRENDERVTK_API void initialize ()
 Initialize the adaptor with the associated render service. (must be call in starting).
 
FWRENDERVTK_API void registerProp (vtkProp *prop)
 Registers the vtkProp.
 
FWRENDERVTK_API void unregisterProps ()
 Unregisters all the vtkProp.
 
FWRENDERVTK_API void addToRenderer (vtkProp *prop)
 Adds the vtkProp to the renderer.
 
FWRENDERVTK_API void removeAllPropFromRenderer ()
 Removes all the vtkProp from the renderer.
 
FWRENDERVTK_API void addToPicker (vtkProp *prop, std::string pickerId="")
 Adds the vtkProp to the picking list. More...
 
FWRENDERVTK_API void removeFromPicker (vtkProp *prop, std::string pickerId="")
 Removes the vtkProp to the picking list. More...
 
FWRENDERVTK_API void requestRender ()
 notify a render request iff vtkPipeline is modified
 
- Protected Member Functions inherited from fwServices::IService
FWSERVICES_API IService ()
 IService constructor. More...
 
virtual FWSERVICES_API ~IService ()
 IService desctructor. More...
 
virtual void swapping ()
 Swap the service from associated object to another object. More...
 
virtual FWSERVICES_API void reconfiguring ()
 Reconfigure the service activity when is started. More...
 
virtual FWSERVICES_API void info (std::ostream &_sstream)
 Write information in a stream. More...
 
- Protected Member Functions inherited from fwTools::fwID
FWTOOLS_API bool hasID () const
 Return true if the object has an id set. More...
 
FWTOOLS_API IDType getID (Policy policy=GENERATE) const
 Returns the id of the object. If it is not set and the policy value is. More...
 
virtual FWTOOLS_API void setID (IDType newID)
 Set a newID for the object, (newID must not exist in fwID), the oldest one is released. More...
 
FWTOOLS_API void resetID ()
 Release the id for the object. More...
 
 fwID ()
 Constructor : does nothing.
 
- Protected Member Functions inherited from fwCom::HasSlots
 HasSlots (const HasSlots &)
 Copy constructor forbidden.
 
HasSlotsoperator= (const HasSlots &)
 Copy operator forbidden.
 
- Protected Member Functions inherited from fwCom::HasSignals
 HasSignals (const HasSignals &)
 Copy constructor forbidden.
 
HasSignalsoperator= (const HasSignals &)
 Copy operator forbidden.
 
- Protected Member Functions inherited from fwServices::IHasServices
FWSERVICES_API IHasServices () noexcept
 Constructor.
 
virtual FWSERVICES_API ~IHasServices () noexcept
 Destructor.
 
FWSERVICES_API std::shared_ptr< ::fwServices::IServiceregisterService (const std::string &_implType, const std::string &_id="")
 Register a new service linked to this service. More...
 
template<class T >
std::shared_ptr< T > registerService (const std::string &_implType, const std::string &_id="")
 Register a new service linked to this service. More...
 
FWSERVICES_API void unregisterService (const ::fwTools::fwID::IDType &_id)
 Unregister a specific service. More...
 
FWSERVICES_API void unregisterService (const ::fwServices::IService::sptr &_service)
 Unregister a specific service. More...
 
FWSERVICES_API void unregisterServices (const std::string &_implType="")
 Unregister all services linked to this service, optionally matches only a given type of services. More...
 
- Protected Member Functions inherited from fwDataTools::helper::MedicalImageAdaptor
FWDATATOOLS_API MedicalImageAdaptor ()
 Constructor. Do nothing.
 
FWDATATOOLS_API void setOrientation (int orientation)
 Set the orientation of the image. More...
 
FWDATATOOLS_API void getImageSpacing (double spacing[3]) const
 Get the image spacing. More...
 
FWDATATOOLS_API void getImageOrigin (double origin[3]) const
 Get the image origin. More...
 
FWDATATOOLS_API void getImageDataSize (int size[3]) const
 Get the image data size (number of slices). More...
 
FWDATATOOLS_API void getImageSize (double size[3]) const
 Get the image size ( = dataSize * spacing ). More...
 
FWDATATOOLS_API void getCurrentSliceCenter (double center[3])
 Get the slice center. More...
 
FWDATATOOLS_API void worldToSliceIndex (const double world[3], int index[3])
 Convert world coordinates to slice index coordinates. More...
 
FWDATATOOLS_API void worldToImageSliceIndex (const double world[3], int index[3])
 Convert coordinates in the world to coordinates in the image. More...
 
FWDATATOOLS_API void sliceIndexToWorld (const int index[3], double world[3])
 Convert from world coordinates system to image coordinates system. More...
 
FWDATATOOLS_API::fwData::Image::sptr getImage () const
 Return the image.
 
template<typename FLOAT_ARRAY_3 >
void getImageSpacing (FLOAT_ARRAY_3 spacing)
 Get the image spacing. More...
 
template<typename INT_INDEX >
void getImageDataSize (INT_INDEX size)
 Get the image data size (number of slices). More...
 
template<typename WORLD , typename INT_INDEX >
void worldToSliceIndex (const WORLD world, INT_INDEX *index)
 Convert world coordinates to slice index coordinates. More...
 
template<typename WORLD , typename INT_INDEX >
void worldToImageSliceIndex (const WORLD world, INT_INDEX *index)
 Convert coordinates in the world to coordinates in the image. More...
 
FWDATATOOLS_API void getPlane (double points[4][3], int sliceNumber)
 Return the 4 points of the image plane. More...
 
FWDATATOOLS_API bool setSliceIndex (const int index[3])
 Set the slice index.
 
FWDATATOOLS_API void getSliceIndex (::fwData::Integer::sptr index[3])
 Get the slice index.
 
FWDATATOOLS_API void updateImageInfos (::fwData::Image::sptr image)
 Update the image information (slice index, min/max,...)
 
FWDATATOOLS_API void createTransferFunction (::fwData::Image::sptr image)
 Create and set the default transfer function. More...
 
FWDATATOOLS_API void setOrCreateTF (const ::fwData::TransferFunction::sptr &_tf, const fwData::Image::sptr &_image)
 Sets the transfer function, creates one if _tf is null (. More...
 
FWDATATOOLS_API::fwData::TransferFunction::sptr getTransferFunction () const
 Get the current transfer function.
 
FWDATATOOLS_API void installTFConnections ()
 Install connections to listen TF modifications.
 
FWDATATOOLS_API void removeTFConnections ()
 Remove the TF connections.
 
FWDATATOOLS_API void installTFSlots (::fwCom::HasSlots *hasslots)
 Install the slots to managed TF modifications. More...
 

Friends

template<class , class , class >
class ::fwTools::ClassFactory
 
class ::fwTools::Factory
 

Demangling methods

virtual const std::string & getLeafClassname () const override
 return object's classname without its namespace, i.e. BaseObject
 
virtual const std::string & getClassname () const override
 return full object's classname with its namespace, i.e. fwCore::BaseObject
 
static const std::string & leafClassname ()
 return object's classname without its namespace, i.e. BaseObject
 
static const std::string & classname ()
 return object's classname without its namespace, i.e. BaseObject
 

Additional Inherited Members

- Public Types inherited from fwRenderVTK::IAdaptor
typedef fwServices::IService SuperClass
 
- Public Types inherited from fwServices::IService
enum  AccessType : std::uint8_t { INPUT, OUTPUT, INOUT }
 
typedef ::boost::property_tree::ptree ConfigType
 
typedef std::string IdType
 
typedef std::string KeyType
 
typedef std::map< KeyType, std::weak_ptr< const ::fwData::Object > > InputMapType
 
typedef std::map< KeyType, std::weak_ptr< ::fwData::Object > > InOutMapType
 
typedef std::map< KeyType, std::shared_ptr< ::fwData::Object > > OutputMapType
 
enum  GlobalStatus {
  STARTED, STARTING, SWAPPING, STOPPED,
  STOPPING
}
 Defines all possible global status for a service, including transitions. More...
 
enum  UpdatingStatus { UPDATING, NOTUPDATING }
 Defines all possible status for an update process. More...
 
enum  ConfigurationStatus { CONFIGURING, CONFIGURED, UNCONFIGURED }
 Defines all possible status for a configuration process. More...
 
typedef ::fwCom::Signal< void()> StartedSignalType
 
typedef ::fwCom::Signal< void()> UpdatedSignalType
 
typedef ::fwCom::Signal< void()> StoppedSignalType
 
typedef std::shared_future< void > SharedFutureType
 Slot to call start method.
 
typedef std::packaged_task< void()> PackagedTaskType
 Slot to call start method.
 
typedef std::future< void > UniqueFutureType
 Slot to call start method.
 
typedef ::fwCom::Slot< SharedFutureType()> StartSlotType
 Slot to call start method.
 
typedef ::fwCom::Slot< SharedFutureType()> StopSlotType
 Slot to call start method.
 
typedef ::fwCom::Slot< SharedFutureType()> UpdateSlotType
 Slot to call start method.
 
typedef ::fwCom::Slot< SharedFutureType(::fwData::Object::sptr)> SwapSlotType
 Slot to call start method.
 
typedef ::fwCom::Slot< SharedFutureType(const KeyType &,::fwData::Object::sptr)> SwapKeySlotType
 Slot to call start method.
 
typedef ::fwCom::helper::SigSlotConnection::KeyConnectionsType KeyConnectionsType
 Returns proposals to connect service slots to associated object signals, this method is used for obj/srv auto connection. More...
 
- Public Types inherited from fwCom::HasSlots
typedef std::shared_ptr< HasSlotssptr
 
typedef std::shared_ptr< const HasSlotscsptr
 
- Public Types inherited from fwCom::HasSignals
typedef std::shared_ptr< HasSignalssptr
 
typedef std::shared_ptr< const HasSignalscsptr
 
- Public Types inherited from fwServices::IHasServices
typedef std::vector< std::weak_ptr< ::fwServices::IService > > ServiceVector
 
- Public Types inherited from fwDataTools::helper::MedicalImageAdaptor
enum  Orientation { X_AXIS = 0, Y_AXIS, Z_AXIS }
 Image orientation.
 
- Static Public Attributes inherited from fwServices::IService
static FWSERVICES_API const std::string s_DEFAULT_OBJECT = "defaultObject"
 
static FWSERVICES_APIconst::fwCom::Slots::SlotKeyType s_STARTED_SIG = "started"
 
static FWSERVICES_APIconst::fwCom::Slots::SlotKeyType s_UPDATED_SIG = "updated"
 
static FWSERVICES_APIconst::fwCom::Slots::SlotKeyType s_STOPPED_SIG = "stopped"
 
static FWSERVICES_APIconst::fwCom::Slots::SlotKeyType s_START_SLOT = "start"
 Slot to call start method.
 
static FWSERVICES_APIconst::fwCom::Slots::SlotKeyType s_STOP_SLOT = "stop"
 Slot to call start method.
 
static FWSERVICES_APIconst::fwCom::Slots::SlotKeyType s_UPDATE_SLOT = "update"
 Slot to call start method.
 
static FWSERVICES_APIconst::fwCom::Slots::SlotKeyType s_SWAP_SLOT = "swap"
 Slot to call start method.
 
static FWSERVICES_APIconst::fwCom::Slots::SlotKeyType s_SWAPKEY_SLOT = "swapKey"
 Slot to call start method.
 
- Protected Types inherited from fwTools::fwID
enum  Policy { EMPTY = 1, GENERATE, MUST_EXIST }
 
typedef std::string IDType
 
- Protected Types inherited from fwDataTools::helper::MedicalImageAdaptor
typedef ::fwCom::Slot< void()> UpdateTFPointsSlotType
 Slot called when transfer function points are modified.
 
typedef ::fwCom::Slot< void(double, double)> UpdateTFWindowingSlotType
 Slot called when transfer function points are modified.
 
- Static Protected Member Functions inherited from fwRenderVTK::IAdaptor
static FWRENDERVTK_API void getProps (vtkPropCollection *outPropc, vtkProp *inProp)
 Get all the vtkProp associated to the inProp (actors, actors2D, volumes) More...
 
- Static Protected Member Functions inherited from fwTools::fwID
static bool isTypeOf (const std::string &type)
 
static FWTOOLS_API bool exist (IDType _id)
 
static FWTOOLS_API std::shared_ptr< ::fwTools::ObjectgetObject (IDType requestID)
 Retrieve the object attached to the given id. Return a null sptr if no correspondence exist. More...
 
static const std::string & leafClassname ()
 return object's classname without its namespace, i.e. BaseObject
 
static const std::string & classname ()
 return object's classname without its namespace, i.e. BaseObject
 
- Protected Attributes inherited from visuVTKAdaptor::SText
std::string m_text
 Displayed text.
 
std::string m_path
 Seshat path, empty if not used.
 
vtkActor2D * m_actor
 
vtkTextMapper * m_mapper
 
unsigned int m_fontSize
 Font size (in points) applied to VTK text mapper.
 
std::string m_fontFamily
 Font family. Only 'arial', 'courier' and 'times' are supported for now.
 
bool m_italic
 Enables italic font.
 
bool m_bold
 Enables bold font.
 
bool m_shadow
 Enables text shadow.
 
std::string m_vAlign
 Vertical alignment.
 
std::string m_hAlign
 Horizontal alignment.
 
std::string m_textColor
 Text color (hex format #ffffff)
 
- Protected Attributes inherited from fwRenderVTK::IAdaptor
bool m_vtkPipelineModified
 state of the pipeline
 
SRender::RendererIdType m_rendererId
 
SRender::PickerIdType m_pickerId
 
SRender::VtkObjectIdType m_transformId
 
SRender::wptr m_renderService
 
vtkPropCollection * m_propCollection
 
::fwCom::helper::SigSlotConnection m_connections
 
- Protected Attributes inherited from fwServices::IService
::fwRuntime::ConfigurationElement::sptr m_configuration
 Configuration element used to configure service internal state using a generic XML like structure TODO Make this const, we are not supposed to edit that !
 
::fwData::Object::wptr m_associatedObject
 associated object of service More...
 
StartSlotType::sptr m_slotStart
 Slot to call start method.
 
StopSlotType::sptr m_slotStop
 Slot to call stop method.
 
UpdateSlotType::sptr m_slotUpdate
 Slot to call update method.
 
SwapSlotType::sptr m_slotSwap
 Slot to call swap method.
 
SwapKeySlotType::sptr m_slotSwapKey
 Slot to call swap method.
 
std::shared_ptr< ::fwThread::Workerm_associatedWorker
 Associated worker.
 
- Protected Attributes inherited from fwTools::Object
std::shared_ptr< ::fwTools::UUIDm_uuid
 UUID used to identify the object, notably for serialization.
 
- Protected Attributes inherited from fwCom::HasSlots
Slots m_slots
 
- Protected Attributes inherited from fwCom::HasSignals
Signals m_signals
 
- Protected Attributes inherited from fwDataTools::helper::MedicalImageAdaptor
Orientation m_orientation
 Image orientation.
 
::fwData::Integer::sptr m_axialIndex
 Axial slice index.
 
::fwData::Integer::sptr m_frontalIndex
 Frontal slice index.
 
::fwData::Integer::sptr m_sagittalIndex
 Sagittal slice index.
 
UpdateTFPointsSlotType::sptr m_slotUpdateTFPoints
 Slot called when transfer function points are modified.
 
UpdateTFWindowingSlotType::sptr m_slotUpdateTFWindowing
 Slot called when transfer function windowing is modified.
 

Detailed Description

Adaptor to display window image information (width, heigth, picked position)

Slots

XML Configuration

1 <service type="::visuVTKAdaptor::SImageText">
2  <inout key="image" uid="..." />
3  <inout key="tf" uid="..." optional="yes" />
4  <config renderer="default" text="@patient.name" color="#ff0000" fontSize="16" />
5 </service>

or

1 <service type="::visuVTKAdaptor::SImageText">
2  <inout key="image" uid="..." />
3  <inout key="tf" uid="..." optional="yes" />
4  <config renderer="default" vAlign='top' hAlign='center'>
5  <text>SText to display<text>
6 </service>

In-Out

  • image [fwData::Image]: image to display.
  • tf [fwData::TransferFunction] (optional): the current TransferFunction. If it is not defined, we use the image's default transferFunction (CT-GreyLevel). The transferFunction's signals are automatically connected to the slots 'updateTFPoints' and 'updateTFWindowing'.

Configuration

  • config(mandatory) : contains the adaptor configuration
    • text : text to display. If a valid camp object attribute path is detected, the associated value is used. Otherwise, it uses the given value in XML configuration.
    • color : text color in hexadecimal format : #rrggbb or #rrggbbaa (optional, default: white)
    • fontSize : font size in points of displayed text (optional, default: 20)
    • hAlign : horizontal alignment (left, center or right, optional, default: 'left')
    • vAlign : vertical alignment (top, center or bottom, optional, default: 'bottom')
  • text The configuration accepts also a text tag instead of the text attribute (see second example). This is useful for multiline text. The same rules that for the attribute are applied.

Definition at line 71 of file SImageText.hpp.

Member Function Documentation

void visuVTKAdaptor::SImageText::configuring ( )
overrideprotectedvirtual

Configure the service before starting. Apply the configuration to service.

See also
configure()

Reimplemented from visuVTKAdaptor::SText.

Definition at line 80 of file SImageText.cpp.

References visuVTKAdaptor::SText::configuring().

+ Here is the call graph for this function:

fwServices::IService::KeyConnectionsMap visuVTKAdaptor::SImageText::getAutoConnections ( ) const
overrideprotectedvirtual

Returns proposals to connect service slots to associated object signals, this method is used for obj/srv auto connection.

Connect Image::s_MODIFIED_SIG to this::s_UPDATE_SLOT Connect Image::s_SLICE_INDEX_MODIFIED_SIG to this::s_UPDATE_SLICE_INDEX_SLOT Connect Image::s_BUFFER_MODIFIED_SIG to this::s_UPDATE_BUFFER_SLOT

Reimplemented from visuVTKAdaptor::SText.

Definition at line 162 of file SImageText.cpp.

References fwData::Image::s_BUFFER_MODIFIED_SIG, fwData::Object::s_MODIFIED_SIG, fwData::Image::s_SLICE_INDEX_MODIFIED_SIG, and fwServices::IService::s_UPDATE_SLOT.

void visuVTKAdaptor::SImageText::starting ( )
overrideprotectedvirtual

Initialize the service activity.

Use configuration to start his job. For example : the start method installs a button in a frame and show the frame.

See also
start()

Reimplemented from visuVTKAdaptor::SText.

Definition at line 56 of file SImageText.cpp.

References fwDataTools::helper::MedicalImageAdaptor::setOrCreateTF(), SLM_ASSERT, visuVTKAdaptor::SText::starting(), fwDataTools::helper::MedicalImageAdaptor::updateImageInfos(), and updating().

+ Here is the call graph for this function:

void visuVTKAdaptor::SImageText::stopping ( )
overrideprotectedvirtual

Uninitialize the service activity. The stop() method is always invoked before destroying a service.

See also
stop()

Reimplemented from visuVTKAdaptor::SText.

Definition at line 72 of file SImageText.cpp.

References fwDataTools::helper::MedicalImageAdaptor::removeTFConnections(), and visuVTKAdaptor::SText::stopping().

+ Here is the call graph for this function:

void visuVTKAdaptor::SImageText::updating ( )
overrideprotectedvirtual

Perform some computations according to object (this service is attached to) attribute values and its internal state.

See also
update()

Reimplemented from visuVTKAdaptor::SText.

Definition at line 87 of file SImageText.cpp.

References fwDataTools::fieldHelper::MedicalImageHelpers::checkImageValidity(), fwDataTools::helper::Image::getPixelAsString(), fwDataTools::helper::MedicalImageAdaptor::getTransferFunction(), fwDataTools::helper::MedicalImageAdaptor::m_axialIndex, fwDataTools::helper::MedicalImageAdaptor::m_frontalIndex, fwDataTools::helper::MedicalImageAdaptor::m_sagittalIndex, fwRenderVTK::IAdaptor::requestRender(), fwRenderVTK::IAdaptor::setVtkPipelineModified(), and SLM_ASSERT.

Referenced by starting(), swapping(), updateSliceIndex(), updateTFPoints(), and updateTFWindowing().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


The documentation for this class was generated from the following files: