SimpleITK  2.0.0
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 > class Vector;
27 template< typename T, unsigned int NVectorDimension > class CovariantVector;
28 
29 namespace simple
30 {
31 
32 
36 template< typename TPixelType, unsigned int ImageDimension >
38 typename itk::Image< itk::Vector< TPixelType, ImageDimension >, ImageDimension>::Pointer
39 GetImageFromVectorImage( itk::VectorImage< TPixelType, ImageDimension > *img, bool transferOwnership = false );
40 
41 
42 template< class TPixelType, unsigned int NImageDimension, unsigned int NLength >
45 GetVectorImageFromImage( itk::Image< itk::Vector< TPixelType, NLength >, NImageDimension> *img, bool transferOwnership = false );
46 
47 template< class TPixelType, unsigned int NImageDimension, unsigned int NLength >
50 GetVectorImageFromImage( itk::Image< itk::CovariantVector< TPixelType, NLength >, NImageDimension> *img, bool transferOwnership = false );
51 
52 
53 }
54 }
55 
56 #endif // sitkImageConvert_h
itk::VectorImage
Definition: sitkPixelIDTypes.h:27
sitkImage.h
itk::Vector
Definition: sitkImageConvert.h:26
itk::SmartPointer< Self >
SITKCommon_HIDDEN
#define SITKCommon_HIDDEN
Definition: sitkCommon.h:44
itk::CovariantVector
Definition: sitkImageConvert.h:27
itk
itk::simple::GetVectorImageFromImage
SITKCommon_HIDDEN itk::VectorImage< TPixelType, NImageDimension >::Pointer GetVectorImageFromImage(itk::Image< itk::Vector< TPixelType, NLength >, NImageDimension > *img, bool transferOwnership=false)
itk::Image
Definition: sitkPixelIDTypes.h:26
itk::simple::GetImageFromVectorImage
SITKCommon_HIDDEN itk::Image< itk::Vector< TPixelType, ImageDimension >, ImageDimension >::Pointer GetImageFromVectorImage(itk::VectorImage< TPixelType, ImageDimension > *img, bool transferOwnership=false)
A utility method to help convert between itk image types efficiently.