Mercurial > hg > orthanc-webviewer
comparison Orthanc/Enumerations.h @ 0:02f7a0400a91
initial commit
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 25 Feb 2015 13:45:35 +0100 |
parents | |
children | 7a0af291cc90 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:02f7a0400a91 |
---|---|
1 /** | |
2 * Orthanc - A Lightweight, RESTful DICOM Store | |
3 * Copyright (C) 2012-2015 Sebastien Jodogne, Medical Physics | |
4 * Department, University Hospital of Liege, Belgium | |
5 * | |
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 | |
8 * published by the Free Software Foundation, either version 3 of the | |
9 * License, or (at your option) any later version. | |
10 * | |
11 * In addition, as a special exception, the copyright holders of this | |
12 * program give permission to link the code of its release with the | |
13 * OpenSSL project's "OpenSSL" library (or with modified versions of it | |
14 * that use the same license as the "OpenSSL" library), and distribute | |
15 * the linked executables. You must obey the GNU General Public License | |
16 * in all respects for all of the code used other than "OpenSSL". If you | |
17 * modify file(s) with this exception, you may extend this exception to | |
18 * your version of the file(s), but you are not obligated to do so. If | |
19 * you do not wish to do so, delete this exception statement from your | |
20 * version. If you delete this exception statement from all source files | |
21 * in the program, then also delete it here. | |
22 * | |
23 * This program is distributed in the hope that it will be useful, but | |
24 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
26 * General Public License for more details. | |
27 * | |
28 * You should have received a copy of the GNU General Public License | |
29 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
30 **/ | |
31 | |
32 | |
33 #pragma once | |
34 | |
35 namespace Orthanc | |
36 { | |
37 enum Endianness | |
38 { | |
39 Endianness_Unknown, | |
40 Endianness_Big, | |
41 Endianness_Little | |
42 }; | |
43 | |
44 enum ErrorCode | |
45 { | |
46 // Generic error codes | |
47 ErrorCode_Success, | |
48 ErrorCode_Custom, | |
49 ErrorCode_InternalError, | |
50 ErrorCode_NotImplemented, | |
51 ErrorCode_ParameterOutOfRange, | |
52 ErrorCode_NotEnoughMemory, | |
53 ErrorCode_BadParameterType, | |
54 ErrorCode_BadSequenceOfCalls, | |
55 ErrorCode_InexistentItem, | |
56 ErrorCode_BadRequest, | |
57 ErrorCode_NetworkProtocol, | |
58 ErrorCode_SystemCommand, | |
59 ErrorCode_Database, | |
60 | |
61 // Specific error codes | |
62 ErrorCode_UriSyntax, | |
63 ErrorCode_InexistentFile, | |
64 ErrorCode_CannotWriteFile, | |
65 ErrorCode_BadFileFormat, | |
66 ErrorCode_Timeout, | |
67 ErrorCode_UnknownResource, | |
68 ErrorCode_IncompatibleDatabaseVersion, | |
69 ErrorCode_FullStorage, | |
70 ErrorCode_CorruptedFile, | |
71 ErrorCode_InexistentTag, | |
72 ErrorCode_ReadOnly, | |
73 ErrorCode_IncompatibleImageFormat, | |
74 ErrorCode_IncompatibleImageSize, | |
75 ErrorCode_SharedLibrary, | |
76 ErrorCode_Plugin | |
77 }; | |
78 | |
79 /** | |
80 * {summary}{The memory layout of the pixels (resp. voxels) of a 2D (resp. 3D) image.} | |
81 **/ | |
82 enum PixelFormat | |
83 { | |
84 /** | |
85 * {summary}{Color image in RGB24 format.} | |
86 * {description}{This format describes a color image. The pixels are stored in 3 | |
87 * consecutive bytes. The memory layout is RGB.} | |
88 **/ | |
89 PixelFormat_RGB24 = 1, | |
90 | |
91 /** | |
92 * {summary}{Color image in RGBA32 format.} | |
93 * {description}{This format describes a color image. The pixels are stored in 4 | |
94 * consecutive bytes. The memory layout is RGBA.} | |
95 **/ | |
96 PixelFormat_RGBA32 = 2, | |
97 | |
98 /** | |
99 * {summary}{Graylevel 8bpp image.} | |
100 * {description}{The image is graylevel. Each pixel is unsigned and stored in one byte.} | |
101 **/ | |
102 PixelFormat_Grayscale8 = 3, | |
103 | |
104 /** | |
105 * {summary}{Graylevel, unsigned 16bpp image.} | |
106 * {description}{The image is graylevel. Each pixel is unsigned and stored in two bytes.} | |
107 **/ | |
108 PixelFormat_Grayscale16 = 4, | |
109 | |
110 /** | |
111 * {summary}{Graylevel, signed 16bpp image.} | |
112 * {description}{The image is graylevel. Each pixel is signed and stored in two bytes.} | |
113 **/ | |
114 PixelFormat_SignedGrayscale16 = 5 | |
115 }; | |
116 | |
117 | |
118 unsigned int GetBytesPerPixel(PixelFormat format); | |
119 } |