GDCM: gdcmPDUFactory.h Source File

GDCM 3.0.25

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"
24#include "gdcmPresentationDataValue.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);
42 static BasePDU* ConstructReleasePDU();
43 static BasePDU* ConstructAbortPDU();
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
gdcm::BaseQuery
BaseQuery.
Definition gdcmBaseQuery.h:42
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::network::BasePDU
BasePDU.
Definition gdcmBasePDU.h:51
gdcm::network::PDUFactory
PDUFactory basically, given an initial byte, construct the.
Definition gdcmPDUFactory.h:38
gdcm::network::PDUFactory::CreateNDeletePDU
static std::vector< BasePDU * > CreateNDeletePDU(const ULConnection &inConnection, const BaseQuery *inQuery)
gdcm::network::PDUFactory::CreateNEventReportPDU
static std::vector< BasePDU * > CreateNEventReportPDU(const ULConnection &inConnection, const BaseQuery *inQuery)
gdcm::network::PDUFactory::CreateNGetPDU
static std::vector< BasePDU * > CreateNGetPDU(const ULConnection &inConnection, const BaseQuery *inQuery)
gdcm::network::PDUFactory::DetermineEventByPDU
static EEventID DetermineEventByPDU(const BasePDU *inPDU)
gdcm::network::PDUFactory::CreateNSetPDU
static std::vector< BasePDU * > CreateNSetPDU(const ULConnection &inConnection, const BaseQuery *inQuery)
gdcm::network::PDUFactory::CreateCStoreRSPPDU
static std::vector< BasePDU * > CreateCStoreRSPPDU(const DataSet *inDataSet, const BasePDU *inPC)
gdcm::network::PDUFactory::CreateCStoreRQPDU
static std::vector< BasePDU * > CreateCStoreRQPDU(const ULConnection &inConnection, const File &file, bool writeDataSet=true)
gdcm::network::PDUFactory::GetPDVs
static std::vector< PresentationDataValue > GetPDVs(const std::vector< BasePDU * > &inDataPDUs)
gdcm::network::PDUFactory::CreateNCreatePDU
static std::vector< BasePDU * > CreateNCreatePDU(const ULConnection &inConnection, const BaseQuery *inQuery)
gdcm::network::PDUFactory::ConstructPDU
static BasePDU * ConstructPDU(uint8_t itemtype)
gdcm::network::PDUFactory::ConstructAbortPDU
static BasePDU * ConstructAbortPDU()
gdcm::network::PDUFactory::CreateNActionPDU
static std::vector< BasePDU * > CreateNActionPDU(const ULConnection &inConnection, const BaseQuery *inQuery)
gdcm::network::PDUFactory::CreateCEchoPDU
static std::vector< BasePDU * > CreateCEchoPDU(const ULConnection &inConnection)
gdcm::network::PDUFactory::CreateCMovePDU
static std::vector< BasePDU * > CreateCMovePDU(const ULConnection &inConnection, const BaseRootQuery *inRootQuery)
gdcm::network::PDUFactory::ConstructReleasePDU
static BasePDU * ConstructReleasePDU()
gdcm::network::PDUFactory::CreateCFindPDU
static std::vector< BasePDU * > CreateCFindPDU(const ULConnection &inConnection, const BaseRootQuery *inRootQuery)
gdcm::network::ULConnection
ULConnection.
Definition gdcmULConnection.h:58
gdcmNetworkEvents.h
gdcmPresentationDataValue.h
gdcmTypes.h
gdcmULConnection.h
gdcm::network
Definition gdcmAAbortPDU.h:24
gdcm::network::EEventID
EEventID
Definition gdcmNetworkEvents.h:33
gdcm
Definition gdcmASN1.h:21