GDCM 3.0.24
gdcmPDUFactory.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18#ifndef GDCMPDUFACTORY_H
19#define GDCMPDUFACTORY_H
20
21#include "gdcmTypes.h"
22#include "gdcmNetworkEvents.h"
23#include "gdcmULConnection.h"
25
26namespace gdcm{
27 class BaseRootQuery;
28 class BaseQuery;
29 class File;
30 namespace network{
31 class BasePDU;
32
38 class PDUFactory {
39 public:
40 static BasePDU* ConstructPDU(uint8_t itemtype);//eventually needs to be smartpointer'd
41 static EEventID DetermineEventByPDU(const BasePDU* inPDU);
44
45 //these are the composite PDU construction methods for the PDataPDUs.
46 //basically, builds a pdatapdu, and then puts the appropriate information in
47 //for the appropriate composite service (c-echo, c-find, c-store, c-get, c-move)
48 //the connection is necessary to construct the stream of PDVs that will
49 //be then placed into the vector of PDUs
50 static std::vector<BasePDU*> CreateCEchoPDU(const ULConnection& inConnection);
51 static std::vector<BasePDU*> CreateCStoreRQPDU(const ULConnection& inConnection, const File &file, bool writeDataSet = true );
52 static std::vector<BasePDU*> CreateCStoreRSPPDU(const DataSet *inDataSet, const BasePDU* inPC);
53 static std::vector<BasePDU*> CreateCFindPDU(const ULConnection& inConnection, const BaseRootQuery* inRootQuery);
54 static std::vector<BasePDU*> CreateCMovePDU(const ULConnection& inConnection, const BaseRootQuery* inRootQuery);
55
56 static std::vector<BasePDU*> CreateNEventReportPDU (const ULConnection& inConnection, const BaseQuery *inQuery);
57 static std::vector<BasePDU*> CreateNGetPDU (const ULConnection& inConnection, const BaseQuery *inQuery);
58 static std::vector<BasePDU*> CreateNSetPDU (const ULConnection& inConnection, const BaseQuery *inQuery);
59 static std::vector<BasePDU*> CreateNActionPDU (const ULConnection& inConnection, const BaseQuery *inQuery);
60 static std::vector<BasePDU*> CreateNCreatePDU (const ULConnection& inConnection, const BaseQuery *inQuery);
61 static std::vector<BasePDU*> CreateNDeletePDU (const ULConnection& inConnection, const BaseQuery *inQuery);
62
63
64 //given data pdus, produce the presentation data values stored within.
65 //all operations have these as the payload of the data sending operation
66 //however, echo does not have a dataset in the pdv.
67 static std::vector<PresentationDataValue> GetPDVs(const std::vector<BasePDU*> & inDataPDUs);
68 };
69 }
70}
71#endif //GDCMPDUFACTORY_H
BaseQuery.
Definition gdcmBaseQuery.h:42
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
BasePDU.
Definition gdcmBasePDU.h:51
PDUFactory basically, given an initial byte, construct the.
Definition gdcmPDUFactory.h:38
static std::vector< BasePDU * > CreateNDeletePDU(const ULConnection &inConnection, const BaseQuery *inQuery)
static std::vector< BasePDU * > CreateNEventReportPDU(const ULConnection &inConnection, const BaseQuery *inQuery)
static std::vector< BasePDU * > CreateNGetPDU(const ULConnection &inConnection, const BaseQuery *inQuery)
static EEventID DetermineEventByPDU(const BasePDU *inPDU)
static std::vector< BasePDU * > CreateNSetPDU(const ULConnection &inConnection, const BaseQuery *inQuery)
static std::vector< BasePDU * > CreateCStoreRSPPDU(const DataSet *inDataSet, const BasePDU *inPC)
static std::vector< BasePDU * > CreateCStoreRQPDU(const ULConnection &inConnection, const File &file, bool writeDataSet=true)
static std::vector< PresentationDataValue > GetPDVs(const std::vector< BasePDU * > &inDataPDUs)
static std::vector< BasePDU * > CreateNCreatePDU(const ULConnection &inConnection, const BaseQuery *inQuery)
static BasePDU * ConstructPDU(uint8_t itemtype)
static BasePDU * ConstructAbortPDU()
static std::vector< BasePDU * > CreateNActionPDU(const ULConnection &inConnection, const BaseQuery *inQuery)
static std::vector< BasePDU * > CreateCEchoPDU(const ULConnection &inConnection)
static std::vector< BasePDU * > CreateCMovePDU(const ULConnection &inConnection, const BaseRootQuery *inRootQuery)
static BasePDU * ConstructReleasePDU()
static std::vector< BasePDU * > CreateCFindPDU(const ULConnection &inConnection, const BaseRootQuery *inRootQuery)
ULConnection.
Definition gdcmULConnection.h:58
EEventID
Definition gdcmNetworkEvents.h:33
Definition gdcmASN1.h:21