18 #ifndef sitkImportImageFilter_h
19 #define sitkImportImageFilter_h
55 virtual std::string ToString()
const;
58 virtual std::string
GetName()
const {
return std::string(
"ImportImageFilter"); }
60 SITK_RETURN_SELF_TYPE_HEADER SetSize(
const std::vector< unsigned int > &size );
61 const std::vector< unsigned int > &GetSize( )
const;
63 SITK_RETURN_SELF_TYPE_HEADER SetSpacing(
const std::vector< double > &spacing );
64 const std::vector< double > &GetSpacing( )
const;
66 SITK_RETURN_SELF_TYPE_HEADER SetOrigin(
const std::vector< double > &origin );
67 const std::vector< double > &GetOrigin( )
const;
69 SITK_RETURN_SELF_TYPE_HEADER SetDirection(
const std::vector< double > &direction );
70 const std::vector< double > &GetDirection( )
const;
72 SITK_RETURN_SELF_TYPE_HEADER SetBufferAsInt8(
int8_t * buffer,
unsigned int numberOfComponents = 1 );
73 SITK_RETURN_SELF_TYPE_HEADER SetBufferAsUInt8(
uint8_t * buffer,
unsigned int numberOfComponents = 1 );
74 SITK_RETURN_SELF_TYPE_HEADER SetBufferAsInt16(
int16_t * buffer,
unsigned int numberOfComponents = 1 );
75 SITK_RETURN_SELF_TYPE_HEADER SetBufferAsUInt16(
uint16_t * buffer,
unsigned int numberOfComponents = 1 );
76 SITK_RETURN_SELF_TYPE_HEADER SetBufferAsInt32(
int32_t * buffer,
unsigned int numberOfComponents = 1 );
77 SITK_RETURN_SELF_TYPE_HEADER SetBufferAsUInt32(
uint32_t * buffer,
unsigned int numberOfComponents = 1 );
78 SITK_RETURN_SELF_TYPE_HEADER SetBufferAsInt64(
int64_t * buffer,
unsigned int numberOfComponents = 1 );
79 SITK_RETURN_SELF_TYPE_HEADER SetBufferAsUInt64(
uint64_t * buffer,
unsigned int numberOfComponents = 1 );
80 SITK_RETURN_SELF_TYPE_HEADER SetBufferAsFloat(
float * buffer,
unsigned int numberOfComponents = 1 );
81 SITK_RETURN_SELF_TYPE_HEADER SetBufferAsDouble(
double * buffer,
unsigned int numberOfComponents = 1 );
88 template <
class TImageType>
Image ExecuteInternal (
void );
93 template <
class TImageType>
96 template <
class TImageType>
98 SetNumberOfComponentsOnImage( TImageType* );
103 typedef Image (Self::*MemberFunctionType)( void );
123 const std::vector< unsigned int > &size,
124 const std::vector< double > &spacing = std::vector< double >( 3, 1.0 ),
125 const std::vector< double > &origin = std::vector< double >( 3, 0.0 ),
126 const std::vector< double > &direction = std::vector< double >(),
127 unsigned int numberOfComponents = 1
132 const std::vector< unsigned int > &size,
133 const std::vector< double > &spacing = std::vector< double >( 3, 1.0 ),
134 const std::vector< double > &origin = std::vector< double >( 3, 0.0 ),
135 const std::vector< double > &direction = std::vector< double >(),
136 unsigned int numberOfComponents = 1
141 const std::vector< unsigned int > &size,
142 const std::vector< double > &spacing = std::vector< double >( 3, 1.0 ),
143 const std::vector< double > &origin = std::vector< double >( 3, 0.0 ),
144 const std::vector< double > &direction = std::vector< double >(),
145 unsigned int numberOfComponents = 1
150 const std::vector< unsigned int > &size,
151 const std::vector< double > &spacing = std::vector< double >( 3, 1.0 ),
152 const std::vector< double > &origin = std::vector< double >( 3, 0.0 ),
153 const std::vector< double > &direction = std::vector< double >(),
154 unsigned int numberOfComponents = 1
159 const std::vector< unsigned int > &size,
160 const std::vector< double > &spacing = std::vector< double >( 3, 1.0 ),
161 const std::vector< double > &origin = std::vector< double >( 3, 0.0 ),
162 const std::vector< double > &direction = std::vector< double >(),
163 unsigned int numberOfComponents = 1
168 const std::vector< unsigned int > &size,
169 const std::vector< double > &spacing = std::vector< double >( 3, 1.0 ),
170 const std::vector< double > &origin = std::vector< double >( 3, 0.0 ),
171 const std::vector< double > &direction = std::vector< double >(),
172 unsigned int numberOfComponents = 1
177 const std::vector< unsigned int > &size,
178 const std::vector< double > &spacing = std::vector< double >( 3, 1.0 ),
179 const std::vector< double > &origin = std::vector< double >( 3, 0.0 ),
180 const std::vector< double > &direction = std::vector< double >(),
181 unsigned int numberOfComponents = 1
186 const std::vector< unsigned int > &size,
187 const std::vector< double > &spacing = std::vector< double >( 3, 1.0 ),
188 const std::vector< double > &origin = std::vector< double >( 3, 0.0 ),
189 const std::vector< double > &direction = std::vector< double >(),
190 unsigned int numberOfComponents = 1
195 const std::vector< unsigned int > &size,
196 const std::vector< double > &spacing = std::vector< double >( 3, 1.0 ),
197 const std::vector< double > &origin = std::vector< double >( 3, 0.0 ),
198 const std::vector< double > &direction = std::vector< double >(),
199 unsigned int numberOfComponents = 1
204 const std::vector< unsigned int > &size,
205 const std::vector< double > &spacing = std::vector< double >( 3, 1.0 ),
206 const std::vector< double > &origin = std::vector< double >( 3, 0.0 ),
207 const std::vector< double > &direction = std::vector< double >(),
208 unsigned int numberOfComponents = 1
An abract base class for image readers.
Image SITKIO_EXPORT ImportAsFloat(float *buffer, const std::vector< unsigned int > &size, const std::vector< double > &spacing=std::vector< double >(3, 1.0), const std::vector< double > &origin=std::vector< double >(3, 0.0), const std::vector< double > &direction=std::vector< double >(), unsigned int numberOfComponents=1)
Image SITKIO_EXPORT ImportAsDouble(double *buffer, const std::vector< unsigned int > &size, const std::vector< double > &spacing=std::vector< double >(3, 1.0), const std::vector< double > &origin=std::vector< double >(3, 0.0), const std::vector< double > &direction=std::vector< double >(), unsigned int numberOfComponents=1)
Image SITKIO_EXPORT ImportAsInt8(int8_t *buffer, const std::vector< unsigned int > &size, const std::vector< double > &spacing=std::vector< double >(3, 1.0), const std::vector< double > &origin=std::vector< double >(3, 0.0), const std::vector< double > &direction=std::vector< double >(), unsigned int numberOfComponents=1)
Image SITKIO_EXPORT ImportAsUInt8(uint8_t *buffer, const std::vector< unsigned int > &size, const std::vector< double > &spacing=std::vector< double >(3, 1.0), const std::vector< double > &origin=std::vector< double >(3, 0.0), const std::vector< double > &direction=std::vector< double >(), unsigned int numberOfComponents=1)
Image SITKIO_EXPORT ImportAsInt64(int64_t *buffer, const std::vector< unsigned int > &size, const std::vector< double > &spacing=std::vector< double >(3, 1.0), const std::vector< double > &origin=std::vector< double >(3, 0.0), const std::vector< double > &direction=std::vector< double >(), unsigned int numberOfComponents=1)
virtual std::string GetName() const
std::vector< double > m_Spacing
nsstd::auto_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
Image SITKIO_EXPORT ImportAsInt16(int16_t *buffer, const std::vector< unsigned int > &size, const std::vector< double > &spacing=std::vector< double >(3, 1.0), const std::vector< double > &origin=std::vector< double >(3, 0.0), const std::vector< double > &direction=std::vector< double >(), unsigned int numberOfComponents=1)
std::vector< unsigned int > m_Size
unsigned int m_NumberOfComponentsPerPixel
The main Image class for SimpleITK.
DisableIf< IsVector< TImageType >::Value >::Type SetNumberOfComponentsOnImage(TImageType *)
std::vector< double > m_Direction
std::vector< double > m_Origin
Image SITKIO_EXPORT ImportAsUInt16(uint16_t *buffer, const std::vector< unsigned int > &size, const std::vector< double > &spacing=std::vector< double >(3, 1.0), const std::vector< double > &origin=std::vector< double >(3, 0.0), const std::vector< double > &direction=std::vector< double >(), unsigned int numberOfComponents=1)
Image SITKIO_EXPORT ImportAsInt32(int32_t *buffer, const std::vector< unsigned int > &size, const std::vector< double > &spacing=std::vector< double >(3, 1.0), const std::vector< double > &origin=std::vector< double >(3, 0.0), const std::vector< double > &direction=std::vector< double >(), unsigned int numberOfComponents=1)
Image SITKIO_EXPORT ImportAsUInt32(uint32_t *buffer, const std::vector< unsigned int > &size, const std::vector< double > &spacing=std::vector< double >(3, 1.0), const std::vector< double > &origin=std::vector< double >(3, 0.0), const std::vector< double > &direction=std::vector< double >(), unsigned int numberOfComponents=1)
Compose a 2D or 3D image and return a smart pointer to a SimpleITK image.
Image SITKIO_EXPORT ImportAsUInt64(uint64_t *buffer, const std::vector< unsigned int > &size, const std::vector< double > &spacing=std::vector< double >(3, 1.0), const std::vector< double > &origin=std::vector< double >(3, 0.0), const std::vector< double > &direction=std::vector< double >(), unsigned int numberOfComponents=1)
PixelIDValueType m_PixelIDValue