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
23namespace itk
24{
25
26template <typename T, unsigned int NVectorDimension>
27class Vector;
28template <typename T, unsigned int NVectorDimension>
29class CovariantVector;
30template <unsigned int VDimension>
31struct Offset;
32
33namespace simple
34{
35
36
42template <typename TPixelType, unsigned int ImageDimension>
43SITKCommon_HIDDEN typename itk::Image<itk::Vector<TPixelType, ImageDimension>, ImageDimension>::Pointer
45
46
47template <typename TPixelType, unsigned int ImageDimension>
50
51// method to convert a scalar image to a VectorImage changing the first dimension to the vector components
52template <typename TPixelType, unsigned int ImageDimension>
53SITKCommon_HIDDEN typename itk::VectorImage<TPixelType, ImageDimension - 1>::Pointer
55
56template <class TPixelType, unsigned int NImageDimension, unsigned int NLength>
59 bool transferOwnership = false);
60
61template <class TPixelType, unsigned int NImageDimension, unsigned int NLength>
64 bool transferOwnership = false);
65
66
67template <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
72GetVectorImageFromImage(itk::Image<itk::Offset<NLength>, NImageDimension> * img, bool transferOwnership = false);
74
75} // namespace simple
76} // namespace itk
77
78#endif // sitkImageConvert_h
SmartPointer< Self > Pointer
SmartPointer< Self > Pointer
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...
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...
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...
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...
#define SITKCommon_HIDDEN
Definition sitkCommon.h:44
itk::OffsetValueType OffsetValueType