FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
LoadGrid.hpp
1#ifndef __FIBER_FIBERIO_HDF5_GRID_LOADER_HPP
2#define __FIBER_FIBERIO_HDF5_GRID_LOADER_HPP
3
4#include <fiber/grid/Grid.hpp>
5#include <fiber/bundle/StorageTransformations.hpp>
6#include <memcore/Loader.hpp>
7#include <hdf5.h>
8#include <F5/F5Path.h>
9#include <fiber/grid/types/FragmentTopology.hpp>
10#include <F5/F5iterate.h>
11
12#include "H++/H5Property.hpp"
13
14namespace Fiber
15{
16
18{
19public:
20 Fiber::Grid&MyGrid;
21
24 std::string path_info;
25
26 std::unordered_set<std::string> IgnoreAttributesOnLoad;
27
28private:
30 NamedSkeleton_t AvailableGridSkeletons;
31
33 GotRepresentations_t GotRepresentations;
34
35public:
38
40 SkeletonFragmentIDCollections;
41
43
47 const std::string&info);
48
50
51 bool gotRepresentation(const MemCore::WeakPtr<Fiber::Representation>&R) const;
52
53 MemCore::WeakPtr<Fiber::Skeleton> findAvailableSkeleton(const std::string&NameInFile) const;
54
60
61 void loadGrid(F5Path*grid);
62
69 herr_t LoadSkeletonTopology(F5Path*skeleton, const char*skeletonname, int index_depth, int skel_dims);
70 herr_t LoadSkeletonCoordinateRepresentations(F5Path*skeleton, const char*skeletonname, int index_depth, int skel_dims);
71 herr_t LoadSkeletonRelativeRepresentations(F5Path*skeleton, const char*skeletonname, int index_depth, int skel_dims);
72 herr_t LoadSkeletonOtherRepresentations(F5Path*skeleton, const char*skeletonname, int index_depth, int skel_dims);
73
74private:
75 void loadAtlas(F5Path*grid);
76 void identify_all_SkeletonIDs_and_create_empty_Skeletons(F5Path*grid);
77
78};
79
80template <class IteratorContainer>
81inline void F5IterateTopologies(IteratorContainer&I, F5Path*grid,
83
84{
85 struct F5Iterate
86 {
89
90// F5 callback to iterate over skeletons and load them
92 int index_depth, int skel_dims,
93 void *operator_data)
94 {
95 F5Iterate&FI = *reinterpret_cast<F5Iterate*>(operator_data);
96 return (FI.IC->*FI.Iterator)(skeleton, skeletonname, index_depth, skel_dims);
97 }
98
99 } FIT;
100 FIT.IC = &I;
101 FIT.Iterator = Iterator;
102
103 F5iterate_topologies(grid, NULL, F5Iterate::skeleton_iterator, &FIT);
104}
105
106
107} // namespace Fiber
108
109#endif // __FIBER_FIBERIO_HDF5_GRID_LOADER_HPP
basic_string< char > string
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
Definition LoadGrid.hpp:18
void createSkeleton(const Fiber::SkeletonID &, const std::string &SkeletonNameInFile)
Create a new Skeleton on the current Grid and remember it as available under the given name as it was...
Definition LoadGrid.cpp:929
herr_t LoadSkeletonTopology(F5Path *skeleton, const char *skeletonname, int index_depth, int skel_dims)
Check if this skeleton has higher order skeletons describing its topology, for instance determine whe...
Definition LoadGrid.cpp:438
A Grid is a set of Skeleton objects, each of them accessed via some unique SkeletonID object.
Definition Grid.hpp:60
Implementation of an Iterator to a sequence of elements, which might be contiguous or a projection of...
Definition vector/Iterator.hpp:525
Iterator(index_t howmany, T *Ptr)
Construct view pointer from contiguous storage.
Definition vector/Iterator.hpp:551
Identifier for Skeletons within a Grid.
Definition SkeletonID.hpp:24
Given a fragmented field of curvilinear coordinates, (3D array of coordinates), build a uniform Grid ...
Definition FAQ.dox:2
std::map< std::string, MemCore::WeakPtr< Fiber::Skeleton > > NamedSkeleton_t
A helper type to store a set of skeletons via some (unique) textual identifier.
Definition FragmentTopology.hpp:41