Inviwo 0.9.12-pre
Inviwo documentation
|
Classes | |
struct | alwaysTrue |
class | BrickIterator |
An iterator providing access to a subregion, or brick, within linearized 3D data. More... | |
struct | BufferDispatcher |
struct | BuildInfo |
Provides information on build time and date as well as git hashes. More... | |
class | cloneable_ptr |
class | Combinations |
struct | DefaultColorRepresentation |
struct | DefaultColorRepresentation< ivec3 > |
struct | DefaultColorRepresentation< ivec4 > |
struct | DefaultTraversalFilter |
struct | extent |
struct | extent< const T, N > |
struct | extent< glm::mat< C, R, T, Q >, 0 > |
struct | extent< glm::mat< C, R, T, Q >, 1 > |
struct | extent< glm::tquat< T, Q >, 0 > |
struct | extent< glm::vec< L, T, Q >, 0 > |
struct | flat_extent |
struct | for_each_type |
struct | for_each_type< std::tuple< T > > |
struct | for_each_type< std::tuple< T, Types... > > |
struct | for_each_type_pair |
struct | for_each_type_pair< std::tuple< ATypes... >, std::tuple< BTypes... > > |
struct | glmtype |
struct | glmtype< T, 1, 1, P > |
struct | glmtype< T, L, 1, P > |
struct | Grid3DPointGeneration |
struct | GridPos |
struct | identifier |
struct | identity |
struct | IndexMapper |
struct | IndexMapper< 2, IndexType > |
struct | IndexMapper< 3, IndexType > |
class | IndexProduct |
struct | IndirectIterator |
struct | is_constructible |
class | is_container |
struct | is_dereferenceable |
struct | is_dereferenceable< T, std::void_t< decltype(*std::declval< T >())> > |
struct | is_floating_point |
class | is_stream_insertable |
struct | is_string |
struct | iter_range |
struct | IterRangeGenerator |
class | KeepTrueWhileInScope |
sets the given bool variable to true and restores its state when leaving the scope More... | |
class | MemoryFileHandle |
RAII class for providing a FILE stream handle to a buffer in memory. This class will open a file handle to /dev/null and use a dedicated buffer for buffering. As long as less bytes than getBufferSize() bytes are written/read, its status is well defined. However, after writing more than buffer size bytes, the buffer contents will be flushed, i.e. are no longer accessible. More... | |
class | MetaDataToProperty |
struct | nonesuch |
class | NotificationBlocker |
class | OnScopeExit |
calls the given function when leaving the current scope More... | |
class | ostream_joiner |
struct | overloaded |
class | Permutations |
struct | PropertyDistanceSorter |
struct | RandomCubicalPointGeneration |
struct | RandomSphericalPointGeneration |
struct | rank |
struct | rank< const T > |
struct | rank< glm::mat< C, R, T, Q > > |
struct | rank< glm::tquat< T, Q > > |
struct | rank< glm::vec< L, T, Q > > |
struct | same_extent |
struct | same_extent< glm::mat< C, R, T, Q >, U > |
struct | same_extent< glm::tquat< T, Q >, U > |
struct | same_extent< glm::vec< L, T, Q >, U > |
struct | sequence |
class | TempFileHandle |
RAII interface for providing a file handle and file name to a temporary file. More... | |
class | TextureAtlas |
Texture atlas for a number of strings rendered with the TextRenderer. More... | |
struct | TransformIterator |
struct | value_type |
struct | value_type< glm::mat< C, R, T, Q > > |
struct | value_type< glm::tquat< T, Q > > |
struct | value_type< glm::vec< L, T, Q > > |
Typedefs | |
using | OffsetCallback = std::function<ivec2(std::vector<Processor*>)> |
template<template< class... > class Op, class... Args> | |
using | is_detected = typename detail::detector<nonesuch, void, Op, Args...>::value_t |
template<template< class... > class Op, class... Args> | |
using | detected_t = typename detail::detector<nonesuch, void, Op, Args...>::type |
template<class Default , template< class... > class Op, class... Args> | |
using | detected_or = detail::detector<Default, void, Op, Args...> |
template<class Default , template< class... > class Op, class... Args> | |
using | detected_or_t = typename detected_or<Default, Op, Args...>::type |
template<class Expected , template< class... > class Op, class... Args> | |
using | is_detected_exact = std::is_same<Expected, detected_t<Op, Args...>> |
template<class To , template< class... > class Op, class... Args> | |
using | is_detected_convertible = std::is_convertible<detected_t<Op, Args...>, To> |
template<typename T > | |
using | PrecisionType = typename std::remove_pointer<typename std::remove_const<T>::type>::type |
template<typename T > | |
using | PrecisionValueType = typename PrecisionType<T>::type |
template<template< typename > typename Wrapper, typename List > | |
using | wrap = typename detail::wrap<Wrapper, List>::type |
template<typename T > | |
using | value_type_t = typename value_type<T>::type |
template<typename T , typename U > | |
using | same_extent_t = typename same_extent<T, U>::type |
template<typename T = double, glm::length_t C = 1, glm::length_t R = 1, glm::qualifier Q = glm::defaultp> | |
using | glmtype_t = typename glmtype<T, C, R, Q>::type |
using | IndexMapper2D = IndexMapper<2, size_t> |
using | IndexMapper3D = IndexMapper<3, size_t> |
Functions | |
IVW_CORE_API std::string | base64_encode (std::span< char > s, bool url=false) |
IVW_CORE_API std::string | base64_encode_pem (std::span< char > s) |
IVW_CORE_API std::string | base64_encode_mime (std::span< char > s) |
IVW_CORE_API std::string | base64_decode (std::string_view s, bool remove_linebreaks=false) |
IVW_CORE_API std::optional< mat4 > | boundingBoxUnion (const std::optional< mat4 > &a, const std::optional< mat4 > &b) |
IVW_CORE_API mat4 | boundingBox (const Layer &layer) |
IVW_CORE_API mat4 | boundingBox (const std::vector< std::shared_ptr< Layer > > &layers) |
IVW_CORE_API mat4 | boundingBox (const Mesh &mesh) |
IVW_CORE_API mat4 | boundingBox (const std::vector< std::shared_ptr< const Mesh > > &meshes) |
IVW_CORE_API mat4 | boundingBox (const Volume &volume) |
IVW_CORE_API mat4 | boundingBox (const std::vector< std::shared_ptr< Volume > > &volumes) |
IVW_CORE_API void | cubePlaneIntersectionAppend (const Plane &plane, std::vector< vec3 > &pos, std::vector< std::uint32_t > &inds) |
auto | cubePlaneInstersection (const Plane &plane) |
IVW_CORE_API std::vector< double > | calculatePercentiles (const std::vector< size_t > &hist, dvec2 range, size_t sum) |
IVW_CORE_API Statistics | calculateHistogramStats (const std::vector< size_t > &hist) |
template<typename T > | |
std::vector< Histogram1D > | calculateHistograms (std::span< const T > data, const DataMapper &dataMap, size_t bins) |
template<typename T > | |
constexpr T | linearMap (T val, glm::vec< 2, T > from, glm::vec< 2, T > to) noexcept |
template<glm::length_t L, typename T > | |
constexpr glm::vec< L, T > | linearMap (glm::vec< L, T > val, glm::vec< 2, T > from, glm::vec< 2, T > to) noexcept |
template<glm::length_t C, glm::length_t R, typename T > | |
constexpr glm::mat< C, R, T > | linearMap (glm::mat< C, R, T > val, glm::vec< 2, T > from, glm::vec< 2, T > to) noexcept |
template<typename T > | |
constexpr T | linearMapToNormalized (T val, glm::vec< 2, T > from) noexcept |
template<glm::length_t L, typename T > | |
constexpr glm::vec< L, T > | linearMapToNormalized (glm::vec< L, T > val, glm::vec< 2, T > from) noexcept |
template<glm::length_t C, glm::length_t R, typename T > | |
constexpr glm::mat< C, R, T > | linearMapToNormalized (glm::mat< C, R, T > val, glm::vec< 2, T > from) noexcept |
template<typename T > | |
constexpr T | linearMapFromNormalized (T val, glm::vec< 2, T > to) noexcept |
template<glm::length_t L, typename T > | |
constexpr glm::vec< L, T > | linearMapFromNormalized (glm::vec< L, T > val, glm::vec< 2, T > to) noexcept |
template<glm::length_t C, glm::length_t R, typename T > | |
constexpr glm::mat< C, R, T > | linearMapFromNormalized (glm::mat< C, R, T > val, glm::vec< 2, T > to) noexcept |
IVW_CORE_API Document | md2doc (std::string_view markdown) |
IVW_CORE_API Document | unindentMd2doc (std::string_view markdown) |
template<typename T > | |
std::vector< T > | makeVectorRange (ptrdiff_t start, ptrdiff_t end, ptrdiff_t step=1) |
template<typename T , size_t N> | |
Permutations (std::span< T, N >, size_t) -> Permutations< T > | |
template<typename T , size_t N> | |
Combinations (std::span< T, N >, size_t) -> Combinations< T > | |
template<typename T , size_t N> | |
IndexProduct (std::span< T, N >) -> IndexProduct< T > | |
IVW_CORE_API InviwoApplication * | getInviwoApplication (ProcessorNetwork *) |
IVW_CORE_API InviwoApplication * | getInviwoApplication (Processor *) |
IVW_CORE_API InviwoApplication * | getInviwoApplication (PropertyOwner *) |
IVW_CORE_API InviwoApplication * | getInviwoApplication (Property *) |
IVW_CORE_API InviwoApplication * | getInviwoApplication () |
IVW_CORE_API bool | isInviwoApplicationInitialized () |
std::shared_ptr< IndexBuffer > | makeIndexBuffer (std::vector< std::uint32_t > &&data) |
template<typename T = vec3, BufferUsage U = BufferUsage::Static, BufferTarget Target = BufferTarget::Data> | |
std::shared_ptr< Buffer< T, Target > > | makeBuffer (std::vector< T > &&data) |
IVW_CORE_API FloatRefProperty * | getCameraFovProperty (CameraProperty &cameraProperty) |
Find the vertical fov property in the cameraProperty. | |
IVW_CORE_API std::unique_ptr< FloatRefProperty > | createCameraFovProperty (std::function< float()> get, std::function< void(const float &)> set) |
Create a vertical fov property for use in a camera property. | |
IVW_CORE_API FloatRefProperty * | updateOrCreateCameraFovProperty (CameraProperty &cameraProperty, std::function< float()> get, std::function< void(const float &)> set) |
Either return an existing vertical fov property updated with the provided get and set functions or create a new one. The new one will automatically be added to the camera property. | |
IVW_CORE_API FloatRefProperty * | getCameraWidthProperty (CameraProperty &cameraProperty) |
Find the width property in the cameraProperty. | |
IVW_CORE_API std::unique_ptr< FloatRefProperty > | createCameraWidthProperty (std::function< float()> get, std::function< void(const float &)> set) |
Create a width property for use in a CameraProperty. | |
IVW_CORE_API FloatRefProperty * | updateOrCreateCameraWidthProperty (CameraProperty &cameraProperty, std::function< float()> get, std::function< void(const float &)> set) |
Either return an existing width property updated with the provided get and set functions or create a new one. The new one will automatically be added to the camera property. | |
IVW_CORE_API FloatVec2RefProperty * | getCameraEyeOffsetProperty (CameraProperty &cameraProperty) |
Find the eye offset property in the cameraProperty. | |
IVW_CORE_API std::unique_ptr< FloatVec2RefProperty > | createCameraEyeOffsetProperty (std::function< vec2()> get, std::function< void(const vec2 &)> set) |
Create an eye offset property for use in a camera property. | |
IVW_CORE_API FloatVec2RefProperty * | updateOrCreateCameraEyeOffsetProperty (CameraProperty &cameraProperty, std::function< vec2()> get, std::function< void(const vec2 &)> set) |
Either return an existing eye offset property updated with the provided get and set functions or create a new one. The new one will automatically be added to the camera property. | |
IVW_CORE_API float | fovyToWidth (float fovy, float distance, float aspect) |
IVW_CORE_API float | widthToFovy (float width, float distance, float aspect) |
IVW_CORE_API float | widthToViewDist (float width, float fov, float aspect) |
template<typename CamType > | |
vec3 | perspectiveZoom (CamType &cam, float factor, std::optional< mat4 >) |
template<size_t N> | |
constexpr auto | generateTransforms (std::array< CoordinateSpace, N > spaces) |
constexpr uvec3 | getDataFormatColor (NumericType t, size_t comp, size_t size) |
IVW_CORE_API std::string | appendIfNotEmpty (std::string_view a, std::string_view b) |
IVW_CORE_API size_t | numberOfPrimitives (DrawType dt, ConnectivityType ct, size_t indices) |
IVW_CORE_API size_t | numberOfVerticesForPrimitive (DrawType dt) |
template<typename T > | |
glm::vec< 4, T > | applySwizzleMask (const glm::vec< 4, T > &value, const SwizzleMask &swizzlemask) |
IVW_CORE_API void | registerCoreRepresentations (InviwoModule &obj) |
IVW_CORE_API void | registerCoreRepresentations (RepresentationFactoryManager &obj) |
IVW_CORE_API void | distributeAlphaEvenly (std::vector< TFPrimitive * > selection) |
IVW_CORE_API void | distributePositionEvenly (std::vector< TFPrimitive * > selection) |
IVW_CORE_API void | alignAlphaToMean (const std::vector< TFPrimitive * > &selection) |
IVW_CORE_API void | alignAlphaToTop (const std::vector< TFPrimitive * > &selection) |
IVW_CORE_API void | alignAlphaToBottom (const std::vector< TFPrimitive * > &selection) |
IVW_CORE_API void | alignPositionToMean (std::vector< TFPrimitive * > selection) |
IVW_CORE_API void | alignPositionToLeft (std::vector< TFPrimitive * > selection) |
IVW_CORE_API void | alignPositionToRight (std::vector< TFPrimitive * > selection) |
IVW_CORE_API void | interpolateAlpha (const std::vector< TFPrimitive * > &selection) |
IVW_CORE_API void | flipPositions (const std::vector< TFPrimitive * > &selection) |
template<size_t N> | |
std::array< Axis, N > | defaultAxes () |
IVW_CORE_API unitgroups::EnabledGroups | getSystemUnitGroups () |
IVW_CORE_API std::unordered_map< units::detail::unit_data, std::vector< UnitDesc > > | getUnitGroupsFor (Unit unit, const unitgroups::EnabledGroups &enabledGroups) |
IVW_CORE_API std::pair< double, std::vector< std::tuple< std::string_view, std::string_view, int > > > | findBestSetOfNamedUnits (Unit unit, const unitgroups::EnabledGroups &enabledGroups, UseUnitPrefixes usesPrefixes) |
IVW_CORE_API std::back_insert_iterator< fmt::memory_buffer > | formatUnitTo (std::back_insert_iterator< fmt::memory_buffer > it, Unit unit, const unitgroups::EnabledGroups &enabledGroups, UseUnitPrefixes usesPrefixes) |
template<typename... Args> | |
void | printEvent (std::ostream &os, const std::string &event, Args... args) |
void IVW_CORE_API | readBytesIntoBuffer (const std::filesystem::path &file, size_t offset, size_t bytes, bool littleEndian, size_t elementSize, void *dest) |
template<typename T > | |
void | saveData (const T &data, const std::filesystem::path &filePath, const FileExtension &extension, Overwrite overwrite) |
template<typename T > | |
std::optional< std::filesystem::path > | saveData (const T &data, const std::filesystem::path &path, std::string_view name, const std::vector< FileExtension > &extensions, Overwrite overwrite) |
IVW_CORE_API void | saveLayer (const Layer &layer, const std::filesystem::path &path, const FileExtension &extension=FileExtension()) |
IVW_CORE_API void | saveLayer (const Layer &layer) |
IVW_CORE_API void | renamePort (Deserializer &d, std::vector< std::pair< const Port *, std::string > > rules) |
IVW_CORE_API void | renameProperty (Deserializer &d, std::vector< std::pair< const Property *, std::string > > rules, std::string path="Properties") |
IVW_CORE_API void | changePropertyType (Deserializer &d, std::vector< std::pair< const Property *, std::string > > rules) |
IVW_CORE_API std::unordered_set< Processor * > | getDirectPredecessors (Processor *processor) |
IVW_CORE_API std::unordered_set< Processor * > | getDirectSuccessors (Processor *processor) |
IVW_CORE_API std::unordered_set< Processor * > | getPredecessors (Processor *processor) |
IVW_CORE_API std::unordered_set< Processor * > | getSuccessors (Processor *processor) |
template<TraversalDirection D, VisitPattern V, typename Func , typename Filter = DefaultTraversalFilter> | |
void | traverseNetwork (std::unordered_set< Processor * > &state, Processor *processor, Func f, Filter connectionFilter=DefaultTraversalFilter{}) |
IVW_CORE_API std::vector< Processor * > | topologicalSortFiltered (ProcessorNetwork *network) |
IVW_CORE_API std::vector< Processor * > | topologicalSort (ProcessorNetwork *network) |
IVW_CORE_API std::vector< ivec2 > | getPositions (const std::vector< Processor * > &processors) |
IVW_CORE_API std::vector< ivec2 > | getPositions (ProcessorNetwork *network) |
IVW_CORE_API ivec2 | getCenterPosition (const std::vector< Processor * > &processors) |
IVW_CORE_API ivec2 | getCenterPosition (ProcessorNetwork *network) |
IVW_CORE_API std::pair< ivec2, ivec2 > | getBoundingBox (const std::vector< Processor * > &processors) |
IVW_CORE_API std::pair< ivec2, ivec2 > | getBoundingBox (ProcessorNetwork *network) |
IVW_CORE_API void | offsetPosition (const std::vector< Processor * > &processors, ivec2 offset) |
IVW_CORE_API void | setSelected (const std::vector< Processor * > &processors, bool selected) |
IVW_CORE_API void | serializeSelected (ProcessorNetwork *network, std::ostream &os, const std::filesystem::path &refPath) |
IVW_CORE_API std::vector< Processor * > | appendPartialProcessorNetwork (ProcessorNetwork *network, std::istream &is, const std::filesystem::path &refPath, InviwoApplication *app, OffsetCallback offsetCallback=nullptr) |
IVW_CORE_API std::vector< Processor * > | appendProcessorNetwork (ProcessorNetwork *destinationNetwork, const std::filesystem::path &workspaceFile, InviwoApplication *app) |
IVW_CORE_API bool | addProcessorOnConnection (ProcessorNetwork &network, Processor &processor, PortConnection connection) |
IVW_CORE_API bool | addProcessorOnConnection (ProcessorNetwork *network, std::shared_ptr< Processor > processor, PortConnection connection) |
IVW_CORE_API std::shared_ptr< Processor > | replaceProcessor (ProcessorNetwork *network, Processor &newProcessor, Processor *oldProcessor) |
IVW_CORE_API std::shared_ptr< Processor > | replaceProcessor (ProcessorNetwork *network, std::shared_ptr< Processor > newProcessor, Processor *oldProcessor) |
IVW_CORE_API bool | canSplitConnection (Processor &p, const PortConnection &connection) |
IVW_CORE_API void | forEachWorkspaceInDirRecursive (const std::filesystem::path &path, std::function< void(const std::filesystem::path &)> callback) |
IVW_CORE_API size_t | updateWorkspaces (InviwoApplication *app, const std::filesystem::path &path, DryRun dryRun, std::function< void()> updateGui=[]() {}, size_t current=0, size_t total=0) |
IVW_CORE_API void | updateExampleWorkspaces (InviwoApplication *app, DryRun dryRun, std::function< void()> updateGui=[]() {}) |
IVW_CORE_API void | updateRegressionWorkspaces (InviwoApplication *app, DryRun dryRun, std::function< void()> updateGui=[]() {}) |
IVW_CORE_API void | replaceSelectionWithCompositeProcessor (ProcessorNetwork &network) |
IVW_CORE_API void | expandCompositeProcessorIntoNetwork (CompositeProcessor &composite) |
IVW_CORE_API std::vector< std::filesystem::path > | exportAllFiles (ProcessorNetwork &network, const std::filesystem::path &dir, std::string_view nameTemplate, const std::vector< FileExtension > &candidateExtensions, Overwrite overwrite) |
Tags IVW_CORE_API | getPlatformTags (const Tags &t) |
IVW_CORE_API const ProcessorMetaData * | getMetaData (const Processor *processor) |
IVW_CORE_API ProcessorMetaData * | getMetaData (Processor *processor) |
IVW_CORE_API ivec2 | getPosition (const Processor *processor) |
IVW_CORE_API void | setPosition (Processor *processor, ivec2 pos) |
IVW_CORE_API bool | isSelected (const Processor *processor) |
IVW_CORE_API void | setSelected (Processor *processor, bool selected) |
template<typename T , typename... Args> | |
std::unique_ptr< T > | makeProcessor (ivec2 pos, Args &&... args) |
IVW_CORE_API InviwoModule * | getProcessorModule (const Processor *processor, InviwoApplication &app) |
Find which module that registered a processor. | |
IVW_CORE_API InviwoModule * | getProcessorModule (std::string_view classIdentifier, InviwoApplication &app) |
Find which module that registered a processor. | |
template<typename T , typename V > | |
T & | trySetProperty (Processor *proc, std::string_view identifier, V &&val, bool recursive=false) |
Tries to set a processor's property to a given value. | |
IVW_CORE_API std::optional< std::string > | getProcessorModuleIdentifier (std::string_view classIdentifier, InviwoApplication &app) |
Find the module identifier of a registered processor. | |
IVW_CORE_API std::vector< OptionPropertyIntOption > | enumeratedOptions (std::string_view name, size_t count, int start=0, int step=1) |
IVW_CORE_API OrdinalPropertyState< vec4 > | ordinalColor (float r, float g, float b, float a=1.0f, InvalidationLevel invalidationLevel=InvalidationLevel::InvalidOutput) |
IVW_CORE_API OrdinalPropertyState< vec4 > | ordinalColor (const vec4 &value, InvalidationLevel invalidationLevel=InvalidationLevel::InvalidOutput) |
IVW_CORE_API OrdinalPropertyState< vec3 > | ordinalColor (const vec3 &value, InvalidationLevel invalidationLevel=InvalidationLevel::InvalidOutput) |
IVW_CORE_API OrdinalPropertyState< vec3 > | ordinalLight (const vec3 &pos, float min=-100.0, float max=100.0, InvalidationLevel invalidationLevel=InvalidationLevel::InvalidOutput) |
template<typename T = double, typename U = T> | |
OrdinalPropertyState< T > | ordinalSymmetricVector (const T &value={0}, const U &minMax=U{100}) |
template<typename T = size_t, typename U = T> | |
OrdinalPropertyState< T > | ordinalCount (const T &value=T{0}, const U &max=U{100}) |
template<typename T = double, typename U = T> | |
OrdinalPropertyState< T > | ordinalLength (const T &value=T{0}, const U &max=U{100}) |
template<typename T = double, typename U = T> | |
OrdinalPropertyState< T > | ordinalScale (const T &value=T{0}, const U &max=U{100}) |
IVW_CORE_API OrdinalRefPropertyState< vec4 > | ordinalRefColor (InvalidationLevel invalidationLevel=InvalidationLevel::InvalidOutput) |
template<typename T = double, typename U = T> | |
OrdinalRefPropertyState< T > | ordinalRefSymmetricVector (const U &minMax=U{100}) |
template<typename T , typename U > | |
void | updateDefaultState (T &property, const U &state, OverwriteState overwrite) |
template<size_t N> | |
std::span< const std::string_view, N > | defaultValues () |
IVW_CORE_API void | debugBreak () |
IVW_CORE_API void | reverse (BufferBase &b) |
std::optional< BuildInfo > IVW_CORE_API | getBuildInfo () |
Accesses build information via an INI file or compile-time definitions. | |
IVW_CORE_API std::string | msToString (double ms, bool includeZeros=true, bool spacing=false) |
convert the given duration from milliseconds to a string. The returned string will have the format "%dd %dh %dmin %dsec %.3fms", where days, hours, minutes, seconds, ... are suppressed up to the first non-zero unit if not needed. Milliseconds and seconds are combined if larger than 1 second. | |
template<class Rep , class Period = std::ratio<1>> | |
std::string | durationToString (std::chrono::duration< Rep, Period > duration, bool includeZeros=true, bool spacing=false) |
convenience function for converting a std::chrono::duration to a string calling msToString(double). | |
constexpr std::uint64_t | constexpr_hash (std::string_view str) noexcept |
template<size_t len> | |
constexpr std::uint64_t | constexpr_hash (const char(&str)[len]) noexcept |
IVW_CORE_API std::string | demangle (const char *name) |
IVW_CORE_API std::string | parseTypeIdName (const char *name) |
template<typename T > | |
constexpr bool | alwaysFalse () |
template<typename T > | |
constexpr std::string_view | enumName () |
template<typename Iterable , typename Callback > | |
void | forEach (const Iterable &iterable, Callback &&callback) |
template<typename Iterable , typename Callback , typename OnDoneCallback > | |
std::vector< std::future< void > > | forEachParallelAsync (const Iterable &iterable, Callback &&callback, size_t jobs, OnDoneCallback &&onTaskDone) |
template<typename Iterable , typename Callback > | |
std::vector< std::future< void > > | forEachParallelAsync (const Iterable &iterable, Callback &&callback, size_t jobs=0) |
template<typename Iterable , typename Callback > | |
void | forEachParallel (const Iterable &iterable, Callback &&callback, size_t jobs=0) |
template<class F , class... Args> | |
auto | for_each_argument (F &&f, Args &&... args) |
template<typename F , typename TupleType > | |
void | for_each_in_tuple (F &&f, TupleType &&t) |
template<typename F , typename TupleType1 , typename TupleType2 > | |
void | for_each_in_tuple (F &&f, TupleType1 &&t1, TupleType2 &&t2) |
IVW_CORE_API size_t | bytes_to_kilobytes (size_t bytes) |
IVW_CORE_API size_t | bytes_to_megabytes (size_t bytes) |
IVW_CORE_API size_t | kilobytes_to_bytes (size_t bytes) |
IVW_CORE_API size_t | megabytes_to_bytes (size_t bytes) |
IVW_CORE_API std::string | formatBytesToString (size_t bytes) |
template<typename T > | |
constexpr NumericType | getNumericType () |
IVW_CORE_API NumericType | commonNumericType (std::span< const DataFormatBase * > formats) |
IVW_CORE_API size_t | commonFormatPrecision (std::span< const DataFormatBase * > formats) |
template<typename T > | |
bool | isfinite (const T &v) |
template<glm::length_t L, typename T , glm::qualifier Q> | |
glm::vec< L, bool, Q > | isfinite (const glm::vec< L, T, Q > &x) |
template<typename T > | |
bool | isnan (const T &v) |
template<glm::length_t L, typename T , glm::qualifier Q> | |
glm::vec< L, bool, Q > | isnan (const glm::vec< L, T, Q > &x) |
template<class U , class T , class BinaryOperation > | |
U | accumulate (T x, U init, BinaryOperation op) |
template<glm::length_t L, class U , glm::qualifier Q, template< glm::length_t, typename, glm::qualifier > class vecType, class BinaryOperation > | |
std::enable_if_t< util::rank< vecType< L, U, Q > >::value==1, U > | accumulate (const vecType< L, U, Q > &x, U init, BinaryOperation op) |
template<glm::length_t C, glm::length_t R, class U , glm::qualifier Q, template< glm::length_t, glm::length_t, typename, glm::qualifier > class vecType, class BinaryOperation > | |
std::enable_if_t< util::rank< vecType< C, R, U, Q > >::value==2, U > | accumulate (const vecType< C, R, U, Q > &x, U init, BinaryOperation op) |
template<typename Type1 , typename Type2 > | |
Type1 | invertY (Type1 vec, Type2 dim) |
template<typename T > | |
bool | all (const T &t) |
template<> | |
bool | all (const bool &t) |
template<typename T > | |
bool | any (const T &t) |
template<> | |
bool | any (const bool &t) |
template<typename M , typename T = typename M::value_type> | |
M | filled (T v) |
template<typename T > | |
T | epsilon () |
template<typename T > | |
bool | almostEqual (const T &x, const T &y, int ulp=2) |
template<typename T > | |
glm::vec< 3, T > | transformPos (const glm::mat< 4, 4, T > &m, const glm::vec< 3, T > &pos) |
template<typename T > | |
glm::vec< 3, T > | transformNormal (const glm::mat< 4, 4, T > &modelViewMatrix, const glm::vec< 3, T > &normal) |
template<typename T , typename std::enable_if< util::rank< T >::value==0, int >::type = 0> | |
constexpr auto | glmcomp (T &elem, size_t) -> T & |
template<typename T , typename std::enable_if< util::rank< T >::value==2, int >::type = 0> | |
constexpr auto | glmcomp (const T &elem, size_t i) -> const typename T::value_type & |
template<typename T , typename std::enable_if< util::rank< T >::value==0, int >::type = 0> | |
constexpr auto | glmcomp (T &elem, size_t, size_t) -> T & |
template<typename T , typename std::enable_if< util::rank< T >::value==2, int >::type = 0> | |
constexpr auto | glmcomp (const T &elem, size_t i, size_t j) -> const typename T::value_type & |
template<typename To = double, typename From > | |
constexpr To | glm_convert (From x) |
template<typename To = double, typename From > | |
constexpr To | glm_convert_normalized (From x) |
template<class T > | |
constexpr void | hash_combine (std::size_t &seed, const T &v) noexcept |
template<typename C > | |
void | forEachPixel (const size2_t dims, C callback) |
template<typename C > | |
void | forEachPixel (const LayerRAM &layer, C callback) |
template<typename C > | |
void | forEachPixelParallel (const size2_t dims, C callback, size_t jobs=0) |
template<typename C > | |
void | forEachPixelParallel (const LayerRAM &layer, C callback, size_t jobs=0) |
IVW_CORE_API void | flipLayerVertical (Layer &layer) |
IVW_CORE_API void | flipLayerHorizontal (Layer &layer) |
IVW_CORE_API void | flipImageVertical (Image &img) |
IVW_CORE_API void | flipImageHorizontal (Image &img) |
IVW_CORE_API std::shared_ptr< Image > | readImageFromDisk (std::string filename) |
template<size_t N, typename IndexType = size_t> | |
auto | makeIndexMapper (const Vector< N, IndexType > &dim) |
template<bool PropagateConst = true, typename Iter > | |
IndirectIterator< Iter, PropagateConst > | makeIndirectIterator (Iter iter) noexcept(std::is_nothrow_move_constructible_v< Iter >) |
template<typename T > | |
constexpr std::string_view | classIdentifier () |
template<typename T > | |
constexpr std::string_view | dataName () |
template<typename T > | |
constexpr uvec3 | colorCode () |
template<typename T > | |
Document | info (const T &data) |
template<class Iter > | |
iter_range< Iter > | as_range (Iter begin, Iter end) |
template<class Iter > | |
iter_range< Iter > | as_range (std::pair< Iter, Iter > const &x) |
template<class Container > | |
iter_range< typename Container::iterator > | as_range (Container &c) |
template<class Container > | |
iter_range< typename Container::const_iterator > | as_range (const Container &c) |
void IVW_CORE_API | configureCodePage () |
IVW_CORE_API void | log (ExceptionContext context, std::string_view message, LogLevel level=LogLevel::Info, LogAudience audience=LogAudience::Developer) |
IVW_CORE_API void | log (Logger *logger, ExceptionContext context, std::string_view message, LogLevel level=LogLevel::Info, LogAudience audience=LogAudience::Developer) |
template<typename... Args> | |
void | log (SourceContext context, LogLevel level, LogAudience audience, fmt::format_string< Args... > format, Args &&... args) |
template<typename... Args> | |
void | logInfo (SourceContext context, fmt::format_string< Args... > format, Args &&... args) |
template<typename... Args> | |
void | logWarn (SourceContext context, fmt::format_string< Args... > format, Args &&... args) |
template<typename... Args> | |
void | logError (SourceContext context, fmt::format_string< Args... > format, Args &&... args) |
IVW_CORE_API ModuleManager & | getModuleManager () |
IVW_CORE_API ModuleManager & | getModuleManager (InviwoApplication *app) |
IVW_CORE_API InviwoModule * | getModuleByIdentifier (std::string_view identifier) |
IVW_CORE_API InviwoModule * | getModuleByIdentifier (InviwoApplication *app, std::string_view identifier) |
IVW_CORE_API size_t | getNumberOfModules () |
IVW_CORE_API size_t | getNumberOfModules (InviwoApplication *app) |
IVW_CORE_API InviwoModule * | getModuleByIndex (size_t index) |
IVW_CORE_API InviwoModule * | getModuleByIndex (InviwoApplication *app, size_t index) |
IVW_CORE_API std::filesystem::path | getModulePath (InviwoModule *module) |
IVW_CORE_API std::filesystem::path | getModulePath (InviwoModule *module, ModulePath pathType) |
IVW_CORE_API std::filesystem::path | getModulePath (std::string_view identifier, ModulePath pathType) |
return the path for a specific type located within the requested module | |
IVW_CORE_API std::filesystem::path | getModulePath (InviwoApplication *app, std::string_view identifier, ModulePath pathType) |
IVW_CORE_API std::filesystem::path | getModulePath (std::string_view identifier) |
IVW_CORE_API std::filesystem::path | getModulePath (InviwoApplication *app, std::string_view identifier) |
template<class T > | |
T * | getModuleByType (InviwoApplication *app) |
template<class T > | |
T * | getModuleByType () |
template<typename T > | |
std::filesystem::path | getModulePath (ModulePath pathType) |
return the path for a specific type located within the requested module of type T | |
template<typename T > | |
std::filesystem::path | getModulePath (InviwoApplication *app, ModulePath pathType) |
template<class charT , class traits , class DelimT > | |
ostream_joiner< std::decay_t< DelimT >, charT, traits > | make_ostream_joiner (std::basic_ostream< charT, traits > &os, DelimT &&delimiter) |
template<typename T > | |
void | SetValue (T &t, T value) |
template<typename T > | |
OnScopeExit::ExitAction | RevertValue (T &t) |
IVW_CORE_API std::vector< std::filesystem::path > | getLibrarySearchPaths () |
Returns paths to search for module libraries. All platforms: executable directory and application modules directory (AppData/Inviwo/modules on windows). Platform dependent search directories: OSX: DYLD_LIBRARY_PATH UNIX: LD_LIBRARY_PATH/LD_RUN_PATH, RPATH and "executable directory
/../../lib". | |
template<typename Derived , typename Base , typename Del > | |
std::unique_ptr< Derived, Del > | static_unique_ptr_cast (std::unique_ptr< Base, Del > &&p) |
template<typename Derived , typename Base , typename Del > | |
std::unique_ptr< Derived, Del > | dynamic_unique_ptr_cast (std::unique_ptr< Base, Del > &&p) |
template<typename Derived , typename Base > | |
std::unique_ptr< Derived > | dynamic_unique_ptr_cast (std::unique_ptr< Base, std::default_delete< Base > > &&p) |
template<std::size_t N, typename Index = size_t, typename Functor > | |
constexpr auto | make_array (Functor &&func) noexcept -> std::array< decltype(func(std::declval< Index >())), N > |
template<typename Common , typename... Ts> | |
auto | ref (Ts &... args) |
template<class... Ts> | |
overloaded (Ts...) -> overloaded< Ts... > | |
template<typename T , typename V > | |
auto | erase_remove (T &cont, const V &elem) -> decltype(std::distance(std::declval< T >().begin(), std::declval< T >().end())) |
template<typename T , typename Pred > | |
auto | erase_remove_if (T &cont, Pred pred) -> decltype(std::distance(std::declval< T >().begin(), std::declval< T >().end())) |
template<typename T > | |
void | reverse_erase (T &cont) |
template<typename T , typename Pred > | |
void | reverse_erase_if (T &cont, Pred pred) |
template<typename T , typename Pred > | |
size_t | map_erase_remove_if (T &cont, Pred pred) |
template<typename T > | |
bool | push_back_unique (T &cont, typename T::value_type elem) |
template<typename Dst , typename... Srcs> | |
Dst & | append (Dst &dest, Srcs &&... sources) |
template<typename T , typename V > | |
auto | find (T &cont, const V &elem) |
template<typename T , typename Pred > | |
auto | find_if (T &cont, Pred pred) -> typename T::iterator |
template<typename T , typename Pred > | |
auto | find_if (const T &cont, Pred pred) -> typename T::const_iterator |
template<typename T , typename V > | |
bool | contains (T &cont, const V &elem) |
template<typename T , typename Pred > | |
bool | contains_if (T &cont, Pred pred) |
template<typename T , typename V > | |
bool | contains (const T &cont, const V &elem) |
template<typename T , typename Pred > | |
bool | contains_if (const T &cont, Pred pred) |
template<typename T , typename P > | |
auto | find_if_or_null (T &cont, P pred) -> typename T::value_type |
template<typename T , typename V > | |
auto | find_or_null (T &cont, const V &elem) -> typename T::value_type |
template<typename T , typename V , typename Callable > | |
auto | find_or_null (T &cont, const V &elem, Callable f) -> typename T::value_type |
template<typename T > | |
bool | has_key (T &map, const typename T::key_type &key) |
template<typename T > | |
bool | insert_unique (T &map, const typename T::key_type &key, typename T::mapped_type &value) |
template<typename T , typename V > | |
auto | map_find_or_null (T &cont, const V &elem) -> typename T::mapped_type |
template<typename T , typename V , typename Callable > | |
auto | map_find_or_null (T &cont, const V &elem, Callable f) -> typename std::invoke_result_t< Callable, typename T::mapped_type > |
template<typename InputIter , typename UnaryPredicate > | |
constexpr bool | all_of (InputIter begin, InputIter end, UnaryPredicate pred) |
template<typename T , typename UnaryPredicate > | |
constexpr bool | all_of (const T &cont, UnaryPredicate pred) |
template<typename InputIter , typename UnaryPredicate > | |
constexpr bool | any_of (InputIter begin, InputIter end, UnaryPredicate pred) |
template<typename T , typename UnaryPredicate > | |
constexpr bool | any_of (const T &cont, UnaryPredicate pred) |
template<typename InputIter , typename UnaryPredicate > | |
constexpr bool | none_of (InputIter begin, InputIter end, UnaryPredicate pred) |
template<typename T , typename UnaryPredicate > | |
constexpr bool | none_of (const T &cont, UnaryPredicate pred) |
template<typename Iter , typename Proj = identity> | |
Iter | find_not_equal (Iter begin, Iter end, Proj proj={}) |
template<typename T , typename OutIt , typename P > | |
OutIt | copy_if (const T &cont, OutIt out, P pred) |
template<typename T , typename P > | |
auto | copy_if (const T &cont, P pred) -> std::vector< typename T::value_type > |
template<typename T , typename UnaryOperation > | |
auto | transform (const T &cont, UnaryOperation op) -> std::vector< std::invoke_result_t< UnaryOperation, const typename T::value_type > > |
template<typename T , typename Pred > | |
auto | ordering (T &cont, Pred pred) -> std::vector< size_t > |
template<typename T > | |
auto | ordering (T &cont) -> std::vector< size_t > |
template<typename Generator > | |
auto | table (Generator gen, int start, int end, int step=1) -> std::vector< decltype(gen(std::declval< int >()))> |
template<class T , typename Tuple , size_t count = 0> | |
constexpr size_t | index_of () |
template<class T , typename Tuple , size_t count = 0> | |
constexpr size_t | index_of_derived () |
template<typename T > | |
bool | is_future_ready (const std::future< T > &future) |
IVW_CORE_API std::wstring | toWstring (std::string_view str) |
convert the given std::string to std::wstring. On Windows, MultiByteToWideChar is used for this conversion assuming utf8 encoding. Otherwise, std::mbsrtowcs is used. | |
IVW_CORE_API std::string | fromWstring (std::wstring_view str) |
convert the given std::wstring to std::string. On Windows, WideCharToMultiByte is used for this conversion assuming utf8 encoding. Otherwise, std::wcsrtombs is used. | |
template<typename Func > | |
constexpr void | forEachStringPart (std::string_view str, std::string_view sep, Func &&func) |
Call a functor on each part of the string after splitting by sep. | |
constexpr std::pair< std::string_view, std::string_view > | splitByFirst (std::string_view str, char delimiter=' ') |
Divide a string into two parts by the first instance of a delimiter. | |
constexpr std::pair< std::string_view, std::string_view > | splitByFirst (std::string_view str, std::string_view delimiter) |
Divide a string into two parts by the first instance of a delimiter. | |
constexpr std::pair< std::string_view, std::string_view > | splitByLast (std::string_view str, char delimiter=' ') |
Divide a string into two parts by the last instance of a delimiter. | |
constexpr std::pair< std::string_view, std::string_view > | splitByLast (std::string_view str, std::string_view delimiter) |
Divide a string into two parts by the last instance of a delimiter. | |
IVW_CORE_API std::vector< std::string > | splitString (std::string_view str, char delimiter=' ') |
Split string into substrings based on separating delimiter character. Using delimiter ';' on string "aa;bb" will result in a vector contaning aa and bb. | |
IVW_CORE_API std::vector< std::string_view > | splitStringView (std::string_view str, char delimiter=' ') |
Split string into substrings based on separating delimiter character. Using delimiter ';' on string "aa;bb" will result in a vector contaning aa and bb. | |
constexpr std::string_view | trim (std::string_view str) noexcept |
trims str from beginning and end by removing white spaces | |
constexpr std::string_view | ltrim (std::string_view str) noexcept |
trims str from beginning removing white spaces | |
constexpr std::string_view | rtrim (std::string_view str) noexcept |
trims str from end by removing white spaces | |
IVW_CORE_API bool | iCaseEndsWith (std::string_view str, std::string_view suffix) |
Checks if provided string ends with suffix using case insensitive equal comparison. | |
IVW_CORE_API std::string | elideLines (std::string_view str, std::string_view abbrev="...", size_t maxLineLength=500) |
Elide parts of lines in str which are longer than maxLineLength and append abbrev instead. | |
IVW_CORE_API void | urlEncodeTo (std::string_view text, StrBuffer &strBuffer) |
IVW_CORE_API void | htmlEncodeTo (std::string_view data, StrBuffer &strBuffer) |
IVW_CORE_API std::string | urlEncode (std::string_view text) |
IVW_CORE_API std::string | htmlEncode (std::string_view data) |
IVW_CORE_API void | setThreadDescription (const std::string &desc) |
IVW_CORE_API int | getPid () |
IVW_CORE_API ThreadPool & | getThreadPool () |
IVW_CORE_API ThreadPool & | getThreadPool (InviwoApplication *app) |
IVW_CORE_API void | waitForPool () |
IVW_CORE_API void | waitForPool (InviwoApplication *app) |
IVW_CORE_API size_t | processFront () |
IVW_CORE_API size_t | processFront (InviwoApplication *app) |
IVW_CORE_API size_t | getPoolSize () |
template<class F , class... Args> | |
auto | dispatchPool (F &&f, Args &&... args) -> std::future< std::invoke_result_t< F, Args... > > |
template<class F , class... Args> | |
auto | dispatchPool (InviwoApplication *app, F &&f, Args &&... args) -> std::future< std::invoke_result_t< F, Args... > > |
IVW_CORE_API void | dispatchFrontAndForget (std::function< void()> fun) |
IVW_CORE_API void | dispatchFrontAndForget (InviwoApplication *app, std::function< void()> fun) |
template<class F , class... Args> | |
auto | dispatchFront (F &&f, Args &&... args) -> std::future< std::invoke_result_t< F, Args... > > |
template<class F , class... Args> | |
auto | dispatchFront (InviwoApplication *app, F &&f, Args &&... args) -> std::future< std::invoke_result_t< F, Args... > > |
IVW_CORE_API TimerThread & | getDefaultTimerThread () |
template<typename Transform , typename Iter > | |
auto | makeTransformIterator (Transform &&transform, Iter iter) |
template<typename Range , typename Transform > | |
auto | transformRange (Range &range, Transform &&transform) |
template<typename... A, typename F > | |
constexpr bool | is_callable_with (F &&) |
IVW_CORE_API void | saveNetwork (ProcessorNetwork *network, std::string_view filename) |
IVW_CORE_API void | saveAllCanvases (ProcessorNetwork *network, const std::filesystem::path &dir, std::string_view name="UPN", std::string_view ext=".png", bool onlyActiveCanvases=false) |
IVW_CORE_API bool | isValidIdentifierCharacter (char c, std::string_view extra="") |
IVW_CORE_API void | validateIdentifier (std::string_view identifier, std::string_view type, ExceptionContext context) |
IVW_CORE_API std::string | findUniqueIdentifier (std::string_view identifier, std::function< bool(std::string_view)> isUnique, std::string_view sep=" ") |
IVW_CORE_API std::string | cleanIdentifier (std::string_view identifier, std::string_view extra="") |
IVW_CORE_API std::string | stripModuleFileNameDecoration (const std::filesystem::path &filePath) |
Removes inviwo-module from module library file name. Turns "/path/to/inviwo-module-yourmodule.dll" into "yourmodule". Returns filename without extension if inviwo-module was not found. | |
IVW_CORE_API std::string | stripIdentifier (std::string_view identifier) |
template<typename... Args> | |
void | show (Args &&... args) |
template<typename... Args> | |
void | hide (Args &&... args) |
template<typename C > | |
void | forEachVoxel (const size3_t dims, C callback) |
template<typename C > | |
void | forEachVoxel (const VolumeRAM &v, C callback) |
template<typename C > | |
void | forEachVoxelParallel (const size3_t dims, C callback, size_t jobs=0) |
template<typename C > | |
void | forEachVoxelParallel (const VolumeRAM &v, C callback, size_t jobs=0) |
IVW_CORE_API bool | hasTimestamps (const VolumeSequence &seq, bool checkfirstonly=true) |
IVW_CORE_API std::pair< double, double > | getTimestampRange (const VolumeSequence &seq, bool sorted=true) |
IVW_CORE_API bool | isSorted (const VolumeSequence &seq) |
VolumeSequence IVW_CORE_API | sortSequence (const VolumeSequence &seq) |
IVW_CORE_API std::pair< std::shared_ptr< const Volume >, std::shared_ptr< const Volume > > | getVolumesForTimestep (const VolumeSequence &seq, double t, bool sorted=true) |
bool IVW_CORE_API | hasTimestamp (const std::shared_ptr< const Volume > &vol) |
double IVW_CORE_API | getTimestamp (const std::shared_ptr< const Volume > &vol) |
bool IVW_CORE_API | hasMargins (const std::shared_ptr< const Volume > &volume) |
bool IVW_CORE_API | isBricked (const std::shared_ptr< const Volume > &volume) |
size3_t IVW_CORE_API | getBrickDimensions (const std::shared_ptr< const Volume > &volume) |
std::pair< vec3, vec3 > IVW_CORE_API | getVolumeMargins (const std::shared_ptr< const Volume > &volume) |
return the margins of a volume, in normalized texture coordinates [0,1] | |
size3_t IVW_CORE_API | getVolumeDimensions (const std::shared_ptr< const Volume > &volume) |
returns the true volume dimensions considering volume margins and bricking | |
double IVW_CORE_API | voxelVolume (const Volume &volume) |
calculates the volume of a single voxel, taking the basis and the dimensions into account The units of the result is in the unit as the basis vectors ^3 | |
template<typename... T> | |
auto | zip (T &&... args) -> detailzip::zipper< T... > |
template<typename T > | |
auto | make_sequence (const T &begin, const T &end, const T &inc=T{1}) -> sequence< T > |
template<typename TIndex = size_t, typename T , typename... Ts> | |
auto | enumerate (T &&cont, Ts &&... conts) |
IVW_SYS_API std::vector< ModuleContainer > | getModuleContainersImpl (ModuleManager &moduleManager, std::span< const std::filesystem::path > searchPaths) |
template<typename... Args> | |
std::vector< inviwo::ModuleContainer > | getModuleContainers (ModuleManager &moduleManager, Args &&... searchPaths) |
template<typename Filter , typename... Args> | |
void | registerModulesFiltered (ModuleManager &moduleManager, Filter &&filter, Args &&... searchPaths) |
template<typename... Args> | |
void | registerModules (ModuleManager &moduleManager, Args &&... searchPaths) |
void IVW_QTEDITOR_API | insertNetworkForData (const std::filesystem::path &dataFile, ProcessorNetwork *net, bool alwaysFirst=false, bool onlySource=false, QWidget *parent=nullptr) |
template<typename T , typename TRAMrep > requires requires(T data) { typename T::repr; std::is_base_of_v<typename T::repr, TRAMrep>; data.template getRepresentation<TRAMrep>(); } | |
std::shared_ptr< T > | combineChannels (const std::array< DataInport< T >, 4 > &sources, const std::array< int, 4 > &selectedPortChannels) |
template<class T , typename std::enable_if< util::rank< T >::value==1 &&util::extent< T >::value==2, int >::type = 0> | |
bool | isConvex (const std::vector< T > &polygon) |
check whether the given polygon is convex | |
template<class T , typename std::enable_if< util::rank< T >::value==1 &&util::extent< T >::value==2, int >::type = 0> | |
bool | isInside (const std::vector< T > &hull, const T &p) |
check whether a given point lies within the convex hull | |
template<class T , typename std::enable_if< util::rank< T >::value==1 &&util::extent< T >::value==2, int >::type = 0> | |
double | getArea (const std::vector< T > &polygon) |
compute the area of a convex polygon | |
template<class T , typename std::enable_if< util::rank< T >::value==1 &&util::extent< T >::value==2, int >::type = 0> | |
std::vector< T > | convexHull (const std::vector< T > &points) |
compute the complex hull from a given set of 2D points using the Monotone Chain algorithm, i.e. Andrew's convex hull algorithm | |
std::shared_ptr< Mesh > IVW_MODULE_BASE_API | convertHullToMesh (const std::vector< vec2 > &hull, bool useIndices=false) |
IVW_MODULE_BASE_API std::pair< dvec4, dvec4 > | volumeMinMax (const VolumeRAM *volume, IgnoreSpecialValues ignore=IgnoreSpecialValues::No) |
IVW_MODULE_BASE_API std::pair< dvec4, dvec4 > | layerMinMax (const LayerRAM *layer, IgnoreSpecialValues ignore=IgnoreSpecialValues::No) |
IVW_MODULE_BASE_API std::pair< dvec4, dvec4 > | bufferMinMax (const BufferRAM *layer, IgnoreSpecialValues ignore=IgnoreSpecialValues::No) |
IVW_MODULE_BASE_API std::pair< dvec4, dvec4 > | volumeMinMax (const Volume *volume, IgnoreSpecialValues ignore=IgnoreSpecialValues::No) |
IVW_MODULE_BASE_API std::pair< dvec4, dvec4 > | layerMinMax (const Layer *layer, IgnoreSpecialValues ignore=IgnoreSpecialValues::No) |
IVW_MODULE_BASE_API std::pair< dvec4, dvec4 > | bufferMinMax (const BufferBase *buffer, IgnoreSpecialValues ignore=IgnoreSpecialValues::No) |
template<typename ValueType > | |
std::pair< dvec4, dvec4 > | dataMinMax (const ValueType *data, size_t size, IgnoreSpecialValues ignore=IgnoreSpecialValues::No) |
template<typename T , typename U , typename Predicate , typename ValueTransform , typename ProgressCallback > | |
void | layerRAMDistanceTransform (const LayerRAMPrecision< T > *inLayer, LayerRAMPrecision< U > *outDistanceField, const Matrix< 2, U > basis, const size2_t upsample, Predicate predicate, ValueTransform valueTransform, ProgressCallback callback) |
template<typename T , typename U > | |
void | layerRAMDistanceTransform (const LayerRAMPrecision< T > *inVolume, LayerRAMPrecision< U > *outDistanceField, const Matrix< 2, U > basis, const size2_t upsample) |
template<typename U , typename Predicate , typename ValueTransform , typename ProgressCallback > | |
void | layerDistanceTransform (const Layer *inLayer, LayerRAMPrecision< U > *outDistanceField, const size2_t upsample, Predicate predicate, ValueTransform valueTransform, ProgressCallback callback) |
template<typename U , typename ProgressCallback > | |
void | layerDistanceTransform (const Layer *inLayer, LayerRAMPrecision< U > *outDistanceField, const size2_t upsample, double threshold, bool normalize, bool flip, bool square, double scale, ProgressCallback callback) |
template<typename U > | |
void | layerDistanceTransform (const Layer *inLayer, LayerRAMPrecision< U > *outDistanceField, const size2_t upsample, double threshold, bool normalize, bool flip, bool square, double scale) |
IVW_MODULE_BASE_API std::shared_ptr< LayerRAM > | layerSubSet (const Layer *in, ivec2 offset, size2_t extent, bool clampBorderOutsideImage=false) |
extracts a subregion from a layer and returns it as a new layer | |
template<typename T > | |
std::shared_ptr< LayerRAMPrecision< T > > | typedLayerSubSet (const Layer *in, ivec2 offset, size2_t extent, bool clampBorderOutsideImage=false) |
extracts a subregion from a layer and converts it into a new layer | |
template<typename T , typename OutIt > | |
void | generatePoints (OutIt outIt, std::variant< Grid3DPointGeneration, RandomCubicalPointGeneration, RandomSphericalPointGeneration > opts) |
template<typename T > | |
T | haltonSequence (size_t n, size_t base) |
template<typename T > | |
std::shared_ptr< Layer > | haltonSequence (size2_t dims, size_t numberOfPoints, size_t baseX=2, size_t baseY=3) |
template<typename T > | |
std::shared_ptr< Volume > | haltonSequence (size3_t dims, size_t numberOfPoints, size_t baseX=2, size_t baseY=3, size_t baseZ=5) |
template<typename T , typename Rand = std::mt19937, typename Dist = typename std::conditional<std::is_integral<T>::value, std::uniform_int_distribution<T>, std::uniform_real_distribution<T>>::type> | |
void | randomSequence (T *data, size_t numberOfElements, Rand &randomNumberGenerator=Rand(), Dist &distribution=Dist(0, 1)) |
template<typename T , typename Rand = std::mt19937, typename Dist = typename std::conditional<std::is_integral<T>::value, std::uniform_int_distribution<T>, std::uniform_real_distribution<T>>::type> | |
void | randomSequence (std::span< T > data, Rand &randomNumberGenerator=Rand(), Dist &distribution=Dist(0, 1)) |
template<typename T , typename Rand = std::mt19937, typename Dist = typename std::conditional<std::is_integral<T>::value, std::uniform_int_distribution<T>, std::uniform_real_distribution<T>>::type> | |
std::shared_ptr< LayerRAMPrecision< T > > | randomLayerRAM (size2_t dims, Rand &randomNumberGenerator=Rand(), Dist &distribution=Dist(0, 1)) |
template<typename T , typename Rand = std::mt19937, typename Dist = typename std::conditional<std::is_integral<T>::value, std::uniform_int_distribution<T>, std::uniform_real_distribution<T>>::type> | |
std::shared_ptr< Layer > | randomLayer (size2_t dims, Rand &randomNumberGenerator=Rand(), Dist &distribution=Dist(0, 1)) |
template<typename T , typename Rand = std::mt19937, typename Dist = typename std::conditional<std::is_integral<T>::value, std::uniform_int_distribution<T>, std::uniform_real_distribution<T>>::type> | |
std::shared_ptr< Volume > | randomVolume (size3_t dims, Rand &randomNumberGenerator=Rand(), Dist &distribution=Dist(0, 1)) |
template<typename Rand = std::mt19937> | |
std::shared_ptr< Layer > | perlinNoise (size2_t dims, float persistence, size_t startLevel, size_t endLevel, Rand &randomNumberGenerator=Rand()) |
template<typename Rand = std::mt19937> | |
std::shared_ptr< Layer > | poissonDisk (size2_t dims, size_t poissonDotsAlongX, size_t maxPoints, Rand &randomNumberGenerator=Rand()) |
IVW_MODULE_BASE_API std::shared_ptr< Mesh > | marchingcubes (std::shared_ptr< const Volume > volume, double iso, const vec4 &color, bool invert, bool enclose, std::function< void(float)> progressCallback=std::function< void(float)>(), std::function< bool(const size3_t &)> maskingCallback=[](const size3_t &) { return true;}) |
IVW_MODULE_BASE_API std::shared_ptr< Mesh > | marchingCubesOpt (std::shared_ptr< const Volume > volume, double iso, const vec4 &color, bool invert, bool enclose, std::function< void(float)> progressCallback=nullptr, std::function< bool(const size3_t &)> maskingCallback=nullptr) |
std::shared_ptr< Mesh > | marchingtetrahedron (std::shared_ptr< const Volume > volume, double iso, const vec4 &color=vec4(1.0f), bool invert=false, bool enclose=true, std::function< void(float)> progressCallback=std::function< void(float)>(), std::function< bool(const size3_t &)> maskingCallback=[](const size3_t &) { return true;}) |
IVW_MODULE_BASE_API std::unique_ptr< Volume > | curlVolume (std::shared_ptr< const Volume > volume) |
IVW_MODULE_BASE_API std::unique_ptr< Volume > | curlVolume (const Volume &volume) |
IVW_MODULE_BASE_API std::unique_ptr< Volume > | divergenceVolume (const Volume &volume) |
IVW_MODULE_BASE_API std::unique_ptr< Volume > | divergenceVolume (std::shared_ptr< const Volume > volume) |
template<typename Functor > | |
std::unique_ptr< Volume > | generateVolume (const size3_t &dimensions, const mat3 &basis, Functor &&function) |
template<typename T = float> | |
std::unique_ptr< Volume > | makeSingleVoxelVolume (const size3_t &size) |
template<typename T = float> | |
std::unique_ptr< Volume > | makeSphericalVolume (const size3_t &size) |
template<typename T = float> | |
std::unique_ptr< Volume > | makeRippleVolume (const size3_t &size) |
template<typename T = float> | |
std::unique_ptr< Volume > | makeMarchingCubeVolume (const size_t &index) |
IVW_MODULE_BASE_API std::shared_ptr< Volume > | gradientVolume (std::shared_ptr< const Volume > volume, int channel) |
IVW_MODULE_BASE_API std::shared_ptr< Volume > | volumeLaplacian (std::shared_ptr< const Volume > volume, VolumeLaplacianPostProcessing postProcessing, double scale) |
template<typename T , typename U , typename Predicate , typename ValueTransform , typename ProgressCallback > | |
void | volumeRAMDistanceTransform (const VolumeRAMPrecision< T > *inVolume, VolumeRAMPrecision< U > *outDistanceField, const Matrix< 3, U > &basis, const size3_t &upsample, Predicate predicate, ValueTransform valueTransform, ProgressCallback progress) |
template<typename T , typename U > | |
void | volumeRAMDistanceTransform (const VolumeRAMPrecision< T > *inVolume, VolumeRAMPrecision< U > *outDistanceField, const Matrix< 3, U > &basis, const size3_t &upsample) |
template<typename U , typename Predicate , typename ValueTransform , typename ProgressCallback > | |
void | volumeDistanceTransform (const Volume *inVolume, VolumeRAMPrecision< U > *outDistanceField, const size3_t &upsample, Predicate predicate, ValueTransform valueTransform, ProgressCallback progress) |
template<typename U , typename ProgressCallback > | |
void | volumeDistanceTransform (const Volume *inVolume, VolumeRAMPrecision< U > *outDistanceField, const size3_t &upsample, double threshold, bool normalize, bool flip, bool square, double scale, ProgressCallback progress) |
template<typename U > | |
void | volumeDistanceTransform (const Volume *inVolume, VolumeRAMPrecision< U > *outDistanceField, const size3_t &upsample, double threshold, bool normalize, bool flip, bool square, double scale) |
IVW_MODULE_BASE_API std::shared_ptr< VolumeRAM > | volumeDownsample (const VolumeRAM *in, size3_t strides, DownsamplingMode mode) |
IVW_MODULE_BASE_API std::shared_ptr< VolumeRAM > | volumeStridedDownsample (const VolumeRAM *in, size3_t strides) |
IVW_MODULE_BASE_API std::shared_ptr< VolumeRAM > | volumeAveragedDownsample (const VolumeRAM *in, size3_t strides) |
IVW_MODULE_BASE_API size_t | volumeSignificantVoxels (const VolumeRAM *volume, IgnoreSpecialValues ignore=IgnoreSpecialValues::No) |
IVW_MODULE_BASE_API std::shared_ptr< Volume > | voronoiSegmentation (const size3_t volumeDimensions, const mat4 &indexToDataMatrix, const mat4 &dataToModelMatrix, const std::vector< std::pair< uint32_t, vec3 > > &seedPointsWithIndices, const Wrapping3D &wrapping, const std::optional< std::vector< float > > &weights) |
IVW_MODULE_BASE_API void | writeDatVolume (const Volume &data, const std::filesystem::path &filePath, Overwrite overwrite=Overwrite::No) |
IVW_MODULE_BASE_API std::filesystem::path | writeIvfVolumeSequence (const VolumeSequence &volumes, std::string_view name, const std::filesystem::path &path, std::string_view relativePathToElements="", Overwrite overwrite=Overwrite::Yes) |
Writes a volume sequence to disk. | |
IVW_MODULE_BASE_API void | writeIvfVolume (const Volume &data, const std::filesystem::path &filePath, Overwrite overwrite=Overwrite::No) |
void | updateReaderFromFile (const FileProperty &filePath, OptionProperty< FileExtension > &extensions) |
template<typename... Types> | |
void | updateFilenameFilters (const DataReaderFactory &rf, FileProperty &filePath, OptionProperty< FileExtension > &optionProperty) |
template<typename T , typename std::enable_if< util::rank< T >::value==1, int >::type = 0> | |
auto | glm2eigen (const T &elem) -> Eigen::Matrix< typename T::value_type, util::extent< T, 0 >::value, 1 > |
template<typename T , unsigned Rows, unsigned Cols, typename std::enable_if<(Rows >=2 &&Rows<=4 &&Cols >=2 &&Cols<=4), int >::type = 0> | |
auto | eigen2glm (const Eigen::Matrix< T, Rows, Cols > &m) |
template<typename T , unsigned Rows, unsigned Cols, typename std::enable_if<(Cols >=2 &&Cols<=4 &&Rows==1), int >::type = 0> | |
auto | eigen2glm (const Eigen::Matrix< T, Cols, Cols > &m) |
template<typename T > | |
std::shared_ptr< Image > | eigenMatToImage (const T &m, bool flipY=false, std::string name="") |
IVW_MODULE_FONTRENDERING_API TextTextureObject | createTextTextureObject (TextRenderer &textRenderer, std::string text, vec4 fontColor, std::shared_ptr< Texture2D > tex=nullptr) |
Creates a texture with rendered text for a given string including its bounding box. | |
IVW_MODULE_FONTRENDERING_API std::shared_ptr< Texture2D > | createTextTexture (TextRenderer &textRenderer, std::string text, vec4 fontColor, std::shared_ptr< Texture2D > tex=nullptr) |
Creates a texture with rendered text for a given string. | |
IVW_MODULE_GLFW_API MouseButton | mapGLFWMouseButton (int mouseButtonGLFW) |
IVW_MODULE_GLFW_API MouseState | mapGLFWMouseState (int mouseStateGLFW) |
IVW_MODULE_GLFW_API KeyModifiers | mapGLFWModifiers (int modifiersGLFW) |
IVW_MODULE_GLFW_API KeyState | mapGLFWMKeyState (int actionGLFW) |
IVW_MODULE_GLFW_API IvwKey | mapGLFWMKey (int keyGLFW) |
IVW_MODULE_QTWIDGETS_API IvwKey | mapKeyFromQt (const QKeyEvent *keyevent) |
IVW_MODULE_QTWIDGETS_API ModifierAction | getModifierAction (Qt::KeyboardModifiers modifiers) |
IVW_MODULE_QTWIDGETS_API MouseCursor | fromCursorShape (const Qt::CursorShape cursor) |
IVW_MODULE_QTWIDGETS_API Qt::CursorShape | toCursorShape (const MouseCursor cursor) |
template<typename T > | |
T | spherical (T val) |
template<typename T > | |
T | euclidean (T val) |
template<class T , class... Args> | |
auto | make_qptr (Args &&... args) |
IVW_MODULE_QTWIDGETS_API std::shared_ptr< TransferFunction > | importTransferFunctionDialog (QWidget *parent=nullptr) |
Shows an InviwoFileDialog to import a TransferFunction from a file. | |
IVW_MODULE_QTWIDGETS_API void | exportTransferFunctionDialog (const TransferFunction &tf, QWidget *parent=nullptr) |
Shows an InviwoFileDialog to export a TFPrimitiveSet to a file. | |
IVW_MODULE_QTWIDGETS_API std::shared_ptr< IsoValueCollection > | importIsoValueCollectionDialog (QWidget *parent=nullptr) |
Shows an InviwoFileDialog to import a IsoValueCollection from a file. | |
IVW_MODULE_QTWIDGETS_API void | exportIsoValueCollectionDialog (const IsoValueCollection &iso, QWidget *parent=nullptr) |
Shows an InviwoFileDialog to export a TFPrimitiveSet to a file. | |
IVW_MODULE_QTWIDGETS_API QMenu * | addTFPresetsMenu (QWidget *parent, QMenu *menu, TransferFunctionProperty *property) |
create a submenu containing entries for TF presets of all transfer functions found in the path PathType::TransferFunctions . Upon selecting a menu entry, the respective preset will be loaded by property . The submenu will be disabled if property is read-only. | |
IVW_MODULE_QTWIDGETS_API QMenu * | addTFColorbrewerPresetsMenu (QWidget *parent, QMenu *menu, TransferFunctionProperty *property) |
auto | encode (const std::vector< SgctCommand > &commands) -> std::vector< std::byte > |
void | decode (const std::vector< std::byte > &bytes, std::vector< SgctCommand > &commands) |
auto | sgctToInviwo (sgct::Log::Level level) -> inviwo::LogLevel |
IVW_MODULE_VECTORFIELDVISUALIZATION_API IntegralLine | curvature (const IntegralLine &line, dmat4 toWorld) |
IVW_MODULE_VECTORFIELDVISUALIZATION_API IntegralLineSet | curvature (const IntegralLineSet &lines) |
IVW_MODULE_VECTORFIELDVISUALIZATION_API void | curvature (IntegralLine &line, dmat4 toWorld) |
IVW_MODULE_VECTORFIELDVISUALIZATION_API void | curvature (IntegralLineSet &lines) |
IVW_MODULE_VECTORFIELDVISUALIZATION_API IntegralLine | tortuosity (const IntegralLine &line, dmat4 toWorld) |
IVW_MODULE_VECTORFIELDVISUALIZATION_API IntegralLineSet | tortuosity (const IntegralLineSet &lines) |
IVW_MODULE_VECTORFIELDVISUALIZATION_API void | tortuosity (IntegralLine &line, dmat4 toWorld) |
IVW_MODULE_VECTORFIELDVISUALIZATION_API void | tortuosity (IntegralLineSet &lines) |
void IVW_MODULE_VOLUME_API | remap (Volume &volume, const std::vector< int > &src, const std::vector< int > &dst, int missingValue, bool useMissingValue) |
Variables | |
constexpr std::array< std::string_view, 4 > | defaultAxesNames = {"x", "y", "z", "t"} |
constexpr std::array< Unit, 4 > | defaultAxesUnits = {Unit{}, Unit{}, Unit{}, Unit{}} |
template<template< class... > class Op, class... Args> | |
constexpr bool | is_detected_v = is_detected<Op, Args...>::value |
template<class Expected , template< class... > class Op, class... Args> | |
constexpr bool | is_detected_exact_v = is_detected_exact<Expected, Op, Args...>::value |
template<class To , template< class... > class Op, class... Args> | |
constexpr bool | is_detected_convertible_v = is_detected_convertible<To, Op, Args...>::value |
template<typename T > | |
constexpr bool | is_floating_point_v = is_floating_point<T>::value |
template<class T > | |
constexpr size_t | rank_v = rank<T>::value |
template<class T , unsigned N = 0> | |
constexpr size_t | extent_v = extent<T, N>::value |
template<class T > | |
constexpr size_t | flat_extent_v = flat_extent<T>::value |
constexpr auto | fmtHelp |
IVW_CORE_API std::function< std::optional< mat4 >()> | boundingBox (const DataInport< Layer > &layer) |
IVW_CORE_API std::function< std::optional< mat4 >()> | boundingBox (const DataInport< Layer, 0 > &layers) |
IVW_CORE_API std::function< std::optional< mat4 >()> | boundingBox (const DataInport< Layer, 0, true > &layers) |
IVW_CORE_API std::function< std::optional< mat4 >()> | boundingBox (const DataOutport< Layer > &layer) |
IVW_CORE_API std::function< std::optional< mat4 >()> | boundingBox (const DataInport< Mesh > &mesh) |
IVW_CORE_API std::function< std::optional< mat4 >()> | boundingBox (const DataInport< Mesh, 0 > &meshes) |
IVW_CORE_API std::function< std::optional< mat4 >()> | boundingBox (const DataInport< Mesh, 0, true > &meshes) |
IVW_CORE_API std::function< std::optional< mat4 >()> | boundingBox (const DataOutport< Mesh > &mesh) |
IVW_CORE_API std::function< std::optional< mat4 >()> | boundingBox (const DataInport< Volume > &volume) |
IVW_CORE_API std::function< std::optional< mat4 >()> | boundingBox (const DataInport< std::vector< std::shared_ptr< Volume > > > &volumes) |
IVW_CORE_API std::function< std::optional< mat4 >()> | boundingBox (const DataOutport< Volume > &volume) |
IVW_CORE_API std::function< std::optional< mat4 >()> | boundingBox (const DataOutport< std::vector< std::shared_ptr< Volume > > > &volumes) |
IVW_CORE_API CameraFactory * | getCameraFactory () |
IVW_CORE_API CameraFactory * | getCameraFactory (InviwoApplication *app) |
IVW_CORE_API CameraFactory * | getCameraFactory (Processor *processor) |
IVW_CORE_API CameraFactory * | getCameraFactory (Property *property) |
IVW_CORE_API DataReaderFactory * | getDataReaderFactory () |
IVW_CORE_API DataReaderFactory * | getDataReaderFactory (InviwoApplication *app) |
IVW_CORE_API DataReaderFactory * | getDataReaderFactory (Processor *processor) |
IVW_CORE_API DataReaderFactory * | getDataReaderFactory (Property *property) |
IVW_CORE_API DataWriterFactory * | getDataWriterFactory () |
IVW_CORE_API DataWriterFactory * | getDataWriterFactory (InviwoApplication *app) |
IVW_CORE_API DataWriterFactory * | getDataWriterFactory (Processor *processor) |
IVW_CORE_API DataWriterFactory * | getDataWriterFactory (Property *property) |
IVW_CORE_API DialogFactory * | getDialogFactory () |
IVW_CORE_API DialogFactory * | getDialogFactory (InviwoApplication *app) |
IVW_CORE_API DialogFactory * | getDialogFactory (Processor *processor) |
IVW_CORE_API DialogFactory * | getDialogFactory (Property *property) |
IVW_CORE_API MeshDrawerFactory * | getMeshDrawerFactory () |
IVW_CORE_API MeshDrawerFactory * | getMeshDrawerFactory (InviwoApplication *app) |
IVW_CORE_API MeshDrawerFactory * | getMeshDrawerFactory (Processor *processor) |
IVW_CORE_API MeshDrawerFactory * | getMeshDrawerFactory (Property *property) |
IVW_CORE_API MetaDataFactory * | getMetaDataFactory () |
IVW_CORE_API MetaDataFactory * | getMetaDataFactory (InviwoApplication *app) |
IVW_CORE_API MetaDataFactory * | getMetaDataFactory (Processor *processor) |
IVW_CORE_API MetaDataFactory * | getMetaDataFactory (Property *property) |
IVW_CORE_API InportFactory * | getInportFactory () |
IVW_CORE_API InportFactory * | getInportFactory (InviwoApplication *app) |
IVW_CORE_API InportFactory * | getInportFactory (Processor *processor) |
IVW_CORE_API InportFactory * | getInportFactory (Property *property) |
IVW_CORE_API OutportFactory * | getOutportFactory () |
IVW_CORE_API OutportFactory * | getOutportFactory (InviwoApplication *app) |
IVW_CORE_API OutportFactory * | getOutportFactory (Processor *processor) |
IVW_CORE_API OutportFactory * | getOutportFactory (Property *property) |
IVW_CORE_API PortInspectorFactory * | getPortInspectorFactory () |
IVW_CORE_API PortInspectorFactory * | getPortInspectorFactory (InviwoApplication *app) |
IVW_CORE_API PortInspectorFactory * | getPortInspectorFactory (Processor *processor) |
IVW_CORE_API PortInspectorFactory * | getPortInspectorFactory (Property *property) |
IVW_CORE_API ProcessorFactory * | getProcessorFactory () |
IVW_CORE_API ProcessorFactory * | getProcessorFactory (InviwoApplication *app) |
IVW_CORE_API ProcessorFactory * | getProcessorFactory (Processor *processor) |
IVW_CORE_API ProcessorFactory * | getProcessorFactory (Property *property) |
IVW_CORE_API ProcessorWidgetFactory * | getProcessorWidgetFactory () |
IVW_CORE_API ProcessorWidgetFactory * | getProcessorWidgetFactory (InviwoApplication *app) |
IVW_CORE_API ProcessorWidgetFactory * | getProcessorWidgetFactory (Processor *processor) |
IVW_CORE_API ProcessorWidgetFactory * | getProcessorWidgetFactory (Property *property) |
IVW_CORE_API PropertyConverterManager * | getPropertyConverterManager () |
IVW_CORE_API PropertyConverterManager * | getPropertyConverterManager (InviwoApplication *app) |
IVW_CORE_API PropertyConverterManager * | getPropertyConverterManager (Processor *processor) |
IVW_CORE_API PropertyConverterManager * | getPropertyConverterManager (Property *property) |
IVW_CORE_API PropertyFactory * | getPropertyFactory () |
IVW_CORE_API PropertyFactory * | getPropertyFactory (InviwoApplication *app) |
IVW_CORE_API PropertyFactory * | getPropertyFactory (Processor *processor) |
IVW_CORE_API PropertyFactory * | getPropertyFactory (Property *property) |
IVW_CORE_API PropertyWidgetFactory * | getPropertyWidgetFactory () |
IVW_CORE_API PropertyWidgetFactory * | getPropertyWidgetFactory (InviwoApplication *app) |
IVW_CORE_API PropertyWidgetFactory * | getPropertyWidgetFactory (Processor *processor) |
IVW_CORE_API PropertyWidgetFactory * | getPropertyWidgetFactory (Property *property) |
IVW_CORE_API RepresentationMetaFactory * | getRepresentationMetaFactory () |
IVW_CORE_API RepresentationMetaFactory * | getRepresentationMetaFactory (InviwoApplication *app) |
IVW_CORE_API RepresentationMetaFactory * | getRepresentationMetaFactory (Processor *processor) |
IVW_CORE_API RepresentationMetaFactory * | getRepresentationMetaFactory (Property *property) |
IVW_CORE_API RepresentationConverterMetaFactory * | getRepresentationConverterMetaFactory () |
IVW_CORE_API RepresentationConverterMetaFactory * | getRepresentationConverterMetaFactory (InviwoApplication *app) |
IVW_CORE_API RepresentationConverterMetaFactory * | getRepresentationConverterMetaFactory (Processor *processor) |
IVW_CORE_API RepresentationConverterMetaFactory * | getRepresentationConverterMetaFactory (Property *property) |
IVW_CORE_API ResourceManager * | getResourceManager () |
IVW_CORE_API ResourceManager * | getResourceManager (InviwoApplication *app) |
IVW_CORE_API ResourceManager * | getResourceManager (Processor *processor) |
IVW_CORE_API ResourceManager * | getResourceManager (Property *property) |
util
using inviwo::util::PrecisionType = typename std::remove_pointer<typename std::remove_const<T>::type>::type |
Utility for retrieving the type of a (Buffer/Layer/Volume)RamPrecision pointer variable. Example usage:
VolumeType will then be for example VolumeRamPrecision<vec3>
using inviwo::util::PrecisionValueType = typename PrecisionType<T>::type |
Utility for retrieving the type of a (Buffer/Layer/Volume)RamPrecision pointer variable. Example usage:
ValueType will then be for example vec3
IVW_MODULE_QTWIDGETS_API QMenu * inviwo::util::addTFPresetsMenu | ( | QWidget * | parent, |
QMenu * | menu, | ||
TransferFunctionProperty * | property ) |
create a submenu containing entries for TF presets of all transfer functions found in the path PathType::TransferFunctions
. Upon selecting a menu entry, the respective preset will be loaded by property
. The submenu will be disabled if property
is read-only.
parent | parent widget |
menu | parent menu to which the TF preset submenu should be added |
property | this property will load the TF presets once the menu entries are triggered |
parent
IVW_CORE_API void inviwo::util::alignAlphaToBottom | ( | const std::vector< TFPrimitive * > & | selection | ) |
Set the alphas value of selection to the min alpha value.
IVW_CORE_API void inviwo::util::alignAlphaToMean | ( | const std::vector< TFPrimitive * > & | selection | ) |
Set the alphas value of selection to the average alpha value.
IVW_CORE_API void inviwo::util::alignAlphaToTop | ( | const std::vector< TFPrimitive * > & | selection | ) |
Set the alphas value of selection to the max alpha value.
IVW_CORE_API void inviwo::util::alignPositionToLeft | ( | std::vector< TFPrimitive * > | selection | ) |
Set the position value of selection to the min position value.
IVW_CORE_API void inviwo::util::alignPositionToMean | ( | std::vector< TFPrimitive * > | selection | ) |
Set the position value of selection to the average position value.
IVW_CORE_API void inviwo::util::alignPositionToRight | ( | std::vector< TFPrimitive * > | selection | ) |
Set the position value of selection to the max position value.
IVW_CORE_API std::string inviwo::util::appendIfNotEmpty | ( | std::string_view | a, |
std::string_view | b ) |
Appends b to a if a is not empty and returns a. Useful if an empty a is considered an error and we want to propagate that error.
IVW_CORE_API std::vector< Processor * > inviwo::util::appendPartialProcessorNetwork | ( | ProcessorNetwork * | network, |
std::istream & | is, | ||
const std::filesystem::path & | refPath, | ||
InviwoApplication * | app, | ||
OffsetCallback | offsetCallback = nullptr ) |
Append a PartialProcessorNetwork to the network
network | the network to append to the current one |
is | a stream of a serialized PartialProcessorNetwork |
refPath | a possible path to the original file of the PartialProcessorNetwork, for error reporting |
app | The inviwo application |
offsetCallback | callback for determining an offset, which is applied to all added processors |
IVW_CORE_API std::function< std::optional< mat4 >()> inviwo::util::boundingBox | ( | const DataInport< Layer > & | layer | ) |
Constructs a function that returns the bounding box of the data in the port. If the port is empty the function should return std::nullopt;
IVW_CORE_API std::function< std::optional< mat4 >()> inviwo::util::boundingBox | ( | const DataInport< Layer, 0 > & | layers | ) |
Constructs a function that returns the bounding box of the data in the port. If the port is empty the function should return std::nullopt;
IVW_CORE_API std::function< std::optional< mat4 >()> inviwo::util::boundingBox | ( | const DataInport< Layer, 0, true > & | layers | ) |
Constructs a function that returns the bounding box of the data in the port. If the port is empty the function should return std::nullopt;
IVW_CORE_API std::function< std::optional< mat4 >()> inviwo::util::boundingBox | ( | const DataInport< Mesh > & | mesh | ) |
Constructs a function that returns the bounding box of the data in the port. If the port is empty the function should return std::nullopt;
IVW_CORE_API std::function< std::optional< mat4 >()> inviwo::util::boundingBox | ( | const DataInport< Mesh, 0 > & | meshes | ) |
Constructs a function that returns the bounding box of the data in the port. If the port is empty the function should return std::nullopt;
IVW_CORE_API std::function< std::optional< mat4 >()> inviwo::util::boundingBox | ( | const DataInport< Mesh, 0, true > & | meshes | ) |
Constructs a function that returns the bounding box of the data in the port. If the port is empty the function should return std::nullopt;
IVW_CORE_API std::function< std::optional< mat4 >()> inviwo::util::boundingBox | ( | const DataInport< std::vector< std::shared_ptr< Volume > > > & | volumes | ) |
Constructs a function that returns the bounding box of the data in the port. If the port is empty the function should return std::nullopt;
IVW_CORE_API std::function< std::optional< mat4 >()> inviwo::util::boundingBox | ( | const DataInport< Volume > & | volume | ) |
Constructs a function that returns the bounding box of the data in the port. If the port is empty the function should return std::nullopt;
IVW_CORE_API std::function< std::optional< mat4 >()> inviwo::util::boundingBox | ( | const DataOutport< Layer > & | layer | ) |
Constructs a function that returns the bounding box of the data in the port. If the port is empty the function should return std::nullopt;
IVW_CORE_API std::function< std::optional< mat4 >()> inviwo::util::boundingBox | ( | const DataOutport< Mesh > & | mesh | ) |
Constructs a function that returns the bounding box of the data in the port. If the port is empty the function should return std::nullopt;
IVW_CORE_API std::function< std::optional< mat4 >()> inviwo::util::boundingBox | ( | const DataOutport< std::vector< std::shared_ptr< Volume > > > & | volumes | ) |
Constructs a function that returns the bounding box of the data in the port. If the port is empty the function should return std::nullopt;
IVW_CORE_API std::function< std::optional< mat4 >()> inviwo::util::boundingBox | ( | const DataOutport< Volume > & | volume | ) |
Constructs a function that returns the bounding box of the data in the port. If the port is empty the function should return std::nullopt;
IVW_CORE_API mat4 inviwo::util::boundingBox | ( | const Layer & | layer | ) |
Calculate a bounding box of the layers in world space. The bounding box is represented using a mat4, where all positions are between `bbox * (x,y,z,1) where x, y, and z are between 0 and 1. The bounding box will have zero depth in most cases since the layer basis is two-dimensional.
IVW_CORE_API mat4 inviwo::util::boundingBox | ( | const Mesh & | mesh | ) |
Calculate a bounding box of the position buffer of the mesh in world space. The bounding box is represented using a mat4, where all positions are between `bbox * (x,y,z,1) where x, y, and z are between 0 and 1.
IVW_CORE_API mat4 inviwo::util::boundingBox | ( | const std::vector< std::shared_ptr< const Mesh > > & | meshes | ) |
Calculate a bounding box of the position buffers of all the meshes in world space. The bounding box is represented using a mat4, where all positions are between `bbox * (x,y,z,1) where x, y, and z are between 0 and 1.
IVW_CORE_API mat4 inviwo::util::boundingBox | ( | const std::vector< std::shared_ptr< Layer > > & | layers | ) |
Calculate a bounding box of all layers in world space. The bounding box is represented using a mat4, where all positions are between `bbox * (x,y,z,1) where x, y, and z are between 0 and 1.
IVW_CORE_API mat4 inviwo::util::boundingBox | ( | const std::vector< std::shared_ptr< Volume > > & | volumes | ) |
Calculate a bounding box of all the volumes in world space. The bounding box is represented using a mat4, where all positions are between `bbox * (x,y,z,1) where x, y, and z are between 0 and 1.
IVW_CORE_API mat4 inviwo::util::boundingBox | ( | const Volume & | volume | ) |
Calculate a bounding box of the volume in world space. The bounding box is represented using a mat4, where all positions are between `bbox * (x,y,z,1) where x, y, and z are between 0 and 1.
std::vector< Histogram1D > inviwo::util::calculateHistograms | ( | std::span< const T > | data, |
const DataMapper & | dataMap, | ||
size_t | bins ) |
Calculate histograms and statistics for a given span data
of type T
.
T | underlying data type, can be a scalar or glm vector type |
data | |
dataMap | provides the data range used for bin positions and size |
bins | upper limit of bins to use, actual number of bins might be lower based on data range and data type of T |
data
std::shared_ptr< T > inviwo::util::combineChannels | ( | const std::array< DataInport< T >, 4 > & | sources, |
const std::array< int, 4 > & | selectedPortChannels ) |
Combines up to four channels from four inports into a single object of type T
.
T | underlying datatype |
TRAMrep | RAM representation for T |
sources | array of inports for type T |
selectedPortChannels | selected channel for each inport |
sources
Usage: combineChannels<Layer, LayerRAM>(...)
IVW_CORE_API size_t inviwo::util::commonFormatPrecision | ( | std::span< const DataFormatBase * > | formats | ) |
Determines the format precision of the given formats
, that is the highest one.
formats
IVW_CORE_API NumericType inviwo::util::commonNumericType | ( | std::span< const DataFormatBase * > | formats | ) |
Determines the common numeric type of the given formats
. Returns NumericType::Float if any of the formats is a floating point format. Otherwise, NumericType::SignedInteger is returned if at least one format is signed, and NumericType::UnsignedInteger if that is not the case.
formats
. NumericType::NotSpecialized if the span is empty. std::vector< T > inviwo::util::convexHull | ( | const std::vector< T > & | points | ) |
compute the complex hull from a given set of 2D points using the Monotone Chain algorithm, i.e. Andrew's convex hull algorithm
points | set of 2D points |
IVW_CORE_API std::unique_ptr< FloatVec2RefProperty > inviwo::util::createCameraEyeOffsetProperty | ( | std::function< vec2()> | get, |
std::function< void(const vec2 &)> | set ) |
Create an eye offset property for use in a camera property.
IVW_CORE_API std::unique_ptr< FloatRefProperty > inviwo::util::createCameraFovProperty | ( | std::function< float()> | get, |
std::function< void(const float &)> | set ) |
Create a vertical fov property for use in a camera property.
IVW_CORE_API std::unique_ptr< FloatRefProperty > inviwo::util::createCameraWidthProperty | ( | std::function< float()> | get, |
std::function< void(const float &)> | set ) |
Create a width property for use in a CameraProperty.
IVW_MODULE_FONTRENDERING_API std::shared_ptr< Texture2D > inviwo::util::createTextTexture | ( | TextRenderer & | textRenderer, |
std::string | text, | ||
vec4 | fontColor, | ||
std::shared_ptr< Texture2D > | tex = nullptr ) |
Creates a texture with rendered text for a given string.
Creates a texture with a text string using the specified renderer and color. May take an additional variable tex of an existing texture that can be reused to reduce the number of times we need to allocating new textures.
The size of the texture will be the smallest possible for the given text and the pixels containing no text will have zero alpha.
For correct alignment of the baseline, the position of where this texture will be rendered must be adjusted by pos + computeBoundingBox(text).glyphsOrigin. See also TextOverlayGL::process() as an example.
textRenderer | The renderer that will be used to render the text |
text | text to be rendered |
fontColor | the final color of the text |
tex | optional cache texture which will be reused if possible |
IVW_MODULE_FONTRENDERING_API TextTextureObject inviwo::util::createTextTextureObject | ( | TextRenderer & | textRenderer, |
std::string | text, | ||
vec4 | fontColor, | ||
std::shared_ptr< Texture2D > | tex = nullptr ) |
Creates a texture with rendered text for a given string including its bounding box.
Creates a texture with rendered text for a string using the specified renderer and color. May take an additional variable tex of an existing texture that can be reused to reduce the number of times we need to allocating new textures. The resulting texture is returned along with the respective bounding box.
The size of the texture will be the smallest possible for the given text. All pixels containing no text will have zero alpha.
For correct alignment of the baseline, the position of where this texture will be rendered must be adjusted by pos + TextTextureObject.glyphsOrigin. See also TextOverlayGL::process() as an example.
textRenderer | The renderer that will be used to render the text |
text | string to be rendered |
fontColor | the final color of the text |
tex | optional cache texture which will be reused if possible (same texture will be returned) |
IVW_CORE_API void inviwo::util::cubePlaneIntersectionAppend | ( | const Plane & | plane, |
std::vector< vec3 > & | pos, | ||
std::vector< std::uint32_t > & | inds ) |
Intersects a unit cube with the given plane. The intersection points and the midpoint will be added to 'pos' and a list of triangle indicies referring to the pos array will be appended to 'inds'
std::pair< dvec4, dvec4 > inviwo::util::dataMinMax | ( | const ValueType * | data, |
size_t | size, | ||
IgnoreSpecialValues | ignore = IgnoreSpecialValues::No ) |
Compute component-wise minimum and maximum values scalar and glm::vec types.
data | pointer to values |
size | of data |
ignore | infinite and NaN |
IVW_CORE_API std::string inviwo::util::demangle | ( | const char * | name | ) |
Demangle the type ID given in name
name | mangled type ID name |
class
and struct
std::string inviwo::util::durationToString | ( | std::chrono::duration< Rep, Period > | duration, |
bool | includeZeros = true, | ||
bool | spacing = false ) |
convenience function for converting a std::chrono::duration to a string calling msToString(double).
duration | duration |
includeZeros | if true, time units for zero values are always shown, e.g. "2d 0h 0min 23s" vs. "2d 23s" and "2h 0min 0s" vs. "2h" |
spacing | if true, a space is inserted between digits and units |
IVW_CORE_API std::string inviwo::util::elideLines | ( | std::string_view | str, |
std::string_view | abbrev = "...", | ||
size_t | maxLineLength = 500 ) |
Elide parts of lines in str
which are longer than maxLineLength
and append abbrev
instead.
str | string with lines to abbreviate |
abbrev | placeholder that gets added at the end of abbreviated lines |
maxLineLength | lines that are longer are abbreviated |
maxLineLength
+ abbrev.size()
auto inviwo::util::enumerate | ( | T && | cont, |
Ts &&... | conts ) |
Enumerate element in a container. Example use case: std::vector<int> vec(10); for (auto&& item : util::enumerate(vec)) { auto&& ind = item.first(); auto&& elem = item.second(); // alternatively, get<0>(item) and get<1>(item) can be used }
with C++17 structured bindings for (auto&& [ind, elem] : util::enumerate(vec)) {
}
IVW_CORE_API std::vector< OptionPropertyIntOption > inviwo::util::enumeratedOptions | ( | std::string_view | name, |
size_t | count, | ||
int | start = 0, | ||
int | step = 1 ) |
A factory function for setting up a OptionPropertyInt with enumerated options. That is, "@p name 1", "@p name 2", etc. up to count
.
IVW_CORE_API void inviwo::util::expandCompositeProcessorIntoNetwork | ( | CompositeProcessor & | composite | ) |
Expand a composite processors sub network into its network. Effectively reversing the actions of replaceSelectionWithCompositeProcessor. All processor except for composite sink and composite source processors are moved from the sub network into the network of the composite processor. Connections and links are the reestablished. Sources and sinks are discarded.
IVW_CORE_API std::vector< std::filesystem::path > inviwo::util::exportAllFiles | ( | ProcessorNetwork & | network, |
const std::filesystem::path & | dir, | ||
std::string_view | nameTemplate, | ||
const std::vector< FileExtension > & | candidateExtensions, | ||
Overwrite | overwrite ) |
Exports the data from all export processors in network
into the directory dir
using a nameTemplate
and candidate extensions.
IVW_MODULE_QTWIDGETS_API void inviwo::util::exportIsoValueCollectionDialog | ( | const IsoValueCollection & | iso, |
QWidget * | parent = nullptr ) |
Shows an InviwoFileDialog to export a TFPrimitiveSet to a file.
iso | IsoValueCollection set to be exported |
parent | parent widget of the file dialog |
IVW_MODULE_QTWIDGETS_API void inviwo::util::exportTransferFunctionDialog | ( | const TransferFunction & | tf, |
QWidget * | parent = nullptr ) |
Shows an InviwoFileDialog to export a TFPrimitiveSet to a file.
tf | TransferFunction set to be exported |
parent | parent widget of the file dialog |
M inviwo::util::filled | ( | T | v | ) |
Utility function to create a matrix filled with a constant. For example:
IVW_CORE_API std::string inviwo::util::findUniqueIdentifier | ( | std::string_view | identifier, |
std::function< bool(std::string_view)> | isUnique, | ||
std::string_view | sep = " " ) |
Utility to augment an identifier with a number to make it unique. Will add an increasing number to the end of the given identifier until the isUnique test returns true. Example for a processor identifier: auto uniqueIdentifier = util::findUniqueIdentifier( startIdentifier, [&](std::string_view id) { return processorNetwork->getProcessorByIdentifier(id) == nullptr; }, "" );
IVW_CORE_API void inviwo::util::flipPositions | ( | const std::vector< TFPrimitive * > & | selection | ) |
Flip the positions of the selection
with respect to the respective range, i.e. p' = range.max - (p - range.min) with range.min/max corresponding to the lowest/highest position in selection
.
selection | list of primitives to be flipped. |
void inviwo::util::forEach | ( | const Iterable & | iterable, |
Callback && | callback ) |
Utility function to iterate over all element in an iterable data structure (such as std::vector).
iterable | the data structure to iterate over |
callback | to call for each element, can be either [](auto &a){} or [](auto &a, size_t id){} where a is an data item from the iterable data structure and id is the index in the data structure |
void inviwo::util::forEachParallel | ( | const Iterable & | iterable, |
Callback && | callback, | ||
size_t | jobs = 0 ) |
Use multiple threads to iterate over all elements in an iterable data structure (such as std::vector). If the Inviwo pool size is zero it will be executed directly in the same thread as the caller. The function will return once all jobs as has finished processing.
iterable | the data structure to iterate over |
callback | to call for each element, can be either [](auto &a){} or [](auto &a, size_t id){} where a is an data item from the iterable data structure and id is the index in the data structure |
jobs | optional parameter specifying how many jobs to create, if jobs==0 (default) it will create pool size * 4 jobs |
std::vector< std::future< void > > inviwo::util::forEachParallelAsync | ( | const Iterable & | iterable, |
Callback && | callback, | ||
size_t | jobs, | ||
OnDoneCallback && | onTaskDone ) |
Use multiple threads to iterate over all elements in an iterable data structure (such as std::vector). If the Inviwo pool size is zero it will be executed directly in the same thread as the caller. The function will return once all jobs as has been created and queued.
iterable | the data structure to iterate over |
callback | to call for each element, can be either [](auto &a){} or [](auto &a, size_t id){} where a is an data item from the iterable data structure and id is the index in the data structure |
jobs | optional parameter specifying how many jobs to create, if jobs==0 (default) it will create pool size * 4 jobs |
onTaskDone | callback that will be called when each job is done |
|
constexpr |
Call a functor on each part of the string after splitting by sep.
str | The string to split |
sep | The delimiter to split by |
func | Function callback, should take a std::string_view as argument |
IVW_CORE_API std::string inviwo::util::fromWstring | ( | std::wstring_view | str | ) |
convert the given std::wstring to std::string. On Windows, WideCharToMultiByte is used for this conversion assuming utf8 encoding. Otherwise, std::wcsrtombs is used.
str | std::wstring character string |
std::unique_ptr< Volume > inviwo::util::generateVolume | ( | const size3_t & | dimensions, |
const mat3 & | basis, | ||
Functor && | function ) |
double inviwo::util::getArea | ( | const std::vector< T > & | polygon | ) |
compute the area of a convex polygon
polygon | points ordered counter-clockwise |
IVW_CORE_API std::pair< ivec2, ivec2 > inviwo::util::getBoundingBox | ( | const std::vector< Processor * > & | processors | ) |
Retrieve bounding box of the processors in the list. The return value is pair of the min x,y and the max x,y
IVW_CORE_API std::pair< ivec2, ivec2 > inviwo::util::getBoundingBox | ( | ProcessorNetwork * | network | ) |
Retrieve bounding box of the processors in the network. The return value is pair of the min x,y and the max x,y
std::optional< BuildInfo > IVW_CORE_API inviwo::util::getBuildInfo | ( | ) |
Accesses build information via an INI file or compile-time definitions.
IVW_CORE_API FloatVec2RefProperty * inviwo::util::getCameraEyeOffsetProperty | ( | CameraProperty & | cameraProperty | ) |
Find the eye offset property in the cameraProperty.
cameraProperty |
IVW_CORE_API CameraFactory * inviwo::util::getCameraFactory | ( | ) |
Camera factory
IVW_CORE_API CameraFactory * inviwo::util::getCameraFactory | ( | InviwoApplication * | app | ) |
Camera factory
IVW_CORE_API CameraFactory * inviwo::util::getCameraFactory | ( | Processor * | processor | ) |
Camera factory
IVW_CORE_API CameraFactory * inviwo::util::getCameraFactory | ( | Property * | property | ) |
Camera factory
IVW_CORE_API FloatRefProperty * inviwo::util::getCameraFovProperty | ( | CameraProperty & | cameraProperty | ) |
Find the vertical fov property in the cameraProperty.
cameraProperty |
IVW_CORE_API FloatRefProperty * inviwo::util::getCameraWidthProperty | ( | CameraProperty & | cameraProperty | ) |
Find the width property in the cameraProperty.
cameraProperty |
IVW_CORE_API ivec2 inviwo::util::getCenterPosition | ( | const std::vector< Processor * > & | processors | ) |
Retrieve the mean position of the processors in the list.
IVW_CORE_API ivec2 inviwo::util::getCenterPosition | ( | ProcessorNetwork * | network | ) |
Retrieve the mean position of the processors in the network.
IVW_CORE_API DataReaderFactory * inviwo::util::getDataReaderFactory | ( | ) |
DataReader factory
IVW_CORE_API DataReaderFactory * inviwo::util::getDataReaderFactory | ( | InviwoApplication * | app | ) |
DataReader factory
IVW_CORE_API DataReaderFactory * inviwo::util::getDataReaderFactory | ( | Processor * | processor | ) |
DataReader factory
IVW_CORE_API DataReaderFactory * inviwo::util::getDataReaderFactory | ( | Property * | property | ) |
DataReader factory
IVW_CORE_API DataWriterFactory * inviwo::util::getDataWriterFactory | ( | ) |
DataWriter factory
IVW_CORE_API DataWriterFactory * inviwo::util::getDataWriterFactory | ( | InviwoApplication * | app | ) |
DataWriter factory
IVW_CORE_API DataWriterFactory * inviwo::util::getDataWriterFactory | ( | Processor * | processor | ) |
DataWriter factory
IVW_CORE_API DataWriterFactory * inviwo::util::getDataWriterFactory | ( | Property * | property | ) |
DataWriter factory
IVW_CORE_API TimerThread & inviwo::util::getDefaultTimerThread | ( | ) |
Utility function to get the default TimerThread from the app.
IVW_CORE_API DialogFactory * inviwo::util::getDialogFactory | ( | ) |
Dialog factory
IVW_CORE_API DialogFactory * inviwo::util::getDialogFactory | ( | InviwoApplication * | app | ) |
Dialog factory
IVW_CORE_API DialogFactory * inviwo::util::getDialogFactory | ( | Processor * | processor | ) |
Dialog factory
IVW_CORE_API DialogFactory * inviwo::util::getDialogFactory | ( | Property * | property | ) |
Dialog factory
IVW_CORE_API InportFactory * inviwo::util::getInportFactory | ( | ) |
Inport factory
IVW_CORE_API InportFactory * inviwo::util::getInportFactory | ( | InviwoApplication * | app | ) |
Inport factory
IVW_CORE_API InportFactory * inviwo::util::getInportFactory | ( | Processor * | processor | ) |
Inport factory
IVW_CORE_API InportFactory * inviwo::util::getInportFactory | ( | Property * | property | ) |
Inport factory
IVW_CORE_API InviwoApplication * inviwo::util::getInviwoApplication | ( | ) |
Utility function to get the InviwoApplication
IVW_CORE_API InviwoApplication * inviwo::util::getInviwoApplication | ( | Processor * | ) |
Utility function to get the InviwoApplication from a Processor
IVW_CORE_API InviwoApplication * inviwo::util::getInviwoApplication | ( | ProcessorNetwork * | ) |
Utility function to get the InviwoApplication from a ProcessorNetwork
IVW_CORE_API InviwoApplication * inviwo::util::getInviwoApplication | ( | Property * | ) |
Utility function to get the InviwoApplication from a Property
IVW_CORE_API InviwoApplication * inviwo::util::getInviwoApplication | ( | PropertyOwner * | ) |
Utility function to get the InviwoApplication from a PropertyOwner
IVW_CORE_API std::vector< std::filesystem::path > inviwo::util::getLibrarySearchPaths | ( | ) |
Returns paths to search for module libraries. All platforms: executable directory and application modules directory (AppData/Inviwo/modules on windows). Platform dependent search directories: OSX: DYLD_LIBRARY_PATH UNIX: LD_LIBRARY_PATH/LD_RUN_PATH, RPATH and "executable directory /../../lib".
IVW_CORE_API MeshDrawerFactory * inviwo::util::getMeshDrawerFactory | ( | ) |
MeshDrawer factory
IVW_CORE_API MeshDrawerFactory * inviwo::util::getMeshDrawerFactory | ( | InviwoApplication * | app | ) |
MeshDrawer factory
IVW_CORE_API MeshDrawerFactory * inviwo::util::getMeshDrawerFactory | ( | Processor * | processor | ) |
MeshDrawer factory
IVW_CORE_API MeshDrawerFactory * inviwo::util::getMeshDrawerFactory | ( | Property * | property | ) |
MeshDrawer factory
IVW_CORE_API const ProcessorMetaData * inviwo::util::getMetaData | ( | const Processor * | processor | ) |
Retrieve the meta data of the processor.
IVW_CORE_API ProcessorMetaData * inviwo::util::getMetaData | ( | Processor * | processor | ) |
Retrieve the meta data of the processor.
IVW_CORE_API MetaDataFactory * inviwo::util::getMetaDataFactory | ( | ) |
MetaData factory
IVW_CORE_API MetaDataFactory * inviwo::util::getMetaDataFactory | ( | InviwoApplication * | app | ) |
MetaData factory
IVW_CORE_API MetaDataFactory * inviwo::util::getMetaDataFactory | ( | Processor * | processor | ) |
MetaData factory
IVW_CORE_API MetaDataFactory * inviwo::util::getMetaDataFactory | ( | Property * | property | ) |
MetaData factory
std::filesystem::path inviwo::util::getModulePath | ( | ModulePath | pathType | ) |
return the path for a specific type located within the requested module of type T
pathType | type of the requested path |
IVW_CORE_API std::filesystem::path inviwo::util::getModulePath | ( | std::string_view | identifier, |
ModulePath | pathType ) |
return the path for a specific type located within the requested module
identifier | name of the module |
pathType | type of the requested path |
IVW_CORE_API OutportFactory * inviwo::util::getOutportFactory | ( | ) |
Outport factory
IVW_CORE_API OutportFactory * inviwo::util::getOutportFactory | ( | InviwoApplication * | app | ) |
Outport factory
IVW_CORE_API OutportFactory * inviwo::util::getOutportFactory | ( | Processor * | processor | ) |
Outport factory
IVW_CORE_API OutportFactory * inviwo::util::getOutportFactory | ( | Property * | property | ) |
Outport factory
IVW_CORE_API size_t inviwo::util::getPoolSize | ( | ) |
Utility function to query the pool size of the InviwoApplication
IVW_CORE_API PortInspectorFactory * inviwo::util::getPortInspectorFactory | ( | ) |
PortInspector factory
IVW_CORE_API PortInspectorFactory * inviwo::util::getPortInspectorFactory | ( | InviwoApplication * | app | ) |
PortInspector factory
IVW_CORE_API PortInspectorFactory * inviwo::util::getPortInspectorFactory | ( | Processor * | processor | ) |
PortInspector factory
IVW_CORE_API PortInspectorFactory * inviwo::util::getPortInspectorFactory | ( | Property * | property | ) |
PortInspector factory
IVW_CORE_API ivec2 inviwo::util::getPosition | ( | const Processor * | processor | ) |
Retrieve the position of the processor.
IVW_CORE_API std::vector< ivec2 > inviwo::util::getPositions | ( | const std::vector< Processor * > & | processors | ) |
Retrieve the positions of the processors in the list.
IVW_CORE_API std::vector< ivec2 > inviwo::util::getPositions | ( | ProcessorNetwork * | network | ) |
Retrieve the positions of the processors in the network.
IVW_CORE_API ProcessorFactory * inviwo::util::getProcessorFactory | ( | ) |
Processor factory
IVW_CORE_API ProcessorFactory * inviwo::util::getProcessorFactory | ( | InviwoApplication * | app | ) |
Processor factory
IVW_CORE_API ProcessorFactory * inviwo::util::getProcessorFactory | ( | Processor * | processor | ) |
Processor factory
IVW_CORE_API ProcessorFactory * inviwo::util::getProcessorFactory | ( | Property * | property | ) |
Processor factory
IVW_CORE_API InviwoModule * inviwo::util::getProcessorModule | ( | const Processor * | processor, |
InviwoApplication & | app ) |
Find which module that registered a processor.
processor | the processor to look for |
app | the InviwoApplication needed to get the modules |
IVW_CORE_API InviwoModule * inviwo::util::getProcessorModule | ( | std::string_view | classIdentifier, |
InviwoApplication & | app ) |
Find which module that registered a processor.
classIdentifier | the class identifier of the processor to look for |
app | the InviwoApplication needed to get the modules |
IVW_CORE_API std::optional< std::string > inviwo::util::getProcessorModuleIdentifier | ( | std::string_view | classIdentifier, |
InviwoApplication & | app ) |
Find the module identifier of a registered processor.
classIdentifier | the class identifier of the processor to look for |
app | the InviwoApplication needed to get the modules |
IVW_CORE_API ProcessorWidgetFactory * inviwo::util::getProcessorWidgetFactory | ( | ) |
ProcessorWidget factory
IVW_CORE_API ProcessorWidgetFactory * inviwo::util::getProcessorWidgetFactory | ( | InviwoApplication * | app | ) |
ProcessorWidget factory
IVW_CORE_API ProcessorWidgetFactory * inviwo::util::getProcessorWidgetFactory | ( | Processor * | processor | ) |
ProcessorWidget factory
IVW_CORE_API ProcessorWidgetFactory * inviwo::util::getProcessorWidgetFactory | ( | Property * | property | ) |
ProcessorWidget factory
IVW_CORE_API PropertyConverterManager * inviwo::util::getPropertyConverterManager | ( | ) |
IVW_CORE_API PropertyConverterManager * inviwo::util::getPropertyConverterManager | ( | InviwoApplication * | app | ) |
IVW_CORE_API PropertyConverterManager * inviwo::util::getPropertyConverterManager | ( | Processor * | processor | ) |
IVW_CORE_API PropertyConverterManager * inviwo::util::getPropertyConverterManager | ( | Property * | property | ) |
IVW_CORE_API PropertyFactory * inviwo::util::getPropertyFactory | ( | ) |
Property factory
IVW_CORE_API PropertyFactory * inviwo::util::getPropertyFactory | ( | InviwoApplication * | app | ) |
Property factory
IVW_CORE_API PropertyFactory * inviwo::util::getPropertyFactory | ( | Processor * | processor | ) |
Property factory
IVW_CORE_API PropertyFactory * inviwo::util::getPropertyFactory | ( | Property * | property | ) |
Property factory
IVW_CORE_API PropertyWidgetFactory * inviwo::util::getPropertyWidgetFactory | ( | ) |
PropertyWidget factory
IVW_CORE_API PropertyWidgetFactory * inviwo::util::getPropertyWidgetFactory | ( | InviwoApplication * | app | ) |
PropertyWidget factory
IVW_CORE_API PropertyWidgetFactory * inviwo::util::getPropertyWidgetFactory | ( | Processor * | processor | ) |
PropertyWidget factory
IVW_CORE_API PropertyWidgetFactory * inviwo::util::getPropertyWidgetFactory | ( | Property * | property | ) |
PropertyWidget factory
IVW_CORE_API RepresentationConverterMetaFactory * inviwo::util::getRepresentationConverterMetaFactory | ( | ) |
IVW_CORE_API RepresentationConverterMetaFactory * inviwo::util::getRepresentationConverterMetaFactory | ( | InviwoApplication * | app | ) |
IVW_CORE_API RepresentationConverterMetaFactory * inviwo::util::getRepresentationConverterMetaFactory | ( | Processor * | processor | ) |
IVW_CORE_API RepresentationConverterMetaFactory * inviwo::util::getRepresentationConverterMetaFactory | ( | Property * | property | ) |
IVW_CORE_API RepresentationMetaFactory * inviwo::util::getRepresentationMetaFactory | ( | ) |
IVW_CORE_API RepresentationMetaFactory * inviwo::util::getRepresentationMetaFactory | ( | InviwoApplication * | app | ) |
IVW_CORE_API RepresentationMetaFactory * inviwo::util::getRepresentationMetaFactory | ( | Processor * | processor | ) |
IVW_CORE_API RepresentationMetaFactory * inviwo::util::getRepresentationMetaFactory | ( | Property * | property | ) |
IVW_CORE_API ResourceManager * inviwo::util::getResourceManager | ( | ) |
Resource Manager
IVW_CORE_API ResourceManager * inviwo::util::getResourceManager | ( | InviwoApplication * | app | ) |
Resource Manager
IVW_CORE_API ResourceManager * inviwo::util::getResourceManager | ( | Processor * | processor | ) |
Resource Manager
IVW_CORE_API ResourceManager * inviwo::util::getResourceManager | ( | Property * | property | ) |
Resource Manager
size3_t IVW_CORE_API inviwo::util::getVolumeDimensions | ( | const std::shared_ptr< const Volume > & | volume | ) |
returns the true volume dimensions considering volume margins and bricking
std::pair< vec3, vec3 > IVW_CORE_API inviwo::util::getVolumeMargins | ( | const std::shared_ptr< const Volume > & | volume | ) |
return the margins of a volume, in normalized texture coordinates [0,1]
std::shared_ptr< Layer > inviwo::util::haltonSequence | ( | size2_t | dims, |
size_t | numberOfPoints, | ||
size_t | baseX = 2, | ||
size_t | baseY = 3 ) |
Generate a Layer with sparse noise based on a pair of two Halton Sequences.
dims | size of the resulting layer. |
numberOfPoints | number of points to generate |
baseX | base used for the fractions to generate the x-values |
baseY | base used for the fractions to generate the y-values |
std::shared_ptr< Volume > inviwo::util::haltonSequence | ( | size3_t | dims, |
size_t | numberOfPoints, | ||
size_t | baseX = 2, | ||
size_t | baseY = 3, | ||
size_t | baseZ = 5 ) |
Generate an Volume with sparse noise based on a three Halton Sequences.
dims | size of the resulting Volume. |
numberOfPoints | number of points to generate |
baseX | base used for the fractions to generate the x-values |
baseY | base used for the fractions to generate the y-values |
baseZ | base used for the fractions to generate the z-values |
T inviwo::util::haltonSequence | ( | size_t | n, |
size_t | base ) |
Compute the n
th point of the Halton sequence with base base
on the open range (0 1).
base | what base to use to generate fractions |
n | index of the nth point of the Halton sequence |
|
constexprnoexcept |
Function to combine several hash values http://stackoverflow.com/questions/2590677/how-do-i-combine-hash-values-in-c0x
IVW_CORE_API bool inviwo::util::iCaseEndsWith | ( | std::string_view | str, |
std::string_view | suffix ) |
Checks if provided string ends with suffix using case insensitive equal comparison.
str | string to check last part of. Allowed to be smaller than suffix. |
suffix | Ending to match. |
IVW_MODULE_QTWIDGETS_API std::shared_ptr< IsoValueCollection > inviwo::util::importIsoValueCollectionDialog | ( | QWidget * | parent = nullptr | ) |
Shows an InviwoFileDialog to import a IsoValueCollection from a file.
parent | parent widget of the file dialog |
IVW_MODULE_QTWIDGETS_API std::shared_ptr< TransferFunction > inviwo::util::importTransferFunctionDialog | ( | QWidget * | parent = nullptr | ) |
Shows an InviwoFileDialog to import a TransferFunction from a file.
parent | parent widget of the file dialog |
|
constexpr |
Get the index of a type in a tuple, returns the index of the first matching type
|
constexpr |
Get the index of the first type in the Tuple that is derived from T
IVW_CORE_API void inviwo::util::interpolateAlpha | ( | const std::vector< TFPrimitive * > & | selection | ) |
Interpolate the alpha values of selected primitives in between the first and the last primitive based on their relative position.
|
constexpr |
A type trait to determine if type "callback" can be called with certain arguments. Example: util::is_callable_with<float>(callback) where callback = [](float){} -> true callback = [](std::string){} -> false
bool inviwo::util::isConvex | ( | const std::vector< T > & | polygon | ) |
check whether the given polygon is convex
polygon | polygon consisting of points |
bool inviwo::util::isInside | ( | const std::vector< T > & | hull, |
const T & | p ) |
check whether a given point lies within the convex hull
hull | convex hull |
p | point |
IVW_CORE_API bool inviwo::util::isInviwoApplicationInitialized | ( | ) |
Utility function to return whether the InviwoApplication is initialized
IVW_CORE_API bool inviwo::util::isSelected | ( | const Processor * | processor | ) |
Retrieve the selection state of processor.
void inviwo::util::layerRAMDistanceTransform | ( | const LayerRAMPrecision< T > * | inLayer, |
LayerRAMPrecision< U > * | outDistanceField, | ||
const Matrix< 2, U > | basis, | ||
const size2_t | upsample, | ||
Predicate | predicate, | ||
ValueTransform | valueTransform, | ||
ProgressCallback | callback ) |
Implementation of Euclidean Distance Transform according to Saito's algorithm:
T. Saito and J.I. Toriwaki. New algorithms for Euclidean distance transformations of an n-dimensional digitized picture with applications. Pattern Recognition, 27(11). pp. 1551-1565, 1994. http://www.cs.jhu.edu/~misha/ReadingSeminar/Papers/Saito94.pdf
Calculates the distance in base mat space
Predicate | is a function of type (const T &value) -> bool to decide if a value in the input is a "feature". |
ValueTransform | is a function of type (const U& squaredDist) -> U that is appiled to all squared distance values at the end of the calculation. |
ProcessCallback | is a function of type (double progress) -> void that is called with a value from 0 to 1 to indicate the progress of the calculation. |
IVW_MODULE_BASE_API std::shared_ptr< LayerRAM > inviwo::util::layerSubSet | ( | const Layer * | in, |
ivec2 | offset, | ||
size2_t | extent, | ||
bool | clampBorderOutsideImage = false ) |
extracts a subregion from a layer and returns it as a new layer
This function extracts a subregion given by offset and extent from the input layer. If border clamping is enabled, the output region will be clamped to lie completely within the source layer. Otherwise (default), the areas outside the source layer will be filled with zeros.
in | input layer |
offset | subregion offset in input layer |
extent | extent (width and height) of subregion |
clampBorderOutsideImage | if true, the output region is clamped to the layer boundaries |
|
constexprnoexcept |
trims str
from beginning removing white spaces
str | input string |
auto inviwo::util::make_sequence | ( | const T & | begin, |
const T & | end, | ||
const T & | inc = T{1} ) -> sequence<T> |
Convenvience function for creating a sequence. Use case example:
|
noexcept |
Create an IndirectIterator
std::unique_ptr< Volume > inviwo::util::makeMarchingCubeVolume | ( | const size_t & | index | ) |
A 2x2x2 volume corresponding to a marching cube case
std::unique_ptr< T > inviwo::util::makeProcessor | ( | ivec2 | pos, |
Args &&... | args ) |
std::unique_ptr< Volume > inviwo::util::makeRippleVolume | ( | const size3_t & | size | ) |
A quickly oscillating density between 0 and 1
std::unique_ptr< Volume > inviwo::util::makeSingleVoxelVolume | ( | const size3_t & | size | ) |
Center voxel equal to 1 all other 0
std::unique_ptr< Volume > inviwo::util::makeSphericalVolume | ( | const size3_t & | size | ) |
Spherically symmetric density centered in the volume decaying radially with the distance from the center
IVW_MODULE_BASE_API std::shared_ptr< Mesh > inviwo::util::marchingcubes | ( | std::shared_ptr< const Volume > | volume, |
double | iso, | ||
const vec4 & | color, | ||
bool | invert, | ||
bool | enclose, | ||
std::function< void(float)> | progressCallback = std::function< void(float)>(), | ||
std::function< bool(const size3_t &)> | maskingCallback = [](const size3_t &) { return true;} ) |
Extracts an isosurface from a volume using the Marching Cubes algorithm
Note: Share interface with util::marchingtetrahedron
volume | the scalar volume |
iso | iso-value for the extracted surface |
color | the color of the resulting surface |
invert | flips the normals of the surface normals (useful when values greater than the iso-value is 'outside' of the surface) |
enclose | whether to create surface where the isosurface intersects the volume boundaries |
progressCallback | if set, will be called will executing with the current progress in the interval [0,1], usefull for progressbars |
maskingCallback | optional callback to test whether current cell should be evaluated or not (return true to include current cell) |
IVW_MODULE_BASE_API std::shared_ptr< Mesh > inviwo::util::marchingCubesOpt | ( | std::shared_ptr< const Volume > | volume, |
double | iso, | ||
const vec4 & | color, | ||
bool | invert, | ||
bool | enclose, | ||
std::function< void(float)> | progressCallback = nullptr, | ||
std::function< bool(const size3_t &)> | maskingCallback = nullptr ) |
Extracts an iso surface from a volume using the Marching Cubes algorithm
Note: Shares interface with util::marchingcbes and util::marchingtetrahedron This is an optimized version of util::marchingcubes
volume | the scalar volume |
iso | iso-value for the extracted surface |
color | the color of the resulting surface |
invert | flips the normals of the surface normals (useful when values greater than the iso-value is 'outside' of the surface) |
enclose | whether to create surface where the iso surface intersects the volume boundaries |
progressCallback | if set, will be called will executing with the current progress in the interval [0,1], useful for progress bars |
maskingCallback | optional callback to test whether current cell should be evaluated or not (return true to include current cell) |
std::shared_ptr< Mesh > inviwo::util::marchingtetrahedron | ( | std::shared_ptr< const Volume > | volume, |
double | iso, | ||
const vec4 & | color = vec4(1.0f), | ||
bool | invert = false, | ||
bool | enclose = true, | ||
std::function< void(float)> | progressCallback = std::function< void(float)>(), | ||
std::function< bool(const size3_t &)> | maskingCallback = [](const size3_t &) { return true;} ) |
Extracts an isosurface from a volume using the Marching Tetrahedron algorithm
Note: Share interface with util::marchingcubes
volume | the scalar volume |
iso | iso-value for the extracted surface |
color | the color of the resulting surface |
invert | flips the normals of the surface normals (useful when values greater than the iso-value is 'outside' of the surface) |
enclose | whether to create surface where the isosurface intersects the volume boundaries |
progressCallback | if set, will be called will executing with the current progress in the interval [0,1], usefull for progressbars |
maskingCallback | optional callback to test whether current cell should be evaluated or not (return true to include current cell) |
IVW_CORE_API Document inviwo::util::md2doc | ( | std::string_view | markdown | ) |
IVW_CORE_API std::string inviwo::util::msToString | ( | double | ms, |
bool | includeZeros = true, | ||
bool | spacing = false ) |
convert the given duration from milliseconds to a string. The returned string will have the format "%dd %dh %dmin %dsec %.3fms", where days, hours, minutes, seconds, ... are suppressed up to the first non-zero unit if not needed. Milliseconds and seconds are combined if larger than 1 second.
ms | in milliseconds |
includeZeros | if true, time units for zero values are always shown, e.g. "2d 0h 0min 23s" vs. "2d 23s" and "2h 0min 0s" vs. "2h" |
spacing | if true, a space is inserted between digits and units |
IVW_CORE_API void inviwo::util::offsetPosition | ( | const std::vector< Processor * > & | processors, |
ivec2 | offset ) |
Offset all the positions of the processors in the list by offset
IVW_CORE_API OrdinalPropertyState< vec4 > inviwo::util::ordinalColor | ( | float | r, |
float | g, | ||
float | b, | ||
float | a = 1.0f, | ||
InvalidationLevel | invalidationLevel = InvalidationLevel::InvalidOutput ) |
A factory function for OrdinalProperties representing Colors When instantiating a Ordinal Property for a color value one would need to write something along there lines
by using the helper function most of the boilerplate can be removed:
OrdinalPropertyState< T > inviwo::util::ordinalCount | ( | const T & | value = T{0}, |
const U & | max = U{100} ) |
A factory function for configuring a OrdinalProperty representing a count. It will have a Immutable min at zero and an upper Ignored max. The increment will be one. The invalidation level defaults to InvalidOutput, and the property semantics to SpinBox.
value | the default value for the property |
max | used to construct the max value. The max constraint behavior will be Ignore. |
OrdinalPropertyState< T > inviwo::util::ordinalLength | ( | const T & | value = T{0}, |
const U & | max = U{100} ) |
A factory function for configuring a OrdinalProperty representing a length. It will have a Immutable min at zero and an upper Ignored max. The invalidation level defaults to InvalidOutput, and the property semantics to SpinBox.
value | the default value for the property |
max | used to construct the max value. The max constraint behavior will be Ignore. |
IVW_CORE_API OrdinalRefPropertyState< vec4 > inviwo::util::ordinalRefColor | ( | InvalidationLevel | invalidationLevel = InvalidationLevel::InvalidOutput | ) |
A factory function for OrdinalProperties representing Colors When instantiating a Ordinal Property for a color value one would need to write something along there lines
by using the helper function most of the boilerplate can be removed:
OrdinalRefPropertyState< T > inviwo::util::ordinalRefSymmetricVector | ( | const U & | minMax = U{100} | ) |
A factory function for configuring a OrdinalRefProperty representing a generic vector, with a symmetric range around zero, and Ignored boundary constraints. The invalidation level defaults to InvalidOutput, and the property semantics to SpinBox.
value | the default value for the property |
minMax | used to construct the range of the property like min = T{-minMax}, max = T{minMax}. The constraint behavior will be Ignore. |
OrdinalPropertyState< T > inviwo::util::ordinalScale | ( | const T & | value = T{0}, |
const U & | max = U{100} ) |
A factory function for configuring a OrdinalProperty representing a scale factor. It will have a Immutable min at epsilon and an upper Ignored max. The invalidation level default to InvalidOutput, and the property semantics to Slider.
value | the default value for the property |
max | used to construct the max value. The max constraint behavior will be Ignore. |
OrdinalPropertyState< T > inviwo::util::ordinalSymmetricVector | ( | const T & | value = {0}, |
const U & | minMax = U{100} ) |
A factory function for configuring a OrdinalProperty representing a generic vector, with a symmetric range around zero, and Ignored boundary constraints. The invalidation level defaults to InvalidOutput, and the property semantics to SpinBox.
value | the default value for the property |
minMax | used to construct the range of the property like min = T{-minMax}, max = T{minMax}. The constraint behavior will be Ignore. |
IVW_CORE_API std::string inviwo::util::parseTypeIdName | ( | const char * | name | ) |
Demangle and strip the type ID given in name
name | mangled type ID name |
class
, struct
, const
, inviwo::
, or white space std::shared_ptr< Layer > inviwo::util::perlinNoise | ( | size2_t | dims, |
float | persistence, | ||
size_t | startLevel, | ||
size_t | endLevel, | ||
Rand & | randomNumberGenerator = Rand() ) |
Generate a Layer with perlin noise, a cloud like noise using the sum of several white noise layers with different frequencies
dims | Size of the output layer |
persistence | controls the amplitude used in the different frequencies |
startLevel | controls the min level used. The level is determining the frequency to use in each white noise layer as 2^level |
endLevel | controlsthe max level used. |
randomNumberGenerator | the Random number generator to use, defaults to the Mersenne Twister engine (std::mt19937) |
std::shared_ptr< Layer > inviwo::util::poissonDisk | ( | size2_t | dims, |
size_t | poissonDotsAlongX, | ||
size_t | maxPoints, | ||
Rand & | randomNumberGenerator = Rand() ) |
Generate a Layer with sparse noise based on the perlin noise algorith.
dims | Size of the output layer |
poissonDotsAlongX | controlls the amount on points there is on average per line, set the minimum distance between points |
maxPoints | a fallback variable to prevent generating to many points |
randomNumberGenerator | the Random number generator to use, defaults to the Mersenne Twister engine (std::mt19937) |
std::shared_ptr< Layer > inviwo::util::randomLayer | ( | size2_t | dims, |
Rand & | randomNumberGenerator = Rand(), | ||
Dist & | distribution = Dist(0, 1) ) |
Generate a Layer with white noise based using a given random number generator and distribution.
dims | Size of the output layer |
randomNumberGenerator | the random number generator to use, defaults to the Mersenne Twister engine (std::mt19937) |
distribution | the distribution to use for the random numbers, defaults to std::uniform_int/real_distribution between zero and one |
std::shared_ptr< LayerRAMPrecision< T > > inviwo::util::randomLayerRAM | ( | size2_t | dims, |
Rand & | randomNumberGenerator = Rand(), | ||
Dist & | distribution = Dist(0, 1) ) |
Generate a LayerRAMPrecision<T> with white noise based using a given random number generator and distribution.
T | data type of the random numbers |
Rand | random number engine, defaults to the Mersenne Twister engine (std::mt19937) |
Dist | random number distribution, defaults to std::uniform_int/real_distribution between zero and one |
dims | Size of the resulting layer |
randomNumberGenerator | the random number generator to use |
distribution | the distribution to use for the random numbers |
void inviwo::util::randomSequence | ( | std::span< T > | data, |
Rand & | randomNumberGenerator = Rand(), | ||
Dist & | distribution = Dist(0, 1) ) |
Fills a span of type T with numberOfElements random numbers using the given random number generator and distribution
void inviwo::util::randomSequence | ( | T * | data, |
size_t | numberOfElements, | ||
Rand & | randomNumberGenerator = Rand(), | ||
Dist & | distribution = Dist(0, 1) ) |
Fills a data container of type T with numberOfElements random numbers using the given random number generator and distribution
std::shared_ptr< Volume > inviwo::util::randomVolume | ( | size3_t | dims, |
Rand & | randomNumberGenerator = Rand(), | ||
Dist & | distribution = Dist(0, 1) ) |
Generate an Volume with white noise based using C++ a given random number generator and distribution.
dims | Size of the output Volume |
randomNumberGenerator | the Random number generator to use, defaults to the Mersenne Twister engine (std::mt19937) |
distribution | the distribution to use for the random numbers, defaults to std::uniform_int/real_distribution between zero and one |
void IVW_MODULE_VOLUME_API inviwo::util::remap | ( | Volume & | volume, |
const std::vector< int > & | src, | ||
const std::vector< int > & | dst, | ||
int | missingValue, | ||
bool | useMissingValue ) |
Remap all voxels of volume
by mapping values from src
to dst
.
[in,out] | volume | voxels of this scalar volume will be remapped |
src | list of source indices | |
dst | list of destination indices matching src | |
missingValue | assigned if a value cannot be found in src and useMissingValue is set | |
useMissingValue | if true, all values not included in src are mapped to missingValue |
volume
must be a scalar volume src
and dst
must have the same length src
must not contain duplicates dst
may contain duplicates volume
only contains voxels with values found in dst
IVW_CORE_API void inviwo::util::replaceSelectionWithCompositeProcessor | ( | ProcessorNetwork & | network | ) |
Create a CompositeProcessor out of the currently selected processors and replace them with the composite processors. The selected processors are moved from the current network into the sub network of the composite processor. For each port connection between a selected and unselected processor a composite sink or composite source processor is added to the sub network and connections are made from the selected processor to the sink/source and from the composite processor to the unselected processor. For each link between a selected and unselected processor, a super property is added to the composite processor and the link added to it.
IVW_CORE_API void inviwo::util::reverse | ( | BufferBase & | b | ) |
Utility function to reverse the orders of the elements in a buffer.
b | the buffer to reverse |
|
constexprnoexcept |
trims str
from end by removing white spaces
str | input string |
void inviwo::util::saveData | ( | const T & | data, |
const std::filesystem::path & | filePath, | ||
const FileExtension & | extension, | ||
Overwrite | overwrite ) |
Save data
to filePath
using the writer given by extension
data | Object to save to file |
filePath | Complete path, name, and extension of the written file |
extension | The extension used to identifier the DataWriter in the factory |
overwrite | Whether to overwrite any existing file or not |
DataWriterException | if no write could be found, or if overwrite was violated. |
std::optional< std::filesystem::path > inviwo::util::saveData | ( | const T & | data, |
const std::filesystem::path & | path, | ||
std::string_view | name, | ||
const std::vector< FileExtension > & | extensions, | ||
Overwrite | overwrite ) |
Save data
to the filePath given by concatenating path
, "/", name
, ".", and extension where extensions is the first extension in extensions
that we find a matching writer for.
data | Object to save to file |
path | Directory where the file will be written |
name | Name of the file excluding extension |
extensions | A list of extensions to use for finding a matching DataWriter |
overwrite | Whether to overwrite any existing file or not |
DataWriterException | if overwrite was violated. |
IVW_CORE_API void inviwo::util::setPosition | ( | Processor * | processor, |
ivec2 | pos ) |
Set the position of processor to pos
IVW_CORE_API void inviwo::util::setSelected | ( | const std::vector< Processor * > & | processors, |
bool | selected ) |
Set the listed processors as selected or unSelected.
IVW_CORE_API void inviwo::util::setSelected | ( | Processor * | processor, |
bool | selected ) |
Set the selection state of processor
|
constexpr |
Divide a string into two parts by the first instance of a delimiter.
str | string to divide |
delimiter | not include in either returned strings |
|
constexpr |
Divide a string into two parts by the first instance of a delimiter.
str | string to divide |
delimiter | not include in either returned strings |
|
constexpr |
Divide a string into two parts by the last instance of a delimiter.
str | string to divide |
delimiter | not include in either returned strings |
|
constexpr |
Divide a string into two parts by the last instance of a delimiter.
str | string to divide |
delimiter | not include in either returned strings |
IVW_CORE_API std::vector< std::string > inviwo::util::splitString | ( | std::string_view | str, |
char | delimiter = ' ' ) |
Split string into substrings based on separating delimiter character. Using delimiter ';' on string "aa;bb" will result in a vector contaning aa and bb.
str | The string to split |
delimiter | The character use for splitting (default to space) |
IVW_CORE_API std::vector< std::string_view > inviwo::util::splitStringView | ( | std::string_view | str, |
char | delimiter = ' ' ) |
Split string into substrings based on separating delimiter character. Using delimiter ';' on string "aa;bb" will result in a vector contaning aa and bb.
str | The string to split |
delimiter | The character use for splitting (default to space) |
IVW_CORE_API std::string inviwo::util::stripIdentifier | ( | std::string_view | identifier | ) |
Strip all invalid characters from the given identifier
. If the resulting identifier is empty, a single underscore _
is returned.
Valid identifiers follow the C++ and Python variable naming rules. That is
Matching regex: [a-zA-Z_][a-zA-Z0-9_]*
identifier | name to be stripped and validated |
IVW_CORE_API std::string inviwo::util::stripModuleFileNameDecoration | ( | const std::filesystem::path & | filePath | ) |
Removes inviwo-module from module library file name. Turns "/path/to/inviwo-module-yourmodule.dll" into "yourmodule". Returns filename without extension if inviwo-module was not found.
filePath | Path to module file |
IVW_CORE_API std::wstring inviwo::util::toWstring | ( | std::string_view | str | ) |
convert the given std::string to std::wstring. On Windows, MultiByteToWideChar is used for this conversion assuming utf8 encoding. Otherwise, std::mbsrtowcs is used.
str | multibyte character string |
|
constexprnoexcept |
trims str
from beginning and end by removing white spaces
str | input string |
T & inviwo::util::trySetProperty | ( | Processor * | proc, |
std::string_view | identifier, | ||
V && | val, | ||
bool | recursive = false ) |
Tries to set a processor's property to a given value.
T | Type of proc . |
V | Type of val , deduced. |
proc | Processor that has the target property. |
identifier | Identifier of the property to be set. |
val | Value to be set. |
recursive | Enable/Disable recursive search for Processor::getPropertyByIdentifier. |
Exception |
std::shared_ptr< LayerRAMPrecision< T > > inviwo::util::typedLayerSubSet | ( | const Layer * | in, |
ivec2 | offset, | ||
size2_t | extent, | ||
bool | clampBorderOutsideImage = false ) |
extracts a subregion from a layer and converts it into a new layer
This function extracts a subregion given by offset
and extent
from the input layer. The values will be converted to type T using util::glm_convert_normalized. If border clamping is enabled, the output region will be clamped to lie completely within the source layer. Otherwise (default), the areas outside the source layer will be filled with zeros.
in | input layer |
offset | subregion offset in input layer |
extent | extent (width and height) of subregion |
clampBorderOutsideImage | if true, the output region is clamped to the layer boundaries |
IVW_CORE_API Document inviwo::util::unindentMd2doc | ( | std::string_view | markdown | ) |
Parse a markdown string and convert to an inviwo document. Before the string is parsed as markdown, any leading indentation is removed from the string
markdown | A string that will be interpreted as markdown |
void inviwo::util::updateDefaultState | ( | T & | property, |
const U & | state, | ||
OverwriteState | overwrite ) |
Update the default state of property
to state
and set the current state to state
if property
is in the default state or overwrite
is OverwriteState::Yes
IVW_CORE_API FloatVec2RefProperty * inviwo::util::updateOrCreateCameraEyeOffsetProperty | ( | CameraProperty & | cameraProperty, |
std::function< vec2()> | get, | ||
std::function< void(const vec2 &)> | set ) |
Either return an existing eye offset property updated with the provided get and set functions or create a new one. The new one will automatically be added to the camera property.
IVW_CORE_API FloatRefProperty * inviwo::util::updateOrCreateCameraFovProperty | ( | CameraProperty & | cameraProperty, |
std::function< float()> | get, | ||
std::function< void(const float &)> | set ) |
Either return an existing vertical fov property updated with the provided get and set functions or create a new one. The new one will automatically be added to the camera property.
IVW_CORE_API FloatRefProperty * inviwo::util::updateOrCreateCameraWidthProperty | ( | CameraProperty & | cameraProperty, |
std::function< float()> | get, | ||
std::function< void(const float &)> | set ) |
Either return an existing width property updated with the provided get and set functions or create a new one. The new one will automatically be added to the camera property.
IVW_CORE_API void inviwo::util::validateIdentifier | ( | std::string_view | identifier, |
std::string_view | type, | ||
ExceptionContext | context ) |
Validate the given identifier
. If identifier
is invalid, throws an Exception with the given exception context context
and identifier type
for a detailed error message.
Valid identifiers follow the C++ and Python variable naming rules. That is
Matching regex: [a-zA-Z_][a-zA-Z0-9_]*
identifier | name to be validated |
type | identifier type, only used in case of exception |
context | used when throwing an exception |
Exception | if identifier is not valid |
void inviwo::util::volumeRAMDistanceTransform | ( | const VolumeRAMPrecision< T > * | inVolume, |
VolumeRAMPrecision< U > * | outDistanceField, | ||
const Matrix< 3, U > & | basis, | ||
const size3_t & | upsample, | ||
Predicate | predicate, | ||
ValueTransform | valueTransform, | ||
ProgressCallback | progress ) |
Implementation of Euclidean Distance Transform according to Saito's algorithm: T. Saito and J.I. Toriwaki. New algorithms for Euclidean distance transformations of an n-dimensional digitized picture with applications. Pattern Recognition, 27(11). pp. 1551-1565, 1994. http://www.cs.jhu.edu/~misha/ReadingSeminar/Papers/Saito94.pdf
Calculates the distance in grid index space
IVW_MODULE_BASE_API std::shared_ptr< Volume > inviwo::util::voronoiSegmentation | ( | const size3_t | volumeDimensions, |
const mat4 & | indexToDataMatrix, | ||
const mat4 & | dataToModelMatrix, | ||
const std::vector< std::pair< uint32_t, vec3 > > & | seedPointsWithIndices, | ||
const Wrapping3D & | wrapping, | ||
const std::optional< std::vector< float > > & | weights ) |
Implementation of Voronoi segmentation.
The function returns a volume with each voxel containing the index for the closest seed point (according to the power distance with or without weights).
* volumeDimensions is the dimensions for the volume. * indexToDataMatrix is the matrix to transform the voxel positions from index to data space. * dataToModelMatrix is the matrix to transform the voxel positions from data to model space. * seedPointsWithIndices is a vector containing the seed points for the algorithm together with their index number on the form {index, position}. The positions are expected be in model space. * wrapping the wrapping mode of the volume, @see Wrapping3D. * weights is an optional vector containing the weights for each seed point. If set the weighted version of voronoi should be used.
double IVW_CORE_API inviwo::util::voxelVolume | ( | const Volume & | volume | ) |
calculates the volume of a single voxel, taking the basis and the dimensions into account The units of the result is in the unit as the basis vectors ^3
IVW_MODULE_BASE_API std::filesystem::path inviwo::util::writeIvfVolumeSequence | ( | const VolumeSequence & | volumes, |
std::string_view | name, | ||
const std::filesystem::path & | path, | ||
std::string_view | relativePathToElements = "", | ||
Overwrite | overwrite = Overwrite::Yes ) |
Writes a volume sequence to disk.
Writes a volume sequence to disk. Will create one main file ([name].ivfs) and a series of ivf volumes ([name]xx.ivf), one for each element in the sequence.
volumes | The volume sequence to export |
name | the name of the dataset, will be used for to name the output files [name].ivfs and [name]xx.ivf |
path | path to the folder to put the main file |
relativePathToElements | relative path (from the path to the main file) to where the sequence elements will be written |
overwrite | whether or not to overwrite existing files. |
auto inviwo::util::zip | ( | T &&... | args | ) | -> detailzip::zipper<T...> |
Iterate over containers in sync. Example use case 1:
with C++17 structured bindings:
|
constexpr |