18#ifndef sitkImageFileReader_h
19#define sitkImageFileReader_h
91 return std::string(
"ImageFileReader");
94 SITK_RETURN_SELF_TYPE_HEADER
139 const std::vector<double> &
141 const std::vector<double> &
143 const std::vector<double> &
145 const std::vector<uint64_t> &
158 std::vector<std::string>
204 SITK_RETURN_SELF_TYPE_HEADER
206 const std::vector<unsigned int> &
216 SITK_RETURN_SELF_TYPE_HEADER
218 const std::vector<int> &
222 template <
class TImageType>
234 template <
class TImageType,
class TInternalImageType>
std::function< std::vector< std::string >()> m_pfGetMetaDataKeys
unsigned int GetDimension() const
Image information methods updated via ReadImageInformation.
Self & SetExtractSize(const std::vector< unsigned int > &size)
size of image to extract from file.
std::function< bool(const std::string &)> m_pfHasMetaDataKey
unsigned int m_NumberOfComponents
Image(Self::* MemberFunctionType)(itk::ImageIOBase *)
std::vector< double > m_Spacing
PathType GetFileName() const
const std::vector< double > & GetOrigin() const
Image information methods updated via ReadImageInformation.
std::vector< unsigned int > m_ExtractSize
Image ExecuteExtract(TInternalImageType *itkImage)
const std::vector< double > & GetSpacing() const
Image information methods updated via ReadImageInformation.
const std::vector< double > & GetDirection() const
Image information methods updated via ReadImageInformation.
~ImageFileReader() override
void ReadImageInformation()
Read only the meta-data and image information in the file.
unsigned int GetNumberOfComponents() const
Image information methods updated via ReadImageInformation.
std::vector< double > m_Direction
PixelIDValueEnum m_PixelType
std::vector< uint64_t > m_Size
const std::vector< uint64_t > & GetSize() const
Image information methods updated via ReadImageInformation.
std::vector< std::string > GetMetaDataKeys() const
Get the meta-data dictionary keys.
Self & SetExtractIndex(const std::vector< int > &index)
starting index from the image on disk to extract.
std::string ToString() const override
std::vector< int > m_ExtractIndex
const std::vector< int > & GetExtractIndex() const
std::string GetMetaData(const std::string &key) const
Get the value of a meta-data dictionary entry as a string.
const std::vector< unsigned int > & GetExtractSize() const
PixelIDValueEnum GetPixelID() const
Image information methods updated via ReadImageInformation.
std::unique_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
std::string GetName() const override
std::function< std::string(const std::string &)> m_pfGetMetaData
Image ExecuteInternal(itk::ImageIOBase *)
void UpdateImageInformationFromImageIO(const itk::ImageIOBase *iobase)
bool HasMetaDataKey(const std::string &key) const
Query a meta-data dictionary for the existence of a key.
std::vector< double > m_Origin
std::unique_ptr< MetaDataDictionary > m_MetaDataDictionary
PixelIDValueType GetPixelIDValue() const
Image information methods updated via ReadImageInformation.
Self & SetFileName(const PathType &fn)
The Image class for SimpleITK.
SITKIO_EXPORT Image ReadImage(const PathType &filename, PixelIDValueEnum outputPixelType=sitkUnknown, const std::string &imageIO="")
ReadImage is a procedural interface to the ImageFileReader class which is convenient for most image r...
PixelIDValueEnum
Enumerated values of pixelIDs.