45 #ifndef _INCLUDED_Field3D_MinMaxUtil_H_ 46 #define _INCLUDED_Field3D_MinMaxUtil_H_ 52 #include <boost/thread/thread.hpp> 53 #include <boost/thread/mutex.hpp> 68 template <
typename MIPField_T>
69 std::pair<typename MIPField_T::Ptr, typename MIPField_T::Ptr>
70 makeMinMax(
const typename MIPField_T::NestedType &base,
71 const float resMult,
const size_t numThreads);
86 template <
typename MIPField_T>
87 std::pair<typename MIPField_T::Ptr, typename MIPField_T::Ptr>
89 const float resMult,
const size_t numThreads)
91 typedef typename MIPField_T::Ptr MipPtr;
92 typedef typename MIPField_T::NestedType
Field;
93 typedef typename MIPField_T::NestedType::Ptr FieldPtr;
96 std::pair<MipPtr, MipPtr> result;
109 FieldPtr minSrc(
new Field);
110 FieldPtr maxSrc(
new Field);
118 result.first = makeMIP<MIPField_T, MinFilter>(*minSrc, 2, numThreads);
119 result.second = makeMIP<MIPField_T, MaxFilter>(*maxSrc, 2, numThreads);
130 #endif // Include guard #define FIELD3D_NAMESPACE_HEADER_CLOSE
T max(const T a, const T2 b)
Max operation on mixed types.
FIELD3D_NAMESPACE_OPEN bool resample(const Field_T &src, Field_T &tgt, const V3i &newRes, const FilterOp_T &filter)
Resamples the source field into the target field, such that the new data window is ...
const char * k_maxSuffix
The standard 'max' suffix - "_max".
Contains MIP-related utility functions.
FIELD3D_NAMESPACE_OPEN std::pair< typename MIPField_T::Ptr, typename MIPField_T::Ptr > makeMinMax(const typename MIPField_T::NestedType &base, const float resMult, const size_t numThreads)
Constructs a min/max MIP representation of the given field.
const char * k_minSuffix
The standard 'min' suffix - "_min".
const Box3i & dataWindow() const
Returns the data window. Any coordinate inside this window is safe to pass to value() in the Field su...
T min(const T a, const T2 b)
Min operation on mixed types.