fw4spl
fwPacsIO::SeriesEnquirer Class Reference

Reads DICOM series from pacs. More...

#include <SeriesEnquirer.hpp>

+ Inheritance diagram for fwPacsIO::SeriesEnquirer:
+ Collaboration diagram for fwPacsIO::SeriesEnquirer:

Public Types

typedef ::fwCom::Slot< void(const std::string &, unsigned int, const std::string &)> ProgressCallbackSlotType
 
typedef std::vector< std::string > InstanceUIDContainer
 
typedef std::vector< ::boost::filesystem::path > InstancePathContainer
 
typedef std::vector< std::shared_ptr< const DcmDataset > > DatasetContainer
 

Public Member Functions

virtual bool isA (const std::string &type) const override
 
FWPACSIO_API SeriesEnquirer ()
 Constructor.
 
FWPACSIO_API ~SeriesEnquirer ()
 Destructor.
 
FWPACSIO_API void initialize (const std::string &applicationTitle, const std::string &peerHostName, unsigned short peerPort, const std::string &peerApplicationTitle, const std::string &moveApplicationTitle="", ProgressCallbackSlotType::sptr progressCallback=ProgressCallbackSlotType::sptr())
 Initialize the connection. More...
 
FWPACSIO_API bool connect ()
 Negotiate Association.
 
FWPACSIO_API void disconnect ()
 Release association.
 
FWPACSIO_API bool pingPacs ()
 Assemble and send C-ECHO request.
 
FWPACSIO_API bool isConnectedToPacs () const
 Return true if there is an existing association.
 
FWPACSIO_API OFList< QRResponse * > findSeriesByPatientName (const std::string &name)
 Find series by patient name. More...
 
FWPACSIO_API OFList< QRResponse * > findSeriesByDate (const std::string &fromDate, const std::string &toDate)
 Find series by study date. More...
 
FWPACSIO_API OFList< QRResponse * > findSeriesByUID (const std::string &uid)
 Find series by series UID. More...
 
FWPACSIO_API std::string findSOPInstanceUID (const std::string &seriesInstanceUID, unsigned int instanceNumber)
 Find SOPInstanceUID of the specified instance. More...
 
FWPACSIO_API void pullSeriesUsingMoveRetrieveMethod (InstanceUIDContainer instanceUIDContainer)
 Pull series using C-MOVE requests. More...
 
FWPACSIO_API void pullSeriesUsingGetRetrieveMethod (InstanceUIDContainer instanceUIDContainer)
 Pull series using C-GET requests. More...
 
FWPACSIO_API void pullInstanceUsingMoveRetrieveMethod (const std::string &seriesInstanceUID, const std::string &sopInstanceUID)
 Pull instance using C-MOVE requests. More...
 
FWPACSIO_API void pullInstanceUsingGetRetrieveMethod (const std::string &seriesInstanceUID, const std::string &sopInstanceUID)
 Pull instance using C-GET requests. More...
 
FWPACSIO_API void pushSeries (const InstancePathContainer &pathContainer)
 Push instances using C-STORE requests. More...
 
FWPACSIO_API void pushSeries (const DatasetContainer &datasetContainer)
 Push instances using C-STORE requests. More...
 
- Public Member Functions inherited from fwCore::BaseObject

Static Public Member Functions

static bool isTypeOf (const std::string &type)
 
- 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 Attributes

static FWPACSIO_APIconst::fwCom::Slots::SlotKeyType s_PROGRESS_CALLBACK_SLOT = "CGetProgressCallback"
 

Protected Member Functions

FWPACSIO_API OFList< QRResponse * > sendFindRequest (DcmDataset dataset)
 Send Find Request. More...
 
FWPACSIO_API OFCondition sendMoveRequest (DcmDataset dataset)
 Send Move Request. More...
 
FWPACSIO_API OFCondition sendGetRequest (DcmDataset dataset)
 Send Get Request. More...
 
FWPACSIO_API OFCondition sendStoreRequest (const ::boost::filesystem::path &path)
 Send Store Request. More...
 
FWPACSIO_API OFCondition sendStoreRequest (const std::shared_ptr< const DcmDataset > &dataset)
 Send Store Request. More...
 
virtual FWPACSIO_API OFCondition handleMOVEResponse (const T_ASC_PresentationContextID presID, RetrieveResponse *response, OFBool &waitForNextResponse) override
 Handle MOVE Response (Override)
 
virtual FWPACSIO_API OFCondition handleSTORERequest (const T_ASC_PresentationContextID presID, DcmDataset *incomingObject, OFBool &continueCGETSession, Uint16 &cStoreReturnStatus) override
 Handle STORE Request (Override)
 
FWPACSIO_API Uint8 findUncompressedPC (const OFString &sopClass)
 Find uncompressed presentation context. More...
 

Protected Attributes

std::string m_moveApplicationTitle
 MOVE destination AE Title.
 
::boost::filesystem::path m_path
 Path where the files must be saved.
 
ProgressCallbackSlotType::sptr m_progressCallback
 Progress callback slot.
 
unsigned int m_instanceIndex
 Dowloaded instance index.
 

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
 

Detailed Description

Reads DICOM series from pacs.

Definition at line 29 of file SeriesEnquirer.hpp.

Member Function Documentation

OFList< QRResponse * > fwPacsIO::SeriesEnquirer::findSeriesByDate ( const std::string &  fromDate,
const std::string &  toDate 
)

Find series by study date.

Parameters
[in]fromDateBeginning date
[in]toDateEnding date
Returns
dcmtk response list

Definition at line 332 of file SeriesEnquirer.cpp.

References sendFindRequest().

+ Here is the call graph for this function:

OFList< QRResponse * > fwPacsIO::SeriesEnquirer::findSeriesByPatientName ( const std::string &  name)

Find series by patient name.

Parameters
[in]namePatient name
Returns
dcmtk response list

Definition at line 295 of file SeriesEnquirer.cpp.

References sendFindRequest().

+ Here is the call graph for this function:

OFList< QRResponse * > fwPacsIO::SeriesEnquirer::findSeriesByUID ( const std::string &  uid)

Find series by series UID.

Parameters
[in]uidSeries UID
Returns
dcmtk response list

Definition at line 369 of file SeriesEnquirer.cpp.

References sendFindRequest().

+ Here is the call graph for this function:

std::string fwPacsIO::SeriesEnquirer::findSOPInstanceUID ( const std::string &  seriesInstanceUID,
unsigned int  instanceNumber 
)

Find SOPInstanceUID of the specified instance.

Parameters
[in]seriesInstanceUIDSeries instance UID
[in]instanceNumberInstance number
Returns
SOPInstanceUID corresponding to the instanceNumber

Definition at line 404 of file SeriesEnquirer.cpp.

References sendFindRequest().

+ Here is the call graph for this function:

Uint8 fwPacsIO::SeriesEnquirer::findUncompressedPC ( const OFString &  sopClass)
protected

Find uncompressed presentation context.

Parameters
[in]sopClassSOP class which needs the presentation context

Definition at line 50 of file SeriesEnquirer.cpp.

Referenced by sendFindRequest(), sendGetRequest(), sendMoveRequest(), and sendStoreRequest().

+ Here is the caller graph for this function:

void fwPacsIO::SeriesEnquirer::initialize ( const std::string &  applicationTitle,
const std::string &  peerHostName,
unsigned short  peerPort,
const std::string &  peerApplicationTitle,
const std::string &  moveApplicationTitle = "",
ProgressCallbackSlotType::sptr  progressCallback = ProgressCallbackSlotType::sptr() 
)

Initialize the connection.

Parameters
[in]applicationTitleLocal application title
[in]peerHostNamePacs host name
[in]peerPortPacs port
[in]peerApplicationTitlePacs application title
[in]pathLocal dicom folder path
[in]moveApplicationTitleMove application title
[in]progressCallbackProgress callback

Definition at line 67 of file SeriesEnquirer.cpp.

References fwTools::System::getTemporaryFolder(), fwDcmtkTools::Dictionary::loadDictionary(), m_moveApplicationTitle, m_path, and m_progressCallback.

+ Here is the call graph for this function:

void fwPacsIO::SeriesEnquirer::pullInstanceUsingGetRetrieveMethod ( const std::string &  seriesInstanceUID,
const std::string &  sopInstanceUID 
)

Pull instance using C-GET requests.

Parameters
[in]seriesInstanceUIDSeries instance UID
[in]sopInstanceUIDSOP Instance UID

Definition at line 535 of file SeriesEnquirer.cpp.

References m_instanceIndex, sendGetRequest(), and SLM_TRACE.

+ Here is the call graph for this function:

void fwPacsIO::SeriesEnquirer::pullInstanceUsingMoveRetrieveMethod ( const std::string &  seriesInstanceUID,
const std::string &  sopInstanceUID 
)

Pull instance using C-MOVE requests.

Parameters
[in]seriesInstanceUIDSeries instance UID
[in]sopInstanceUIDSOP Instance UID

Definition at line 503 of file SeriesEnquirer.cpp.

References m_instanceIndex, sendMoveRequest(), and SLM_TRACE.

+ Here is the call graph for this function:

void fwPacsIO::SeriesEnquirer::pullSeriesUsingGetRetrieveMethod ( InstanceUIDContainer  instanceUIDContainer)

Pull series using C-GET requests.

Parameters
[in]instanceUIDContainerSeries instance UID container

Definition at line 471 of file SeriesEnquirer.cpp.

References m_instanceIndex, sendGetRequest(), and SLM_TRACE.

+ Here is the call graph for this function:

void fwPacsIO::SeriesEnquirer::pullSeriesUsingMoveRetrieveMethod ( InstanceUIDContainer  instanceUIDContainer)

Pull series using C-MOVE requests.

Parameters
[in]instanceUIDContainerSeries instance UID container

Definition at line 438 of file SeriesEnquirer.cpp.

References m_instanceIndex, sendMoveRequest(), and SLM_TRACE.

+ Here is the call graph for this function:

void fwPacsIO::SeriesEnquirer::pushSeries ( const InstancePathContainer &  pathContainer)

Push instances using C-STORE requests.

Parameters
[in]pathContainerInstance paths container

Definition at line 567 of file SeriesEnquirer.cpp.

References m_instanceIndex, m_progressCallback, sendStoreRequest(), and SLM_TRACE.

+ Here is the call graph for this function:

void fwPacsIO::SeriesEnquirer::pushSeries ( const DatasetContainer &  datasetContainer)

Push instances using C-STORE requests.

Parameters
[in]DatasetContainerDICOM dataset container

Definition at line 600 of file SeriesEnquirer.cpp.

References m_instanceIndex, m_progressCallback, sendStoreRequest(), and SLM_TRACE.

+ Here is the call graph for this function:

OFList< QRResponse * > fwPacsIO::SeriesEnquirer::sendFindRequest ( DcmDataset  dataset)
protected

Send Find Request.

Parameters
[in]datasetRequest dataset
Returns
dcmtk response list

Definition at line 198 of file SeriesEnquirer.cpp.

References findUncompressedPC().

Referenced by findSeriesByDate(), findSeriesByPatientName(), findSeriesByUID(), and findSOPInstanceUID().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

OFCondition fwPacsIO::SeriesEnquirer::sendGetRequest ( DcmDataset  dataset)
protected

Send Get Request.

Parameters
[in]datasetRequest dataset
Returns
OFTrue on success

Definition at line 236 of file SeriesEnquirer.cpp.

References findUncompressedPC(), m_path, SLM_ASSERT, and SLM_WARN.

Referenced by pullInstanceUsingGetRetrieveMethod(), and pullSeriesUsingGetRetrieveMethod().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

OFCondition fwPacsIO::SeriesEnquirer::sendMoveRequest ( DcmDataset  dataset)
protected

Send Move Request.

Parameters
[in]datasetRequest dataset
Returns
OFTrue on success

Definition at line 218 of file SeriesEnquirer.cpp.

References findUncompressedPC(), m_moveApplicationTitle, m_path, SLM_ASSERT, and SLM_WARN_IF.

Referenced by pullInstanceUsingMoveRetrieveMethod(), and pullSeriesUsingMoveRetrieveMethod().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

OFCondition fwPacsIO::SeriesEnquirer::sendStoreRequest ( const ::boost::filesystem::path &  path)
protected

Send Store Request.

Parameters
[in]pathFile path
Returns
OFTrue on success

Definition at line 257 of file SeriesEnquirer.cpp.

References findUncompressedPC(), OSLM_WARN, and SLM_WARN.

Referenced by pushSeries().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

OFCondition fwPacsIO::SeriesEnquirer::sendStoreRequest ( const std::shared_ptr< const DcmDataset > &  dataset)
protected

Send Store Request.

Parameters
[in]datasetDicom dataset
Returns
OFTrue on success

Definition at line 275 of file SeriesEnquirer.cpp.

References findUncompressedPC(), OSLM_WARN, and SLM_WARN.

+ Here is the call graph for this function:


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