1 /*============================================================================= 2 3 Library: CTK 4 5 Copyright (c) German Cancer Research Center, 6 Division of Medical and Biological Informatics 7 8 Licensed under the Apache License, Version 2.0 (the "License"); 9 you may not use this file except in compliance with the License. 10 You may obtain a copy of the License at 11 12 http://www.apache.org/licenses/LICENSE-2.0 13 14 Unless required by applicable law or agreed to in writing, software 15 distributed under the License is distributed on an "AS IS" BASIS, 16 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 See the License for the specific language governing permissions and 18 limitations under the License. 19 20 =============================================================================*/ 21 22 #ifndef CTKDICOMAPPHOSTINGTYPES_H 23 #define CTKDICOMAPPHOSTINGTYPES_H 24 25 // Qt includes 26 #include <QString> 27 #include <QList> 28 29 #ifdef ERROR 30 # error Try to reorder include files (this one first) \ 31 or write #undef ERROR before including this header. \ 32 Cause of this problem may be dcmimage.h, which indirectly \ 33 includes windows.h. 34 #endif 35 36 #include <org_commontk_dah_core_Export.h> 37 38 /** 39 * \brief Typedefs and classes defined in the interfaces of DICOM Supplement 118. 40 * 41 */ 42 namespace ctkDicomAppHosting { 43 44 //---------------------------------------------------------------------------- 45 enum State { 46 IDLE, 47 INPROGRESS, 48 COMPLETED, 49 SUSPENDED, 50 CANCELED, 51 EXIT 52 }; 53 54 //---------------------------------------------------------------------------- 55 enum StatusType { 56 INFORMATION, 57 WARNING, 58 ERROR, 59 FATALERROR 60 }; 61 62 //---------------------------------------------------------------------------- 63 struct Status { StatusStatus64 Status():statusType(INFORMATION){} 65 StatusType statusType; 66 QString codingSchemeDesignator; 67 QString codeValue; 68 QString codeMeaning; 69 }; 70 71 //---------------------------------------------------------------------------- 72 struct ObjectLocator { ObjectLocatorObjectLocator73 ObjectLocator():length(0), offset(0){} 74 QString locator; 75 QString source; 76 QString transferSyntax; 77 qint64 length; 78 qint64 offset; 79 QString URI; 80 }; 81 82 //---------------------------------------------------------------------------- 83 struct ObjectDescriptor { 84 QString descriptorUUID; 85 QString mimeType; 86 QString classUID; 87 QString transferSyntaxUID; 88 QString modality; 89 }; 90 91 //---------------------------------------------------------------------------- 92 typedef QList<ObjectDescriptor> ArrayOfObjectDescriptors; 93 94 //---------------------------------------------------------------------------- 95 struct Series { 96 QString seriesUID; 97 ArrayOfObjectDescriptors objectDescriptors; 98 }; 99 100 //---------------------------------------------------------------------------- 101 struct Study { 102 QString studyUID; 103 ArrayOfObjectDescriptors objectDescriptors; 104 QList<Series> series; 105 }; 106 107 //---------------------------------------------------------------------------- 108 struct Patient { 109 QString name; 110 QString id; 111 QString assigningAuthority; 112 QString sex; 113 QString birthDate; 114 ArrayOfObjectDescriptors objectDescriptors; 115 QList<Study> studies; 116 }; 117 118 //---------------------------------------------------------------------------- 119 struct AvailableData { 120 ArrayOfObjectDescriptors objectDescriptors; 121 QList<Patient> patients; 122 }; 123 124 //---------------------------------------------------------------------------- 125 // Comparison operators 126 127 bool org_commontk_dah_core_EXPORT operator ==(const ctkDicomAppHosting::Status& left, 128 const ctkDicomAppHosting::Status& right); 129 130 bool org_commontk_dah_core_EXPORT operator !=(const ctkDicomAppHosting::Status& left, 131 const ctkDicomAppHosting::Status& right); 132 133 bool org_commontk_dah_core_EXPORT operator ==(const ctkDicomAppHosting::ObjectLocator& left, 134 const ctkDicomAppHosting::ObjectLocator& right); 135 136 bool org_commontk_dah_core_EXPORT operator !=(const ctkDicomAppHosting::ObjectLocator& left, 137 const ctkDicomAppHosting::ObjectLocator& right); 138 139 bool org_commontk_dah_core_EXPORT operator ==(const ctkDicomAppHosting::ObjectDescriptor& left, 140 const ctkDicomAppHosting::ObjectDescriptor& right); 141 142 bool org_commontk_dah_core_EXPORT operator !=(const ctkDicomAppHosting::ObjectDescriptor& left, 143 const ctkDicomAppHosting::ObjectDescriptor& right); 144 145 bool org_commontk_dah_core_EXPORT operator ==(const ctkDicomAppHosting::Series& left, 146 const ctkDicomAppHosting::Series& right); 147 148 bool org_commontk_dah_core_EXPORT operator !=(const ctkDicomAppHosting::Series& left, 149 const ctkDicomAppHosting::Series& right); 150 151 bool org_commontk_dah_core_EXPORT operator ==(const ctkDicomAppHosting::Study& left, 152 const ctkDicomAppHosting::Study& right); 153 154 bool org_commontk_dah_core_EXPORT operator !=(const ctkDicomAppHosting::Study& left, 155 const ctkDicomAppHosting::Study& right); 156 157 bool org_commontk_dah_core_EXPORT operator ==(const ctkDicomAppHosting::Patient& left, 158 const ctkDicomAppHosting::Patient& right); 159 160 bool org_commontk_dah_core_EXPORT operator !=(const ctkDicomAppHosting::Patient& left, 161 const ctkDicomAppHosting::Patient& right); 162 163 bool org_commontk_dah_core_EXPORT operator ==(const ctkDicomAppHosting::AvailableData& left, 164 const ctkDicomAppHosting::AvailableData& right); 165 166 bool org_commontk_dah_core_EXPORT operator !=(const ctkDicomAppHosting::AvailableData& left, 167 const ctkDicomAppHosting::AvailableData& right); 168 169 } 170 #endif // CTKDICOMAPPHOSTINGTYPES 171