SimpleITK  1.2.4
sitkPixelIDValues.h
Go to the documentation of this file.
1 /*=========================================================================
2 *
3 * Copyright Insight Software Consortium
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18 #ifndef sitkPixelIDValues_h
19 #define sitkPixelIDValues_h
20 
21 #include "sitkCommon.h"
22 #include "sitkPixelIDTypeLists.h"
23 
24 #include <string>
25 #include <ostream>
26 
27 namespace itk
28 {
29 namespace simple
30 {
31 
32 typedef int PixelIDValueType;
33 
34 template < typename TPixelID >
36 {
37  enum { Result = typelist::IndexOf<InstantiatedPixelIDTypeList, TPixelID >::Result };
38 };
39 
40 template <typename TImageType>
42 {
44 };
45 
46 
47 template <unsigned int VImageDimension>
48 struct ImageTypeToPixelIDValue< itk::ImageBase<VImageDimension> >
49 {
50  enum { Result = -1 };
51 };
52 
53 
118 };
119 
120 
121 const std::string SITKCommon_EXPORT GetPixelIDValueAsString( PixelIDValueType type );
123 
138 PixelIDValueType SITKCommon_EXPORT GetPixelIDValueFromString(const std::string &enumString );
139 
140 #ifndef SWIG
141 SITKCommon_EXPORT std::ostream& operator<<(std::ostream& os, const PixelIDValueEnum id);
142 #endif
143 
144 
145 }
146 }
147 #endif // sitkPixelIDValues_h
Multi-component of 64 bit float.
Multi-component of signed 8 bit integer.
Signed 16 bit integer.
Multi-component of unsigned 8 bit integer.
Multi-component of signed 16 bit integer.
Multi-component of unsigned 64 bit integer.
RLE label of unsigned 64 bit integers.
Multi-component of unsigned 32 bit integer.
Multi-component of signed 32 bit integer.
SITKCommon_EXPORT std::ostream & operator<<(std::ostream &os, const EventEnum k)
PixelIDValueEnum
Enumerated values of pixelIDs.
Signed 64 bit integer.
const std::string SITKCommon_EXPORT GetPixelIDValueAsString(PixelIDValueType type)
Unsigned 16 bit integer.
Signed 32 bit integer.
Unsigned 32 bit integer.
compelex number of 64 bit float
compelex number of 32 bit float
#define SITKCommon_EXPORT
Definition: sitkCommon.h:41
Unsigned 8 bit integer.
RLE label of unsigned 16 bit integers.
RLE label of unsigned 8 bit integers.
Unsigned 64 bit integer.
RLE label of unsigned 32 bit integers.
Multi-component of 32 bit float.
Multi-component of signed 64 bit integer.
Signed 8 bit integer.
PixelIDValueType SITKCommon_EXPORT GetPixelIDValueFromString(const std::string &enumString)
Function mapping enumeration names in std::string to values.
Multi-component of unsigned 16 bit integer.