types.h file
Defines the basic types used throughout the library. This file is always included through diplib.h. See Support types, Pixel data types.
Namespaces
- namespace dip::
Option:: CmpProp - Namespace to emulate an enumerator, contains values more...
Classes
-
class dip::
AlignedBuffer - A container used to allocate 32-byte aligned buffers. more...
-
class dip::
bin - Type for samples in a binary image. Can store 0 or 1. Occupies 1 byte. more...
-
template<typename T>struct dip::
IsIndexingType - For use with
std::enable_ifto enable templates only for types that are indexing types, true for signed and unsigned integers. Seedip::IsSampleTypefor usage details. more... -
template<typename T>struct dip::
IsNumericType - For use with
std::enable_ifto enable templates only for types that are numeric types, similar tostd::is_arithmeticbut also true for complex types. Seedip::IsSampleTypefor usage details. more... -
template<typename T>struct dip::
IsSampleType - For use with
std::enable_ifto enable templates only for types that are valid for image samples. more... -
struct dip::
QuartilesResult - Represents the quartiles, see
dip::Quartiles. more... -
struct dip::
Range - Used in indexing to indicate a regular subset of pixels along one image dimension. more...
-
struct dip::
RegressionParameters - Represents the result of a 2D regression analysis: . more...
Aliases
-
template<typename T>using dip::
AbsType = dip::detail::AbsTypeCalculator - The type to use for the output of abs operations. Matches
dip::DataType::SuggestAbs. -
using dip::
BooleanArray = dip::DimensionArray - An array used as a dimension selector.
-
template<typename T>using dip::
ComplexType = dip::detail::ComplexTypeCalculator - The type to use in calculations when a complex type is needed. Matches
dip::DataType::SuggestComplex. -
using dip::
CoordinateArray = std::vector<UnsignedArray> - An array of pixel coordinates.
-
using dip::
dcomplex = std::complex<dfloat> - Type for samples in a 128-bit complex-valued (double-precision) image
-
using dip::
dfloat = double - Type for samples in a 64-bit floating point (double-precision) image
-
template<typename T>using dip::
DoubleType = dip::detail::DoubleTypeCalculator - The double precision floating point type (real or complex) to use when computing large sums of any input type. Matches
dip::DataType::SuggestDouble. -
template<typename T>using dip::
FlexBinType = dip::detail::FlexBinTypeCalculator - The type to use in calculations. Matches
dip::DataType::SuggestFlexBin. -
template<typename T>using dip::
FlexType = dip::detail::FlexTypeCalculator - The type to use in calculations. Matches
dip::DataType::SuggestFlex. -
using dip::
FloatArray = dip::DimensionArray - An array to hold filter parameters.
-
using dip::
FloatCoordinateArray = std::vector<FloatArray> - An array of subpixel coordinates.
-
template<typename T>using dip::
FloatType = dip::detail::FloatTypeCalculator - The type to use in calculations when a floating-point type is needed. Matches
dip::DataType::SuggestFloat. -
using dip::
IntegerArray = dip::DimensionArray - An array to hold strides, filter sizes, etc.
-
using dip::
LabelType = dip::uint32 - Type currently used for all labeled images, see
dip::DT_LABEL. -
using dip::
Option:: CmpPropFlags = dip::detail::Options - Determines which properties to compare. Combines multiple
dip::Option::CmpPropEnumeratorvalues, predefined values are indip::Option::CmpProp. -
using dip::
RangeArray = dip::DimensionArray - An array of ranges
-
template<typename T>using dip::
RealType = dip::detail::RealTypeCalculator - The type to use in calculations when a real-valued type is needed. Matches
dip::DataType::SuggestReal. -
using dip::
scomplex = std::complex<sfloat> - Type for samples in a 64-bit complex-valued (single-precision) image
-
using dip::
sfloat = float - Type for samples in a 32-bit floating point (single-precision) image
-
using dip::
sint = std::ptrdiff_t - An integer type to be used for strides and similar measures.
-
using dip::
sint16 = std::int16_t - Type for samples in a 16-bit signed integer image
-
using dip::
sint32 = std::int32_t - Type for samples in a 32-bit signed integer image
-
using dip::
sint64 = std::int64_t - Type for samples in a 64-bit signed integer image
-
using dip::
sint8 = std::int8_t - Type for samples in an 8-bit signed integer image
-
using dip::
String = std::string - A string, used to specify an option
-
using dip::
StringArray = std::vector<String> - An array of strings, used to specify an option per dimension
-
using dip::
StringSet = std::set<String> - A collection of strings, used to specify multiple independent options
-
using dip::
uint = std::size_t - An integer type to be used for sizes and the like.
-
using dip::
uint16 = std::uint16_t - Type for samples in a 16-bit unsigned integer image
-
using dip::
uint32 = std::uint32_t - Type for samples in a 32-bit unsigned integer image
-
using dip::
uint64 = std::uint64_t - Type for samples in a 64-bit unsigned integer image
-
using dip::
uint8 = std::uint8_t - Type for samples in an 8-bit unsigned integer image; also to be used as single byte for pointer arithmetic
-
using dip::
UnsignedArray = dip::DimensionArray - An array to hold dimensions, dimension lists, etc.
Enums
-
enum class dip::
Option:: AcceptDataTypeChange: uint8 - The function
dip::Image::ReForgetakes this option to control how to handle protected images. more... -
enum class dip::
Option:: AllowSingletonExpansion: uint8 - The function
dip::Image::CheckIsMasktakes this option to control how sizes are compared. more... -
enum class dip::
Option:: CmpPropEnumerator: uint8 - Determines which properties to compare. more...
-
enum class dip::
Option:: CropLocation: uint8 - The function
dip::Image::Croptakes this option to control which pixels are taken. more... -
enum class dip::
Option:: ThrowException: uint8 - Some functions that check for a condition optionally throw an exception if that condition is not met. more...
Functions
-
template<typename T>void dip::
ArrayUseParameter(dip::DimensionArray& array, dip::uint nDims, T defaultValue = {}) - Check the length of an array, and extend it if necessary and possible. more...
-
auto dip::
BooleanFromString(dip::String const& input, dip::String const& trueString, dip::String const& falseString) -> bool - Translates a string input parameter that is meant as a boolean value.
-
template<typename TPI, <SFINAE> = 0>auto dip::
CastLabelType(TPI label) -> dip::LabelType - Casting any unsigned integer type to
dip::LabelType. Throws ifvalueis too large. -
template<typename TPI, <SFINAE> = 0>auto dip::
PixelIsInfinity(TPI ) -> bool - A templated function to check for positive infinity, which works also for integer types (always returning false)
-
template<typename TPI, <SFINAE> = 0>auto dip::
PixelIsMinusInfinity(TPI ) -> bool - A templated function to check for negative infinity, which works also for integer types (always returning false)
-
auto dip::
StringCompareCaseInsensitive(dip::String const& string1, dip::String const& string2) -> bool - A case-insensitive string comparison, use only with ASCII characters!
-
void dip::
ToLowerCase(dip::String& string) - Convert a string to lower case, use only with ASCII characters!
-
void dip::
ToUpperCase(dip::String& string) - Convert a string to upper case, use only with ASCII characters!
Operators
-
auto dip::
operator<<(std::ostream& os, dip::bin const& v) -> std::ostream& - Writes the value as a
boolto a stream. -
auto dip::
operator<<(std::ostream& os, dip::Range const& range) -> std::ostream& - Display a range as “{start, stop, step}”.
Variables
-
dip::Option::CmpPropFlags const dip::
Option:: CmpProp:: All = Shape+ColorSpace+PixelSize constexpr dip::Option::CmpProp::Shape+dip::Option::CmpProp::ColorSpace+dip::Option::CmpProp::PixelSize.-
dip::Option::CmpPropFlags const dip::
Option:: CmpProp:: AllSizes = Sizes+TensorElements constexpr dip::Option::CmpProp::Sizes+dip::Option::CmpProp::TensorElements.-
dip::Option::CmpPropFlags const dip::
Option:: CmpProp:: ColorSpace = CmpPropEnumerator::ColorSpace constexpr dip::Option::CmpPropEnumerator::ColorSpace.-
dip::Option::CmpPropFlags const dip::
Option:: CmpProp:: DataType = CmpPropEnumerator::DataType constexpr dip::Option::CmpPropEnumerator::DataType.-
dip::Option::CmpPropFlags const dip::
Option:: CmpProp:: Dimensionality = CmpPropEnumerator::Dimensionality constexpr dip::Option::CmpPropEnumerator::Dimensionality.-
dip::Option::CmpPropFlags const dip::
Option:: CmpProp:: Full = Shape+Strides+TensorStride constexpr dip::Option::CmpProp::Shape+dip::Option::CmpProp::Strides+dip::Option::CmpProp::TensorStride.-
dip::Option::CmpPropFlags const dip::
Option:: CmpProp:: PixelSize = CmpPropEnumerator::PixelSize constexpr dip::Option::CmpPropEnumerator::PixelSize.-
dip::Option::CmpPropFlags const dip::
Option:: CmpProp:: Samples = DataType+Sizes+TensorElements constexpr dip::Option::CmpProp::DataType+dip::Option::CmpProp::Sizes+dip::Option::CmpProp::TensorElements.-
dip::Option::CmpPropFlags const dip::
Option:: CmpProp:: Shape = DataType+Sizes+TensorShape constexpr dip::Option::CmpProp::DataType+dip::Option::CmpProp::Sizes+dip::Option::CmpProp::TensorShape.-
dip::Option::CmpPropFlags const dip::
Option:: CmpProp:: Sizes = CmpPropEnumerator::Sizes constexpr dip::Option::CmpPropEnumerator::Sizes.-
dip::Option::CmpPropFlags const dip::
Option:: CmpProp:: Strides = CmpPropEnumerator::Strides constexpr dip::Option::CmpPropEnumerator::Strides.-
dip::Option::CmpPropFlags const dip::
Option:: CmpProp:: TensorElements = CmpPropEnumerator::TensorElements constexpr dip::Option::CmpPropEnumerator::TensorElements.-
dip::Option::CmpPropFlags const dip::
Option:: CmpProp:: TensorShape = CmpPropEnumerator::TensorShape constexpr dip::Option::CmpPropEnumerator::TensorShape.-
dip::Option::CmpPropFlags const dip::
Option:: CmpProp:: TensorStride = CmpPropEnumerator::TensorStride constexpr dip::Option::CmpPropEnumerator::TensorStride.
Macros
- #define DIP_DECLARE_OPTIONS(EnumType, OptionsType)
- Declare a type used to pass enumerated options to a function or class. more...