Mercurial > hg > orthanc-stone
comparison Framework/Toolbox/ImageToolbox.cpp @ 1484:121d01aa328e
SeriesThumbnailsLoader working on raw dicom files
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 22 Jun 2020 17:46:40 +0200 |
parents | 30deba7bc8e2 |
children |
comparison
equal
deleted
inserted
replaced
1483:6abd819aa534 | 1484:121d01aa328e |
---|---|
16 * | 16 * |
17 * You should have received a copy of the GNU Affero General Public License | 17 * You should have received a copy of the GNU Affero General Public License |
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 **/ | 19 **/ |
20 | 20 |
21 #include "../OrthancStone.h" | |
21 #include "ImageToolbox.h" | 22 #include "ImageToolbox.h" |
22 | 23 |
23 #include "../StoneException.h" | 24 #include "../StoneException.h" |
24 | 25 |
25 #include <Images/ImageProcessing.h> | 26 #include <Images/ImageProcessing.h> |
30 | 31 |
31 #include <boost/static_assert.hpp> | 32 #include <boost/static_assert.hpp> |
32 #include <boost/type_traits.hpp> | 33 #include <boost/type_traits.hpp> |
33 | 34 |
34 #include <vector> | 35 #include <vector> |
36 | |
37 #if !defined(ORTHANC_ENABLE_DCMTK) | |
38 # error ORTHANC_ENABLE_DCMTK is not defined | |
39 #endif | |
40 | |
41 #if !defined(ORTHANC_ENABLE_DCMTK_JPEG) | |
42 # error ORTHANC_ENABLE_DCMTK_JPEG is not defined | |
43 #endif | |
44 | |
45 #if !defined(ORTHANC_ENABLE_DCMTK_JPEG_LOSSLESS) | |
46 # error ORTHANC_ENABLE_DCMTK_JPEG_LOSSLESS is not defined | |
47 #endif | |
48 | |
35 | 49 |
36 namespace OrthancStone | 50 namespace OrthancStone |
37 { | 51 { |
38 namespace | 52 namespace |
39 { | 53 { |
287 pixCount += hd.bins[i]; | 301 pixCount += hd.bins[i]; |
288 } | 302 } |
289 ss << "total pix. count: " << pixCount << "\n"; | 303 ss << "total pix. count: " << pixCount << "\n"; |
290 s = ss.str(); | 304 s = ss.str(); |
291 } | 305 } |
306 | |
307 | |
308 bool ImageToolbox::IsDecodingSupported(Orthanc::DicomTransferSyntax& transferSyntax) | |
309 { | |
310 switch (transferSyntax) | |
311 { | |
312 case Orthanc::DicomTransferSyntax_LittleEndianImplicit: | |
313 case Orthanc::DicomTransferSyntax_LittleEndianExplicit: | |
314 case Orthanc::DicomTransferSyntax_DeflatedLittleEndianExplicit: | |
315 case Orthanc::DicomTransferSyntax_BigEndianExplicit: | |
316 case Orthanc::DicomTransferSyntax_RLELossless: | |
317 return true; | |
318 | |
319 #if (ORTHANC_ENABLE_DCMTK == 1) && (ORTHANC_ENABLE_DCMTK_JPEG == 1) | |
320 case Orthanc::DicomTransferSyntax_JPEGProcess1: | |
321 case Orthanc::DicomTransferSyntax_JPEGProcess2_4: | |
322 case Orthanc::DicomTransferSyntax_JPEGProcess14: | |
323 case Orthanc::DicomTransferSyntax_JPEGProcess14SV1: | |
324 return true; | |
325 #endif | |
326 | |
327 #if (ORTHANC_ENABLE_DCMTK == 1) && (ORTHANC_ENABLE_DCMTK_JPEG_LOSSLESS == 1) | |
328 case Orthanc::DicomTransferSyntax_JPEGLSLossless: | |
329 case Orthanc::DicomTransferSyntax_JPEGLSLossy: | |
330 return true; | |
331 #endif | |
332 | |
333 default: | |
334 return false; | |
335 } | |
336 } | |
292 } | 337 } |