Computer Assisted Medical Intervention Tool Kit  version 5.2
camitk::ImageAcquisitionComponentExtension Class Referenceabstract

This class describes what is a generic Image Acquisition Component extension. More...

#include <ImageAcquisitionComponentExtension.h>

+ Inheritance diagram for camitk::ImageAcquisitionComponentExtension:
+ Collaboration diagram for camitk::ImageAcquisitionComponentExtension:

Public Member Functions

virtual ImageAcquisitionComponentgetInstance (Component *parent, QString name)=0
 method to redefine in children classes to create an concrete instance of an ImageAcquisitionComponent More...
 
 ImageAcquisitionComponentExtension ()
 constructor More...
 
- Public Member Functions inherited from camitk::ComponentExtension
 ~ComponentExtension () override=default
 protected destructor, More...
 
virtual QString getName () const =0
 
virtual QString getDescription () const =0
 get the plugin description More...
 
virtual QStringList getFileExtensions () const =0
 get the list of managed extensions (each file with an extension in the list can be loaded by this Component) More...
 
virtual Componentopen (const QString &)=0
 get a new instance from data stored in a file (this is the most important method to redefine in your subclass) More...
 
virtual bool save (Component *component) const
 save a given Component (does not have to be top-level) into one of the currently managed format (check the component QFileInfo(component->getFileName()).completeSuffix(). More...
 
virtual bool hasDataDirectory () const
 return true if this component manages directory instead of individual files (e.g. Dicom series are stored in directories, not files) More...
 
QString getLocation () const
 get the file path (location of the .dll/.so/.dylib) of this plugin More...
 
void setLocation (const QString loc)
 set the file path (once loaded as a dynamic library) More...
 
void initResources ()
 Load, for the selected langage (asked to the Application), the associated .qm file. More...
 

Static Public Member Functions

static QStringList getImagerList ()
 static method to retrieve all classes that inherit from an ImageAcquisitionComponent More...
 
static ImageAcquisitionComponentgetInstance (QString imagerName, Component *parent, QString name)
 static method to create a generic instance of ImageAcquisitionComponent (such as a factory method) More...
 

Protected Member Functions

 ~ImageAcquisitionComponentExtension ()=default
 destructor More...
 
- Protected Member Functions inherited from camitk::ComponentExtension
 ComponentExtension ()
 protected constructor, More...
 

Detailed Description

This class describes what is a generic Image Acquisition Component extension.

To add a ImageAcquisitionComponentExtension write a new class that inherits from this class. Do not forget to add the dependency to the library in your CMakeList (imageacquisitioninterface)

This class derives from ComponentExtension and that is why a subclass of ImageAcquisitionComponentExtension have to describe methods from ComponentExtension as well.

The following methods HAVE to be redefined in your subclass:

Note
getInstance() method should just return a new instance of your ImageAcquisitionComponent subclass.
ImageAcquisitionComponentExtension works as a factory.
  • getImagerList() automatically looks for all ImageAcquisitionComponentExtension subclass and add them automatically to the list of possible instance produced by the factory. This way a new device can be added on the fly by adding new extensions.

The following methods can also be redefined (inherited from Component Extension):

  • save: saving from a Component to one of the managed format
  • hasDataDirectory: for directory type extension

Constructor & Destructor Documentation

◆ ImageAcquisitionComponentExtension()

camitk::ImageAcquisitionComponentExtension::ImageAcquisitionComponentExtension ( )

constructor

◆ ~ImageAcquisitionComponentExtension()

camitk::ImageAcquisitionComponentExtension::~ImageAcquisitionComponentExtension ( )
protecteddefault

destructor

Member Function Documentation

◆ getImagerList()

QStringList camitk::ImageAcquisitionComponentExtension::getImagerList ( )
static

static method to retrieve all classes that inherit from an ImageAcquisitionComponent

References camitk::ExtensionManager::getComponentExtensionsList().

+ Here is the call graph for this function:

◆ getInstance() [1/2]

virtual ImageAcquisitionComponent* camitk::ImageAcquisitionComponentExtension::getInstance ( Component parent,
QString  name 
)
pure virtual

method to redefine in children classes to create an concrete instance of an ImageAcquisitionComponent

◆ getInstance() [2/2]

ImageAcquisitionComponent * camitk::ImageAcquisitionComponentExtension::getInstance ( QString  imagerName,
Component parent,
QString  name 
)
static

static method to create a generic instance of ImageAcquisitionComponent (such as a factory method)

References camitk::ExtensionManager::getComponentExtensionsList().

+ Here is the call graph for this function:

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