25 #ifndef WJOINCONTOURTREE_TEST_H
26 #define WJOINCONTOURTREE_TEST_H
32 #include <cxxtest/TestSuite.h>
34 #include "../../../common/WLogger.h"
35 #include "../WJoinContourTree.h"
80 size_t data[] = { 4, 9, 3, 3, 5, 1, 7, 2, 12, 13, 11, 14, 6, 8, 9, 11 };
81 std::vector< size_t > expectedJT( data, data + 16 );
93 size_t data[] = { 0, 4, 5, 1 };
94 std::set< size_t > expected( data, data + 4 );
98 using string_utils::operator<<;
108 size_t data[] = { 0, 4, 5, 1, 10, 11, 14, 15, 13, 9 };
109 std::set< size_t > expected( data, data + 10 );
113 using string_utils::operator<<;
137 std::shared_ptr< WGridRegular3D > grid(
new WGridRegular3D( 4, 4, 1 ) );
138 double isoValuesData[] = { 15, 11, -1, -3, 13, 12, 1, 0, 3, 5, 10, 9, 2, 4, 8, 14 };
139 std::shared_ptr< std::vector< double > > isoValues =
140 std::shared_ptr< std::vector< double > >(
new std::vector< double >( isoValuesData, isoValuesData + 16 ) );
141 std::shared_ptr< WValueSet< double > > valueset(
new WValueSet< double >( 0, 1, isoValues, W_DT_DOUBLE ) );
A data set consisting of a set of values based on a grid.
A grid that has parallelepiped cells which all have the same proportion.
Unit tests the Join Tree of the Contour Tree!
void testGetVolumeVoxelsEnclosedByIsoSurfaceWithMerges(void)
All voxels enclosed by the biggest isoSurface are contained in the biggest component which may be cre...
void setUp()
Creates an example dataset so I hope its easy to test the join tree.
void testbuildJoinTreeOnRegular2DGrid(void)
The construction of a Join Tree is done via a special index array.
void tearDown(void)
Tidy up things created during setUp.
void testGetVolumeVoxelsEnclosedByIsoSurfaceWithOutMerge(void)
All voxels enclosed by the biggest isosurface are contained in the biggest component of the JoinTree ...
std::shared_ptr< WDataSetSingle > m_dataset
Dataset which is used to create the join tree.
Processes a dataset for join tree computation.
std::vector< size_t > m_joinTree
For each index stores which node it is connected to.
void buildJoinTree()
Build the join tree.
std::shared_ptr< std::set< size_t > > getVolumeVoxelsEnclosedByIsoSurface(const double isoValue) const
For a given isovalue all the voxel which are enclosed by the biggest isosurface are computed.
static void startup(std::ostream &output=std::cout, LogLevel level=LL_DEBUG)
Create the first and only instance of the logger as it is a singleton.
Base Class for all value set types.