FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
UniformMapping.hpp
1#ifndef __FIBER_BASEOP_UNIFORMMAPPING_HPP
2#define __FIBER_BASEOP_UNIFORMMAPPING_HPP
3
4#include <fiber/field/UniformCartesianArray.hpp>
5#include <fiber/grid/types/RegularlyFragmentedGrid.hpp>
6#include <fiber/grid/types/FragmentedUniformGrid3D.hpp>
7#include <elementary/memcore/Loader.hpp>
8
9#include "gridopDllApi.h"
10
11namespace Fiber
12{
13
20extern gridop_API
21void MapToUniform(MultiArray<3,double>&Heightfield,
22 const UniformCartesianArray&UMap,
23 const MemCore::TypedChunkBase<FixedArray<double,3>>&,
24 std::vector<index_t>&IndexArray,
25 int Component = 2,
26 const FixedArray<double,3>&Numericalshift = {0.,0.,0.});
27
33extern gridop_API
34RefPtr<MemArray<3,double>>
37 double InvalidData,
38 int Component = 2,
39 const FixedArray<double,3>&Numericalshift = {0.,0.,0.});
40
41
42using MapToUniformIndexResult_t = std::pair< RefPtr<MemArray<3,double>>, RefPtr<Chunk<index_t>> >;
43
71extern gridop_API
72MapToUniformIndexResult_t
73 MapToUniformIndex(const UniformCartesianArray&UMap,
74 MemCore::TypedChunkBase<FixedArray<double,3>>&Src,
75 double InvalidData,
76 int Component, const FixedArray<double,3>&NumericalShift);
77
78
79extern gridop_API
80void MapToUniform(MultiArray<3,double>&Dest,
81 const UniformCartesianArray&UMap,
82 const MemCore::TypedChunkBase<FixedArray<float,3>>&,
83 int Component = 2,
84 const FixedArray<double,3>&Numericalshift = {0.,0.,0.});
85
86
87extern gridop_API
88RefPtr<MemArray<3,double>>
89 MapToUniform(const UniformCartesianArray&UMap, MemCore::TypedChunkBase<FixedArray<float,3>>&,
90 int Component = 2,
91 const FixedArray<double,3>&Numericalshift = {0.,0.,0.} );
92
93extern gridop_API
94bool MapFromUniform(MemCore::TypedChunkBase<FixedArray<double,3>>&Result,
95 const UniformCartesianArray&UMap,
96 const RefPtr<MemArray<3,double>>&Heightfield,
97 int Component = 2,
98 const FixedArray<double,3>&Numericalshift = {0.,0.,0.} );
99
100extern gridop_API
101bool MapFromUniform(MemCore::TypedChunkBase<FixedArray<float,3>>&Result,
102 const UniformCartesianArray&UMap,
103 const RefPtr<MemArray<3,double>>&Heightfield,
104 int Component = 2,
105 const FixedArray<double,3>&Numericalshift = {0.,0.,0.} );
106
107
116extern gridop_API
117void InterpolateUniformHeight(MemCore::TypedChunkBase<FixedArray<double,3>>&Dest,
118 const UniformCartesianArray&UMap,
119 const MultiArray<3, double>&Heightfield,
120 int Component = 2,
121 const FixedArray<double,3>&Numericalshift = {0.,0.,0.},
122 double HeightSlice = 0.0);
123
124
125
139extern gridop_API
144 int Component = 2,
145 const FixedArray<double,3>&Numericalshift = {0.,0.,0.},
146 double HeightSlice = 0.0);
147
148extern gridop_API
149void InterpolateUniformHeightfieldOnCoords(MemCore::TypedChunkBase<FixedArray<double,3>>&Dest,
150 FragmentedUniformGrid3D&UGrid,
151 const RegularlyFragmentedField<3>&Heightfield,
152 int Component = 2);
153
154
155extern gridop_API
156void InterpolateUniformHeightfieldOnGrid(Grid&Dest,
157 FragmentedUniformGrid3D&UGrid,
158 const RegularlyFragmentedField<3>&Heightfield,
159 int Component = 2);
160
161
162extern gridop_API
163std::string InterpolateUniformDataOnGrid(Grid&Dest,
164 const Grid&UniformSource,
165 const std::set<std::string> &myFields,
166 const MemCore::RefPtr<MemCore::LoaderProgress>&theProgress=nullptr);
167}
168
169
170
171#endif // __FIBER_BASEOP_UNIFORMMAPPING_HPP
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
Convenience class for procedural linear arrays in cartesian coordinates.
Definition UniformCartesianArray.hpp:22
Given a fragmented field of curvilinear coordinates, (3D array of coordinates), build a uniform Grid ...
Definition FAQ.dox:2
void MapToUniform(MultiArray< 3, double > &Dest, const UniformCartesianArray &UMap, const TypedChunkBase< FixedArray< double, 3 > > &Src, std::vector< index_t > &IndexArray, int Component, const FixedArray< double, 3 > &Numericalshift)
Insert data to a height field.
Definition UniformMapping.cpp:24
MapToUniformIndexResult_t MapToUniformIndex(const UniformCartesianArray &UMap, TypedChunkBase< FixedArray< double, 3 > > &Src, double InvalidData, int Component, const FixedArray< double, 3 > &NumericalShift)
Create a height field with an index array that allows to reproduce the mapping on other data arrays.
Definition UniformMapping.cpp:139
void InterpolateUniformHeight(TypedChunkBase< FixedArray< double, 3 > > &Dest, const UniformCartesianArray &UMap, const MultiArray< 3, double > &Heightfield, int Component, const FixedArray< double, 3 > &Numericalshift, double HeightSlice)
Given an array of points (derived from FixedArray<double> ), replace the given component by an interp...
Definition UniformMapping.cpp:176
gridop_API void InterpolateUniformHeightfield(MemCore::TypedChunkBase< FixedArray< double, 3 > > &Dest, const std::vector< size_t > &IndexArray, const UniformCartesianArray &UMap, const MultiArray< 3, double > &Heightfield, int Component=2, const FixedArray< double, 3 > &Numericalshift={0., 0., 0.}, double HeightSlice=0.0)
Given an indexed array of points (derived from FixedArray<double> ), replace the given component by a...
StrongPtr< Object, ObjectBase > RefPtr