gdcmServiceClassUser.h
Go to the documentation of this file.
/*=========================================================================
Program: GDCM (Grassroots DICOM). A DICOM library
Copyright (c) 2006-2011 Mathieu Malaterre
All rights reserved.
See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#ifndef GDCMSERVICECLASSUSER_H
#define GDCMSERVICECLASSUSER_H
#include "gdcmSubject.h"
#include "gdcmPresentationContext.h"
#include "gdcmFile.h"
#include "gdcmNetworkStateID.h" // EStateID
namespace gdcm
{
class ServiceClassUserInternals;
class BaseRootQuery;
namespace network{
class ULEvent;
class ULConnection;
class ULConnectionCallback;
}
class GDCM_EXPORT ServiceClassUser : public Subject
{
public:
ServiceClassUser();
~ServiceClassUser() override;
ServiceClassUser(const ServiceClassUser&) = delete;
void operator=(const ServiceClassUser &) = delete;
void SetHostname( const char *hostname );
void SetPort( uint16_t port );
void SetPortSCP( uint16_t portscp );
void SetAETitle(const char *aetitle);
const char *GetAETitle() const;
void SetCalledAETitle(const char *aetitle);
const char *GetCalledAETitle() const;
void SetTimeout(double t);
double GetTimeout() const;
bool InitializeConnection();
void SetPresentationContexts(std::vector<PresentationContext> const & pcs);
bool IsPresentationContextAccepted(const PresentationContext& pc) const;
bool StartAssociation();
bool StopAssociation();
bool SendEcho();
bool SendStore(const char *filename);
bool SendStore(File const &file);
bool SendStore(DataSet const &ds);
bool SendFind(const BaseRootQuery* query, std::vector<DataSet> &retDatasets);
bool SendMove(const BaseRootQuery* query, const char *outputdir);
bool SendMove(const BaseRootQuery* query, std::vector<DataSet> &retDatasets);
bool SendMove(const BaseRootQuery* query, std::vector<File> &retFile);
static SmartPointer<ServiceClassUser> New() { return new ServiceClassUser; }
private:
network::EStateID RunEventLoop(network::ULEvent& inEvent,
network::ULConnection* inWhichConnection,
network::ULConnectionCallback* inCallback, const bool& startWaiting);
network::EStateID RunMoveEventLoop(network::ULEvent& inEvent,
network::ULConnectionCallback* inCallback);
private:
ServiceClassUserInternals *Internals;
};
} // end namespace gdcm
#endif // GDCMSERVICECLASSUSER_H
gdcm::BaseRootQuery
BaseRootQuery.
Definition gdcmBaseRootQuery.h:67
gdcm::DataSet
Class to represent a Data Set (which contains Data Elements).
Definition gdcmDataSet.h:56
gdcm::File
a DICOM File
Definition gdcmFile.h:34
gdcm::PresentationContext
PresentationContext.
Definition gdcmPresentationContext.h:30
gdcm::ServiceClassUser::SendMove
bool SendMove(const BaseRootQuery *query, const char *outputdir)
Execute a C-MOVE, based on query, return files are written in outputdir.
gdcm::ServiceClassUser::operator=
void operator=(const ServiceClassUser &)=delete
gdcm::ServiceClassUser::SendFind
bool SendFind(const BaseRootQuery *query, std::vector< DataSet > &retDatasets)
C-FIND a query, return result are in retDatasets.
gdcm::ServiceClassUser::IsPresentationContextAccepted
bool IsPresentationContextAccepted(const PresentationContext &pc) const
Return if the passed in presentation was accepted during association negotiation.
gdcm::ServiceClassUser::ServiceClassUser
ServiceClassUser(const ServiceClassUser &)=delete
gdcm::ServiceClassUser::SetTimeout
void SetTimeout(double t)
set/get Timeout
gdcm::ServiceClassUser::SendMove
bool SendMove(const BaseRootQuery *query, std::vector< File > &retFile)
Execute a C-MOVE, based on query, returned Files are stored in vector.
gdcm::ServiceClassUser::~ServiceClassUser
~ServiceClassUser() override
gdcm::ServiceClassUser::SetPresentationContexts
void SetPresentationContexts(std::vector< PresentationContext > const &pcs)
Set the Presentation Context used for the Association.
gdcm::ServiceClassUser::SendStore
bool SendStore(const char *filename)
Execute a C-STORE on file on disk, named filename.
gdcm::ServiceClassUser::New
static SmartPointer< ServiceClassUser > New()
for wrapped language: instantiate a reference counted object
Definition gdcmServiceClassUser.h:107
gdcm::ServiceClassUser::SendEcho
bool SendEcho()
C-ECHO.
gdcm::ServiceClassUser::StopAssociation
bool StopAssociation()
Stop the running association.
gdcm::ServiceClassUser::SetPortSCP
void SetPortSCP(uint16_t portscp)
Set the port for any incoming C-STORE-SCP operation (typically in a return of C-MOVE).
gdcm::ServiceClassUser::SetHostname
void SetHostname(const char *hostname)
Set the name of the called hostname (hostname or IP address).
gdcm::ServiceClassUser::SetAETitle
void SetAETitle(const char *aetitle)
set calling ae title
gdcm::ServiceClassUser::SetPort
void SetPort(uint16_t port)
Set port of remote host (called application).
gdcm::ServiceClassUser::GetTimeout
double GetTimeout() const
gdcm::ServiceClassUser::SendMove
bool SendMove(const BaseRootQuery *query, std::vector< DataSet > &retDatasets)
Execute a C-MOVE, based on query, returned dataset are Implicit.
gdcm::ServiceClassUser::GetCalledAETitle
const char * GetCalledAETitle() const
gdcm::ServiceClassUser::GetAETitle
const char * GetAETitle() const
gdcm::ServiceClassUser::StartAssociation
bool StartAssociation()
Start the association. Need to call SetPresentationContexts before.
gdcm::ServiceClassUser::SendStore
bool SendStore(DataSet const &ds)
Execute a C-STORE on a DataSet, the transfer syntax used will be Implicit.
gdcm::ServiceClassUser::ServiceClassUser
ServiceClassUser()
gdcm::ServiceClassUser::InitializeConnection
bool InitializeConnection()
gdcm::ServiceClassUser::SendStore
bool SendStore(File const &file)
gdcm::ServiceClassUser::SetCalledAETitle
void SetCalledAETitle(const char *aetitle)
set called ae title
gdcm::SmartPointer
Class for Smart Pointer.
Definition gdcmSmartPointer.h:40
gdcm::Subject::Subject
Subject()
gdcm::network::ULConnectionCallback
Definition gdcmULConnectionCallback.h:39
gdcm::network::ULConnection
ULConnection.
Definition gdcmULConnection.h:58
gdcm::network::ULEvent
ULEvent.
Definition gdcmULEvent.h:37
gdcmFile.h
gdcmNetworkStateID.h
gdcmPresentationContext.h
gdcmSubject.h
GDCM_EXPORT
#define GDCM_EXPORT
Definition gdcmWin32.h:34
gdcm::network
Definition gdcmAAbortPDU.h:24
gdcm::network::EStateID
EStateID
Definition gdcmNetworkStateID.h:32
gdcm
Definition gdcmASN1.h:21