GDCM 3.0.24
gdcmServiceClassUser.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: GDCM (Grassroots DICOM). A DICOM library
4
5 Copyright (c) 2006-2011 Mathieu Malaterre
6 All rights reserved.
7 See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
8
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notice for more information.
12
13=========================================================================*/
14#ifndef GDCMSERVICECLASSUSER_H
15#define GDCMSERVICECLASSUSER_H
16
17#include "gdcmSubject.h"
18
20#include "gdcmFile.h"
21
22#include "gdcmNetworkStateID.h" // EStateID
23
24namespace gdcm
25{
26class ServiceClassUserInternals;
27class BaseRootQuery;
28namespace network{
29class ULEvent;
30class ULConnection;
31class ULConnectionCallback;
32}
37{
38public:
45 void operator=(const ServiceClassUser &) = delete;
46
48 void SetHostname( const char *hostname );
49
51 void SetPort( uint16_t port );
52
54 void SetPortSCP( uint16_t portscp );
55
57 void SetAETitle(const char *aetitle);
58 const char *GetAETitle() const;
59
61 void SetCalledAETitle(const char *aetitle);
62 const char *GetCalledAETitle() const;
63
65 void SetTimeout(double t);
66 double GetTimeout() const;
67
72
74 void SetPresentationContexts(std::vector<PresentationContext> const & pcs);
75
78
81
84
86 bool SendEcho();
87
89 bool SendStore(const char *filename);
92 bool SendStore(File const &file);
94 bool SendStore(DataSet const &ds);
95
97 bool SendFind(const BaseRootQuery* query, std::vector<DataSet> &retDatasets);
98
100 bool SendMove(const BaseRootQuery* query, const char *outputdir);
102 bool SendMove(const BaseRootQuery* query, std::vector<DataSet> &retDatasets);
104 bool SendMove(const BaseRootQuery* query, std::vector<File> &retFile);
105
108
109private:
110 network::EStateID RunEventLoop(network::ULEvent& inEvent,
111 network::ULConnection* inWhichConnection,
112 network::ULConnectionCallback* inCallback, const bool& startWaiting);
113 network::EStateID RunMoveEventLoop(network::ULEvent& inEvent,
115
116private:
117 ServiceClassUserInternals *Internals;
118};
119
120} // end namespace gdcm
121
122#endif // GDCMSERVICECLASSUSER_H
BaseRootQuery.
Definition gdcmBaseRootQuery.h:67
Class to represent a Data Set (which contains Data Elements)
Definition gdcmDataSet.h:56
a DICOM File
Definition gdcmFile.h:34
PresentationContext.
Definition gdcmPresentationContext.h:30
ServiceClassUser.
Definition gdcmServiceClassUser.h:37
bool SendMove(const BaseRootQuery *query, const char *outputdir)
Execute a C-MOVE, based on query, return files are written in outputdir.
void operator=(const ServiceClassUser &)=delete
bool SendFind(const BaseRootQuery *query, std::vector< DataSet > &retDatasets)
C-FIND a query, return result are in retDatasets.
bool IsPresentationContextAccepted(const PresentationContext &pc) const
Return if the passed in presentation was accepted during association negotiation.
ServiceClassUser(const ServiceClassUser &)=delete
void SetTimeout(double t)
set/get Timeout
bool SendMove(const BaseRootQuery *query, std::vector< File > &retFile)
Execute a C-MOVE, based on query, returned Files are stored in vector.
~ServiceClassUser() override
void SetPresentationContexts(std::vector< PresentationContext > const &pcs)
Set the Presentation Context used for the Association.
bool SendStore(const char *filename)
Execute a C-STORE on file on disk, named filename.
static SmartPointer< ServiceClassUser > New()
for wrapped language: instantiate a reference counted object
Definition gdcmServiceClassUser.h:107
bool SendEcho()
C-ECHO.
bool StopAssociation()
Stop the running association.
void SetPortSCP(uint16_t portscp)
Set the port for any incoming C-STORE-SCP operation (typically in a return of C-MOVE)
void SetHostname(const char *hostname)
Set the name of the called hostname (hostname or IP address)
void SetAETitle(const char *aetitle)
set calling ae title
void SetPort(uint16_t port)
Set port of remote host (called application)
double GetTimeout() const
bool SendMove(const BaseRootQuery *query, std::vector< DataSet > &retDatasets)
Execute a C-MOVE, based on query, returned dataset are Implicit.
const char * GetCalledAETitle() const
const char * GetAETitle() const
bool StartAssociation()
Start the association. Need to call SetPresentationContexts before.
bool SendStore(DataSet const &ds)
Execute a C-STORE on a DataSet, the transfer syntax used will be Implicit.
bool SendStore(File const &file)
void SetCalledAETitle(const char *aetitle)
set called ae title
Class for Smart Pointer.
Definition gdcmSmartPointer.h:40
Subject.
Definition gdcmSubject.h:29
Definition gdcmULConnectionCallback.h:39
ULConnection.
Definition gdcmULConnection.h:58
ULEvent.
Definition gdcmULEvent.h:37
#define GDCM_EXPORT
Definition gdcmWin32.h:34
EStateID
Definition gdcmNetworkStateID.h:32
Definition gdcmASN1.h:21