18 #ifndef sitkImportImageFilter_h
19 #define sitkImportImageFilter_h
57 std::string ToString()
const override;
60 std::string
GetName()
const override {
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 );
85 Image Execute()
override;
90 template <
class TImageType>
Image ExecuteInternal ( );
95 template <
class TImageType>
96 typename std::enable_if<!IsVector<TImageType>::Value>::type
98 template <
class TImageType>
99 typename std::enable_if<IsVector<TImageType>::Value>::type
100 SetNumberOfComponentsOnImage( TImageType* );
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