FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
RelativeRepresentation.hpp
1#ifndef __FIBER_GRID_TYPES_RELATIVE_REPRESENTATION_HPP
2#define __FIBER_GRID_TYPES_RELATIVE_REPRESENTATION_HPP
3
4#include "fish/fiber/grid/SkeletonID.hpp"
5
6#include "TypedGrid.hpp"
7
8namespace Fiber
9{
10
11
19{
20 RefPtr<Skeleton> ParentSkeleton,
21 ChildSkeleton;
22
23 RefPtr<Representation> ParentChildRelation;
24
25 RefPtr<Field> getParentChildMapping() const
26 {
27 if (!ParentChildRelation) return nullptr;
28 return ParentChildRelation->getPositions();
29 }
30
34 bool assign(const RefPtr<Grid>&theGrid, const SkeletonID&ParentSid, const SkeletonID&ChildSid);
35
36
42
44 {}
45
47 {
48 if (!assign(theGrid, ParentSid, ChildSid))
49 TypedGrid::assign(nullptr);
50 }
51
52 RelativeRepresentation(const Grid&theGrid, const SkeletonID&ParentSid, const SkeletonID&ChildSid)
53 : RelativeRepresentation(theGrid.self(), ParentSid, ChildSid)
54 {}
55
56 ~RelativeRepresentation();
57
58
59static RelativeRepresentation create(Grid&theGrid,
60 const SkeletonID&ParentSid,
61 const SkeletonID&ChildSid);
62
63static RelativeRepresentation createRefinement(Grid&theGrid, const SkeletonID&S, int refinement_increment = 1)
64 {
65 return create( theGrid, S, SkeletonID::nextRefinement(S, refinement_increment));
66 }
67
68};
69
70} // namespace Fiber
71
72#endif // __FIBER_GRID_TYPES_RELATIVE_REPRESENTATION_HPP
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
Identifier for Skeletons within a Grid.
Definition SkeletonID.hpp:24
static SkeletonID nextRefinement(const SkeletonID &Sid, int refinement_increment)
Create a SkeletonID that is refined by a certain increment.
Definition SkeletonID.hpp:71
Given a fragmented field of curvilinear coordinates, (3D array of coordinates), build a uniform Grid ...
Definition FAQ.dox:2
A relative representation from one Skeleton to another Skeleton where elements of one Skeleton are re...
Definition RelativeRepresentation.hpp:19
bool assign(const RefPtr< Grid > &theParentGrid, const SkeletonID &ParentSid, const RefPtr< Grid > &theChildGrid, const SkeletonID &ChildSid)
Get refinement information between different Grids.
Base class for grid types.
Definition TypedGrid.hpp:47