SimpleITK  
sitkImageConvert.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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 sitkImageConvert_h
19 #define sitkImageConvert_h
20 
21 #include "sitkImage.h"
22 
23 namespace itk
24 {
25 
26 template <typename T, unsigned int NVectorDimension>
27 class Vector;
28 template <typename T, unsigned int NVectorDimension>
29 class CovariantVector;
30 template <unsigned int VDimension>
31 struct Offset;
32 
33 namespace simple
34 {
35 
36 
42 template <typename TPixelType, unsigned int ImageDimension>
44 GetImageFromVectorImage(itk::VectorImage<TPixelType, ImageDimension> * img, bool transferOwnership = false);
45 
46 
47 template <typename TPixelType, unsigned int ImageDimension>
50 
51 // method to convert a scalar image to a VectorImage changing the first dimension to the vector components
52 template <typename TPixelType, unsigned int ImageDimension>
53 SITKCommon_HIDDEN typename itk::VectorImage<TPixelType, ImageDimension - 1>::Pointer
55 
56 template <class TPixelType, unsigned int NImageDimension, unsigned int NLength>
59  bool transferOwnership = false);
60 
61 template <class TPixelType, unsigned int NImageDimension, unsigned int NLength>
64  bool transferOwnership = false);
65 
66 
67 template <unsigned int NImageDimension, unsigned int NLength>
69  typename std::
70  conditional<sizeof(typename itk::Offset<NLength>::OffsetValueType) == sizeof(int64_t), int64_t, int32_t>::type,
71  NImageDimension>::Pointer
72 GetVectorImageFromImage(itk::Image<itk::Offset<NLength>, NImageDimension> * img, bool transferOwnership = false);
75 } // namespace simple
76 } // namespace itk
77 
78 #endif // sitkImageConvert_h
itk::VectorImage
itk::VectorImage
Definition: sitkPixelIDTypes.h:30
sitkImage.h
itk::Vector
Definition: sitkImageConvert.h:27
itk::simple::GetVectorImageFromImage
SITKCommon_HIDDEN itk::VectorImage< TPixelType, NImageDimension >::Pointer GetVectorImageFromImage(itk::Image< itk::Vector< TPixelType, NLength >, NImageDimension > *img, bool transferOwnership=false)
Utility methods to convert between itk image types efficiently by sharing the buffer between the inpu...
itk::simple::GetVectorImageFromScalarImage
SITKCommon_HIDDEN itk::VectorImage< TPixelType, ImageDimension - 1 >::Pointer GetVectorImageFromScalarImage(itk::Image< TPixelType, ImageDimension > *img)
Utility methods to convert between itk image types efficiently by sharing the buffer between the inpu...
SmartPointer< Self >
SITKCommon_HIDDEN
#define SITKCommon_HIDDEN
Definition: sitkCommon.h:44
itk::simple::GetImageFromVectorImage
SITKCommon_HIDDEN itk::Image< itk::Vector< TPixelType, ImageDimension >, ImageDimension >::Pointer GetImageFromVectorImage(itk::VectorImage< TPixelType, ImageDimension > *img, bool transferOwnership=false)
Utility methods to convert between itk image types efficiently by sharing the buffer between the inpu...
itk::simple::GetScalarImageFromVectorImage
SITKCommon_HIDDEN itk::Image< TPixelType, ImageDimension+1 >::Pointer GetScalarImageFromVectorImage(itk::VectorImage< TPixelType, ImageDimension > *img)
Utility methods to convert between itk image types efficiently by sharing the buffer between the inpu...
itk::CovariantVector
Definition: sitkImageConvert.h:29
itk::Offset
Definition: sitkImageConvert.h:31
itk::Offset::OffsetValueType
itk::OffsetValueType OffsetValueType
itk
itk::Image
Definition: sitkPixelIDTypes.h:28