MeVisLab Toolbox Reference
DICOMCachedIOFileHandlePythonPlugin Class Reference

The DICOMCachedIOFileHandlePythonPlugin class can be used to resolve DICOMCachedIOFileHandle from python. More...

#include <DICOMCachedIOFileHandlePythonPlugin.h>

Inheritance diagram for DICOMCachedIOFileHandlePythonPlugin:
ml::DICOMCachedIOFileHandlePlugin

Public Slots

virtual void setResolvedFilename (QString filename)
 Function to set the resolved filename.
 

Signals

void updateFilename (QString *oldFilename)
 Qt or python objects can connect to this signal.
 

Public Member Functions

 DICOMCachedIOFileHandlePythonPlugin ()
 Default constructor.
 
virtual ~DICOMCachedIOFileHandlePythonPlugin ()
 Denstructor.
 
virtual std::string resolveFilename (const ml::DICOMCachedIOFileHandle &fileHandle) override
 Resolves a filename for a given DICOMCachedIOFileHandle.
 
- Public Member Functions inherited from ml::DICOMCachedIOFileHandlePlugin
 DICOMCachedIOFileHandlePlugin ()
 Constructor.
 
virtual ~DICOMCachedIOFileHandlePlugin ()
 Destructor.
 

Protected Attributes

std::string _filename
 Resolved filename.
 

Detailed Description

The DICOMCachedIOFileHandlePythonPlugin class can be used to resolve DICOMCachedIOFileHandle from python.

Therefore the QT signal updateFilename is emitted. The resolved filename has to be stored in _filename by the setResolvedFilename slot. If object that connects to the signal cannot resolve the given DICOMCachedIOFileHandle setResolvedFilename should not be called. This plugin can be used from within python by: wrapper = ctx.module("AccessDIrectDicomImportCache").object() plugin = wrapper.addPythonFileHandlePlugin()

plugin must be stored in a global variable or class member.

plugin.connect("updateFilename(QString*)",methodToResolveFilename)

def methodToResolveFilename(filename): filename = ''

Do something to resolve filename.

plugin.setResolvedFilename(filename)

Definition at line 52 of file DICOMCachedIOFileHandlePythonPlugin.h.

Constructor & Destructor Documentation

◆ DICOMCachedIOFileHandlePythonPlugin()

DICOMCachedIOFileHandlePythonPlugin::DICOMCachedIOFileHandlePythonPlugin ( )
inline

Default constructor.

Definition at line 58 of file DICOMCachedIOFileHandlePythonPlugin.h.

◆ ~DICOMCachedIOFileHandlePythonPlugin()

virtual DICOMCachedIOFileHandlePythonPlugin::~DICOMCachedIOFileHandlePythonPlugin ( )
inlinevirtual

Denstructor.

Definition at line 60 of file DICOMCachedIOFileHandlePythonPlugin.h.

Member Function Documentation

◆ resolveFilename()

virtual std::string DICOMCachedIOFileHandlePythonPlugin::resolveFilename ( const ml::DICOMCachedIOFileHandle & fileHandle)
overridevirtual

Resolves a filename for a given DICOMCachedIOFileHandle.

Therefore the QT signal updateFilename is emitted. The resolved filename has to be stored in _filename by the setResolvedFilename slot. If object that connects to the signal cannot resolve the given DICOMCachedIOFileHandle setResolvedFilename should not be called.

Parameters
fileHandleDICOMCachedIOFileHandle to be resolved.
Returns
Returns the resolved filename.

Reimplemented from ml::DICOMCachedIOFileHandlePlugin.

◆ setResolvedFilename

virtual void DICOMCachedIOFileHandlePythonPlugin::setResolvedFilename ( QString filename)
virtualslot

Function to set the resolved filename.

This slot is necessary as signals have no return value.

Parameters
filenameFilename to which the DICOMCachedIOFileHandle is resolved.

◆ updateFilename

void DICOMCachedIOFileHandlePythonPlugin::updateFilename ( QString * oldFilename)
signal

Qt or python objects can connect to this signal.

This signal is called from within resolveFilename. It is assumed that the setResolvedFilename with the resolved filename.

Member Data Documentation

◆ _filename

std::string DICOMCachedIOFileHandlePythonPlugin::_filename
protected

Resolved filename.

Definition at line 74 of file DICOMCachedIOFileHandlePythonPlugin.h.


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