#include <iostream>
#include <vector>
int
main(int argc, char * argv[])
{
if (argc < 2)
{
std::cout << "Usage: DicomImagePrintTags <input_file>" << std::endl;
return 1;
}
for (const auto & k : keys)
{
std::cout <<
"(" << k <<
") = = \"" << reader.
GetMetaData(k) <<
"\"" << std::endl;
}
std::vector<uint64_t> size = reader.
GetSize();
std::cout << "Image Size: [" << size[0];
for (size_t i = 1; i < size.size(); ++i)
{
std::cout << ", " << size[i];
}
std::cout << "]" << std::endl;
return 0;
}
Read an image file and return a SimpleITK Image.
void ReadImageInformation()
Read only the meta-data and image information in the file.
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.
std::string GetMetaData(const std::string &key) const
Get the value of a meta-data dictionary entry as a string.
PixelIDValueEnum GetPixelID() const
Image information methods updated via ReadImageInformation.
void SetFileName(const PathType &fn)
virtual void LoadPrivateTagsOn()
Set/Get loading private DICOM tags into Image's MetaData.
const std::string SITKCommon_EXPORT GetPixelIDValueAsString(PixelIDValueType type)