18 #ifndef sitkImageFileReader_h
19 #define sitkImageFileReader_h
29 class MetaDataDictionary;
71 virtual std::string ToString()
const;
74 virtual std::string
GetName()
const {
return std::string(
"ImageFileReader"); }
76 SITK_RETURN_SELF_TYPE_HEADER SetFileName (
const std::string &fn );
77 std::string GetFileName()
const;
93 void ReadImageInformation(
void);
111 unsigned int GetDimension(
void )
const;
112 unsigned int GetNumberOfComponents(
void )
const;
113 const std::vector<double> &GetOrigin(
void )
const;
114 const std::vector<double> &GetSpacing(
void )
const;
115 const std::vector<double> &GetDirection()
const;
116 const std::vector<uint64_t> &GetSize(
void )
const;
128 std::vector<std::string> GetMetaDataKeys(
void )
const;
132 bool HasMetaDataKey(
const std::string &key )
const;
142 std::string GetMetaData(
const std::string &key )
const;
171 SITK_RETURN_SELF_TYPE_HEADER SetExtractSize(
const std::vector<unsigned int> &size);
172 const std::vector<unsigned int> &GetExtractSize( )
const;
181 SITK_RETURN_SELF_TYPE_HEADER SetExtractIndex(
const std::vector<int> &index );
182 const std::vector<int> &GetExtractIndex( )
const;
196 template <
class TImageType,
class TInternalImageType>
197 Image ExecuteExtract( TInternalImageType * itkImage );
207 nsstd::function<std::vector<std::string>()> m_pfGetMetaDataKeys;
241 const std::string &imageIO =
"");
An abract base class for image readers.
unsigned int m_NumberOfComponents
std::vector< double > m_Spacing
std::vector< double > m_Origin
PixelIDValueEnum
Enumerated values of pixelIDs.
nsstd::function< bool(const std::string &)> m_pfHasMetaDataKey
Read an image file and return a SimpleITK Image.
nsstd::auto_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
nsstd::function< std::string(const std::string &)> m_pfGetMetaData
SITKIO_EXPORT Image ReadImage(const std::string &filename, PixelIDValueEnum outputPixelType=sitkUnknown, const std::string &imageIO="")
ReadImage is a procedural interface to the ImageFileReader class which is convenient for most image r...
std::vector< double > m_Direction
PixelIDValueEnum m_PixelType
The Image class for SimpleITK.
nsstd::auto_ptr< MetaDataDictionary > m_MetaDataDictionary
std::vector< int > m_ExtractIndex
std::vector< uint64_t > m_Size
virtual std::string GetName() const
std::vector< unsigned int > m_ExtractSize