comparison OrthancServer/DicomIntegerPixelAccessor.h @ 57:4bc019d2f969 orthanc-renaming

renaming
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sun, 16 Sep 2012 09:22:48 +0200
parents PalanthirServer/DicomIntegerPixelAccessor.h@293038baf8f1
children a70bb32802ae
comparison
equal deleted inserted replaced
56:088c4f23e2c8 57:4bc019d2f969
1 /**
2 * Palanthir - A Lightweight, RESTful DICOM Store
3 * Copyright (C) 2012 Medical Physics Department, CHU of Liege,
4 * 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 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 **/
19
20
21 #pragma once
22
23 #include "../Core/DicomFormat/DicomMap.h"
24
25 #include <stdint.h>
26
27 namespace Palanthir
28 {
29 class DicomIntegerPixelAccessor
30 {
31 private:
32 unsigned int width_;
33 unsigned int height_;
34 unsigned int samplesPerPixel_;
35 unsigned int numberOfFrames_;
36 const void* pixelData_;
37 size_t size_;
38
39 uint8_t shift_;
40 uint32_t signMask_;
41 uint32_t mask_;
42 size_t bytesPerPixel_;
43 unsigned int frame_;
44
45 size_t frameOffset_;
46 size_t rowOffset_;
47
48 public:
49 DicomIntegerPixelAccessor(const DicomMap& values,
50 const void* pixelData,
51 size_t size);
52
53 unsigned int GetWidth() const
54 {
55 return width_;
56 }
57
58 unsigned int GetHeight() const
59 {
60 return height_;
61 }
62
63 unsigned int GetNumberOfFrames() const
64 {
65 return numberOfFrames_;
66 }
67
68 unsigned int GetCurrentFrame() const
69 {
70 return frame_;
71 }
72
73 void SetCurrentFrame(unsigned int frame);
74
75 void GetExtremeValues(int32_t& min,
76 int32_t& max) const;
77
78 int32_t GetValue(unsigned int x, unsigned int y) const;
79 };
80 }