18 #ifndef sitkImportImageFilter_h
19 #define sitkImportImageFilter_h
57 virtual std::string ToString()
const;
60 virtual std::string
GetName()
const {
return std::string(
"ImportImageFilter"); }
62 SITK_RETURN_SELF_TYPE_HEADER SetSize(
const std::vector< unsigned int > &size );
63 const std::vector< unsigned int > &GetSize( )
const;
65 SITK_RETURN_SELF_TYPE_HEADER SetSpacing(
const std::vector< double > &spacing );
66 const std::vector< double > &GetSpacing( )
const;
68 SITK_RETURN_SELF_TYPE_HEADER SetOrigin(
const std::vector< double > &origin );
69 const std::vector< double > &GetOrigin( )
const;
71 SITK_RETURN_SELF_TYPE_HEADER SetDirection(
const std::vector< double > &direction );
72 const std::vector< double > &GetDirection( )
const;
74 SITK_RETURN_SELF_TYPE_HEADER SetBufferAsInt8(
int8_t * buffer,
unsigned int numberOfComponents = 1 );
75 SITK_RETURN_SELF_TYPE_HEADER SetBufferAsUInt8(
uint8_t * buffer,
unsigned int numberOfComponents = 1 );
76 SITK_RETURN_SELF_TYPE_HEADER SetBufferAsInt16(
int16_t * buffer,
unsigned int numberOfComponents = 1 );
77 SITK_RETURN_SELF_TYPE_HEADER SetBufferAsUInt16(
uint16_t * buffer,
unsigned int numberOfComponents = 1 );
78 SITK_RETURN_SELF_TYPE_HEADER SetBufferAsInt32(
int32_t * buffer,
unsigned int numberOfComponents = 1 );
79 SITK_RETURN_SELF_TYPE_HEADER SetBufferAsUInt32(
uint32_t * buffer,
unsigned int numberOfComponents = 1 );
80 SITK_RETURN_SELF_TYPE_HEADER SetBufferAsInt64(
int64_t * buffer,
unsigned int numberOfComponents = 1 );
81 SITK_RETURN_SELF_TYPE_HEADER SetBufferAsUInt64(
uint64_t * buffer,
unsigned int numberOfComponents = 1 );
82 SITK_RETURN_SELF_TYPE_HEADER SetBufferAsFloat(
float * buffer,
unsigned int numberOfComponents = 1 );
83 SITK_RETURN_SELF_TYPE_HEADER SetBufferAsDouble(
double * buffer,
unsigned int numberOfComponents = 1 );
90 template <
class TImageType>
Image ExecuteInternal (
void );
95 template <
class TImageType>
98 template <
class TImageType>
100 SetNumberOfComponentsOnImage( TImageType* );
105 typedef Image (Self::*MemberFunctionType)( void );
125 const std::vector< unsigned int > &size,
126 const std::vector< double > &spacing = std::vector< double >( 3, 1.0 ),
127 const std::vector< double > &origin = std::vector< double >( 3, 0.0 ),
128 const std::vector< double > &direction = std::vector< double >(),
129 unsigned int numberOfComponents = 1
134 const std::vector< unsigned int > &size,
135 const std::vector< double > &spacing = std::vector< double >( 3, 1.0 ),
136 const std::vector< double > &origin = std::vector< double >( 3, 0.0 ),
137 const std::vector< double > &direction = std::vector< double >(),
138 unsigned int numberOfComponents = 1
143 const std::vector< unsigned int > &size,
144 const std::vector< double > &spacing = std::vector< double >( 3, 1.0 ),
145 const std::vector< double > &origin = std::vector< double >( 3, 0.0 ),
146 const std::vector< double > &direction = std::vector< double >(),
147 unsigned int numberOfComponents = 1
152 const std::vector< unsigned int > &size,
153 const std::vector< double > &spacing = std::vector< double >( 3, 1.0 ),
154 const std::vector< double > &origin = std::vector< double >( 3, 0.0 ),
155 const std::vector< double > &direction = std::vector< double >(),
156 unsigned int numberOfComponents = 1
161 const std::vector< unsigned int > &size,
162 const std::vector< double > &spacing = std::vector< double >( 3, 1.0 ),
163 const std::vector< double > &origin = std::vector< double >( 3, 0.0 ),
164 const std::vector< double > &direction = std::vector< double >(),
165 unsigned int numberOfComponents = 1
170 const std::vector< unsigned int > &size,
171 const std::vector< double > &spacing = std::vector< double >( 3, 1.0 ),
172 const std::vector< double > &origin = std::vector< double >( 3, 0.0 ),
173 const std::vector< double > &direction = std::vector< double >(),
174 unsigned int numberOfComponents = 1
179 const std::vector< unsigned int > &size,
180 const std::vector< double > &spacing = std::vector< double >( 3, 1.0 ),
181 const std::vector< double > &origin = std::vector< double >( 3, 0.0 ),
182 const std::vector< double > &direction = std::vector< double >(),
183 unsigned int numberOfComponents = 1
188 const std::vector< unsigned int > &size,
189 const std::vector< double > &spacing = std::vector< double >( 3, 1.0 ),
190 const std::vector< double > &origin = std::vector< double >( 3, 0.0 ),
191 const std::vector< double > &direction = std::vector< double >(),
192 unsigned int numberOfComponents = 1
197 const std::vector< unsigned int > &size,
198 const std::vector< double > &spacing = std::vector< double >( 3, 1.0 ),
199 const std::vector< double > &origin = std::vector< double >( 3, 0.0 ),
200 const std::vector< double > &direction = std::vector< double >(),
201 unsigned int numberOfComponents = 1
206 const std::vector< unsigned int > &size,
207 const std::vector< double > &spacing = std::vector< double >( 3, 1.0 ),
208 const std::vector< double > &origin = std::vector< double >( 3, 0.0 ),
209 const std::vector< double > &direction = std::vector< double >(),
210 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 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