Commit e6e8d08b authored by David Youssefi's avatar David Youssefi

ENH: set ImageIOBase::GetComponentTypeAsString function as static

parent 345b35f5
......@@ -276,9 +276,7 @@ private:
ImageIOBase::IOComponentType typeInfo(ImageIOBase::UNKNOWNCOMPONENTTYPE);
itk::ExposeMetaData< ImageIOBase::IOComponentType >( inImage->GetMetaDataDictionary(),
MetaDataKey::DataType , typeInfo);
// Dummy imageIO to get component type as string
ImageIOBase::Pointer imageIO;
const std::string dataTypeAsString = imageIO->GetComponentTypeAsString(typeInfo);
const std::string dataTypeAsString = ImageIOBase::GetComponentTypeAsString(typeInfo);
SetParameterString("datatype", dataTypeAsString);
ossOutput << "\tData type : " << GetParameterString("datatype") << std::endl;
......
......@@ -204,7 +204,7 @@ public:
/** Convenience method returns the IOComponentType as a string. This can be
* used for writing output files. */
std::string GetComponentTypeAsString(IOComponentType) const;
static std::string GetComponentTypeAsString(IOComponentType);
/** Convenience method returns the IOPixelType as a string. This can be
* used for writing output files. */
......
......@@ -739,7 +739,7 @@ std::string ImageIOBase::GetByteOrderAsString(ByteOrder t) const
}
}
std::string ImageIOBase::GetComponentTypeAsString(IOComponentType t) const
std::string ImageIOBase::GetComponentTypeAsString(IOComponentType t)
{
std::string s;
switch(t)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment