comparison OrthancServer/ServerContext.h @ 759:8cfc6119a5bd dicom-rt

integration mainline -> dicom-rt
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 16 Apr 2014 16:04:55 +0200
parents e318e9d49815 2929e17f8447
children e57e08ed510f
comparison
equal deleted inserted replaced
605:b82292ba2083 759:8cfc6119a5bd
1 /** 1 /**
2 * Orthanc - A Lightweight, RESTful DICOM Store 2 * Orthanc - A Lightweight, RESTful DICOM Store
3 * Copyright (C) 2012-2013 Medical Physics Department, CHU of Liege, 3 * Copyright (C) 2012-2014 Medical Physics Department, CHU of Liege,
4 * Belgium 4 * Belgium
5 * 5 *
6 * This program is free software: you can redistribute it and/or 6 * This program is free software: you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as 7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation, either version 3 of the 8 * published by the Free Software Foundation, either version 3 of the
93 return compressionEnabled_; 93 return compressionEnabled_;
94 } 94 }
95 95
96 void RemoveFile(const std::string& fileUuid); 96 void RemoveFile(const std::string& fileUuid);
97 97
98 bool AddAttachment(const std::string& resourceId,
99 FileContentType attachmentType,
100 const void* data,
101 size_t size);
102
98 StoreStatus Store(const char* dicomInstance, 103 StoreStatus Store(const char* dicomInstance,
99 size_t dicomSize, 104 size_t dicomSize,
100 const DicomMap& dicomSummary, 105 const DicomMap& dicomSummary,
101 const Json::Value& dicomJson, 106 const Json::Value& dicomJson,
102 const std::string& remoteAet); 107 const std::string& remoteAet);
120 return Store(resultPublicId, NULL, 0); 125 return Store(resultPublicId, NULL, 0);
121 else 126 else
122 return Store(resultPublicId, &dicomContent[0], dicomContent.size()); 127 return Store(resultPublicId, &dicomContent[0], dicomContent.size());
123 } 128 }
124 129
125 void AnswerFile(RestApiOutput& output, 130 void AnswerDicomFile(RestApiOutput& output,
126 const std::string& instancePublicId, 131 const std::string& instancePublicId,
127 FileContentType content); 132 FileContentType content);
128 133
129 void ReadJson(Json::Value& result, 134 void ReadJson(Json::Value& result,
130 const std::string& instancePublicId); 135 const std::string& instancePublicId);
131 136
132 // TODO CACHING MECHANISM AT THIS POINT 137 // TODO CACHING MECHANISM AT THIS POINT
133 void ReadFile(std::string& result, 138 void ReadFile(std::string& result,
134 const std::string& instancePublicId, 139 const std::string& instancePublicId,
135 FileContentType content); 140 FileContentType content,
141 bool uncompressIfNeeded = true);
136 142
137 // TODO IMPLEMENT MULTITHREADING FOR THIS METHOD 143 // TODO IMPLEMENT MULTITHREADING FOR THIS METHOD
138 ParsedDicomFile& GetDicomFile(const std::string& instancePublicId); 144 ParsedDicomFile& GetDicomFile(const std::string& instancePublicId);
139 145
140 boost::mutex& GetDicomFileMutex() 146 boost::mutex& GetDicomFileMutex()
146 152
147 LuaContext& GetLuaContext() 153 LuaContext& GetLuaContext()
148 { 154 {
149 return lua_; 155 return lua_;
150 } 156 }
157
158 void SetStoreMD5ForAttachments(bool storeMD5);
159
160 bool IsStoreMD5ForAttachments() const
161 {
162 return accessor_.IsStoreMD5();
163 }
151 }; 164 };
152 } 165 }