Loading...
Searching...
No Matches
elxPixelTypeToString.h
Go to the documentation of this file.
/*=========================================================================
*
* Copyright UMC Utrecht and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
#ifndef elxPixelType_h
#define elxPixelType_h
namespace elastix
{
// Helper function (template) for writing pixel types as strings to parameter files
// `PixelTypeToString()` is only supported for the template specializations below here.
template <typename>
constexpr const char *
PixelTypeToString() = delete;
template <>
constexpr const char *
PixelTypeToString<char>()
{
return "char";
}
template <>
constexpr const char *
PixelTypeToString<unsigned char>()
{
return "unsigned char";
}
template <>
constexpr const char *
PixelTypeToString<short>()
{
return "short";
}
template <>
constexpr const char *
PixelTypeToString<unsigned short>()
{
return "unsigned short";
}
template <>
constexpr const char *
PixelTypeToString<int>()
{
return "int";
}
template <>
constexpr const char *
PixelTypeToString<unsigned int>()
{
return "unsigned int";
}
template <>
constexpr const char *
PixelTypeToString<long>()
{
return "long";
}
template <>
constexpr const char *
PixelTypeToString<unsigned long>()
{
return "unsigned long";
}
template <>
constexpr const char *
PixelTypeToString<float>()
{
return "float";
}
template <>
constexpr const char *
PixelTypeToString<double>()
{
return "double";
}
} // namespace elastix
#endif // elxPixelType_h
elastix
Definition elxDefaultConstruct.h:25
elastix::PixelTypeToString< unsigned long >
constexpr const char * PixelTypeToString< unsigned long >()
Definition elxPixelTypeToString.h:81
elastix::PixelTypeToString< float >
constexpr const char * PixelTypeToString< float >()
Definition elxPixelTypeToString.h:88
elastix::PixelTypeToString< char >
constexpr const char * PixelTypeToString< char >()
Definition elxPixelTypeToString.h:32
elastix::PixelTypeToString
constexpr const char * PixelTypeToString()=delete
elastix::PixelTypeToString< int >
constexpr const char * PixelTypeToString< int >()
Definition elxPixelTypeToString.h:60
elastix::PixelTypeToString< double >
constexpr const char * PixelTypeToString< double >()
Definition elxPixelTypeToString.h:95
elastix::PixelTypeToString< unsigned int >
constexpr const char * PixelTypeToString< unsigned int >()
Definition elxPixelTypeToString.h:67
elastix::PixelTypeToString< unsigned short >
constexpr const char * PixelTypeToString< unsigned short >()
Definition elxPixelTypeToString.h:53
elastix::PixelTypeToString< unsigned char >
constexpr const char * PixelTypeToString< unsigned char >()
Definition elxPixelTypeToString.h:39
elastix::PixelTypeToString< long >
constexpr const char * PixelTypeToString< long >()
Definition elxPixelTypeToString.h:74
elastix::PixelTypeToString< short >
constexpr const char * PixelTypeToString< short >()
Definition elxPixelTypeToString.h:46

Generated on 1768596610 for elastix by 1.15.0 |