FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
FragmentIO.hpp
1#ifndef __FIBERIO_HDF5_SAVE_FRAGMENTS_HPP
2#define __FIBERIO_HDF5_SAVE_FRAGMENTS_HPP
3
4#include <hdf5.h>
5#include <F5/F5defs.h>
6#include <F5/F5Path.h>
7#include <fiber/field/FragmentID.hpp>
8#include <fiber/field/TypedArray.hpp>
9#include <fiber/grid/SkeletonID.hpp>
10#include <fiber/grid/Grid.hpp>
11
12namespace Fiber
13{
14namespace FiberIO
15{
16namespace HDF5
17{
18
19using namespace Fiber;
20using namespace std;
21
22
24{
25 hsize_t data_start [FIBER_MAX_RANK];
26 hsize_t*start_border = 0;
27 hsize_t*end_border = 0;
28
29 hsize_t overlap_start[FIBER_MAX_RANK];
30 hsize_t overlap_end [FIBER_MAX_RANK];
31
33};
34
38bool SaveFragmentArray(const RefPtr<Fiber::Grid>&theGrid, const TypedArray<RefPtr<FragmentID> >&Array, F5Path*myPath,
39 const string&name, int rank, hsize_t dims[],
42
44 loadFragmentArray(int skel_dims,
48
49
54bool SaveVectorFragmentArray(const TypedArray<vector<RefPtr<FragmentID>> >&Array,
55 F5Path*myPath,
57 const string&name, int rank, hsize_t dims[],
59
61 loadVectorFragmentArray(hid_t DatasetID, const DynamicSize&theSize, Skeleton&TargetSkeleton,
62 const MemBase::Creator_t&C = nullptr);
63
64
68SkeletonID identifyFragmentIDSkeleton(hid_t type_id);
69
70
72{
73 bool CheckZeros = false;
74 size_t max_str_len = 0;
75 size_t nFragments = 0;
76
77public:
78 int rank = 0;
79 hsize_t dims[FIBER_MAX_RANK] = {0,0,0,0,0};
80
81 FragmentIDBuffer() = delete;
82 FragmentIDBuffer(const FragmentIDBuffer&) = delete;
83
85
86 size_t NumberOfFragments() const
87 {
88 return nFragments;
89 }
90
91private:
92 void createVectorOfString(std::vector<string>&FragmentNameVector) const;
93
94public:
95 RefPtr<TypedArray<string>> createFragmentNames() const;
96
97 [[deprecated("use createFragmentNames() instead")]]
100
101 DynamicSize getSize() const
102 {
103 return DynamicSize(rank, dims);
104 }
105};
106
107}
108}
109}
110
111#endif // __FIBERIO_HDF5_SAVE_FRAGMENTS_HPP
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
A class describing an n-dimensional space at runtime.
Definition field/DynamicSize.hpp:29
Definition FragmentIO.hpp:72
A collection of fragment identifiers with bijective mapping to an integer fragment number.
Definition FragmentIDCollection.hpp:19
Identifier for Skeletons within a Grid.
Definition SkeletonID.hpp:24
A Skeleton is a set of Representation object, each of them accessed by an Representer object.
Definition Skeleton.hpp:102
An intermediate class that allows to operate on the pure type information of some memory array.
Definition TypedArray.hpp:58
Given a fragmented field of curvilinear coordinates, (3D array of coordinates), build a uniform Grid ...
Definition FAQ.dox:2
STL namespace.
Definition FragmentIO.hpp:24