Skip to content

Commit 462f17c

Browse files
authored
Merge pull request #2 from aronhelser/test_rename
Rename tests, turn off "simple" flag.
2 parents 88e94ac + 9d1300d commit 462f17c

8 files changed

+13
-10
lines changed

Testing/Cxx/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Test has a baseline, and writes a file.
22
vtk_add_test_cxx(vtkCleaverImageToUnstructuredGridFilterCxxTests tests
3-
vtkCleaverImageToUnstructuredGridFilterTest.cxx,NO_DATA
4-
vtkCleaverImageToUnstructuredGridFilterTest2.cxx,NO_DATA
3+
TestCleaverFilterLabelMapInput.cxx,NO_DATA
4+
TestCleaverFilterIndicatorInput.cxx,NO_DATA
55
)
66

77
vtk_test_cxx_executable(vtkCleaverImageToUnstructuredGridFilterCxxTests tests

Testing/Cxx/vtkCleaverImageToUnstructuredGridFilterTest2.cxx renamed to Testing/Cxx/TestCleaverFilterIndicatorInput.cxx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,11 @@
3535
#include "vtkCleaverImageToUnstructuredGridFilter.h"
3636

3737
const int TEST_IMAGE_SIZE = 24;
38+
3839
// Test the use of indicator functions as input. Indicator functions are
3940
// increasingly positive where the label/region is present, and more negative
4041
// further from the label/region.
41-
int vtkCleaverImageToUnstructuredGridFilterTest2(int argc, char* argv[])
42+
int TestCleaverFilterIndicatorInput(int argc, char* argv[])
4243
{
4344
vtkNew<vtkImageData> indicatorImage[3];
4445
indicatorImage[0]->SetDimensions(TEST_IMAGE_SIZE, TEST_IMAGE_SIZE, TEST_IMAGE_SIZE);
@@ -80,9 +81,9 @@ int vtkCleaverImageToUnstructuredGridFilterTest2(int argc, char* argv[])
8081
cleaverFilter->Update();
8182

8283
// Output checking
83-
vtkLogIf(ERROR, cleaverFilter->GetOutput()->GetNumberOfCells() != 6358,
84+
vtkLogIf(ERROR, cleaverFilter->GetOutput()->GetNumberOfCells() != 4152,
8485
"Unexpected number of cells " << cleaverFilter->GetOutput()->GetNumberOfCells());
85-
vtkLogIf(ERROR, cleaverFilter->GetOutput()->GetNumberOfPoints() != 1268,
86+
vtkLogIf(ERROR, cleaverFilter->GetOutput()->GetNumberOfPoints() != 864,
8687
"Unexpected number of points " << cleaverFilter->GetOutput()->GetNumberOfPoints());
8788

8889
vtkNew<vtkDataSetMapper> allMapper;

Testing/Cxx/vtkCleaverImageToUnstructuredGridFilterTest.cxx renamed to Testing/Cxx/TestCleaverFilterLabelMapInput.cxx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@
3535
#include "vtkCleaverImageToUnstructuredGridFilter.h"
3636

3737
const int TEST_IMAGE_SIZE = 24;
38-
// Test the use of a labelmap as input.
39-
int vtkCleaverImageToUnstructuredGridFilterTest(int argc, char* argv[])
38+
39+
// Test the use of a labelmap as input. Input is computed, background is zero,
40+
// sphere with label 1.0 centered at (cX, cY, cZ) and sphere with label 1.0 at zero.
41+
int TestCleaverFilterLabelMapInput(int argc, char* argv[])
4042
{
4143
vtkNew<vtkImageData> labelImage;
4244
labelImage->SetDimensions(TEST_IMAGE_SIZE, TEST_IMAGE_SIZE, TEST_IMAGE_SIZE);
@@ -73,9 +75,9 @@ int vtkCleaverImageToUnstructuredGridFilterTest(int argc, char* argv[])
7375
cleaverFilter->Update();
7476

7577
// Output checking
76-
vtkLogIf(ERROR, cleaverFilter->GetOutput()->GetNumberOfCells() != 1170,
78+
vtkLogIf(ERROR, cleaverFilter->GetOutput()->GetNumberOfCells() != 822,
7779
"Unexpected number of cells " << cleaverFilter->GetOutput()->GetNumberOfCells());
78-
vtkLogIf(ERROR, cleaverFilter->GetOutput()->GetNumberOfPoints() != 281,
80+
vtkLogIf(ERROR, cleaverFilter->GetOutput()->GetNumberOfPoints() != 202,
7981
"Unexpected number of points " << cleaverFilter->GetOutput()->GetNumberOfPoints());
8082

8183
vtkNew<vtkDataSetMapper> allMapper;
Loading
Loading
Binary file not shown.
Binary file not shown.

vtkCleaverImageToUnstructuredGridFilter.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ int vtkCleaverImageToUnstructuredGridFilter::RequestData(vtkInformation* vtkNotU
488488
}
489489
fields = loadIndicatorFunctions(images, this->Sigma);
490490
}
491-
bool simple = true;
491+
bool simple = false;
492492
cleaver::TetMesh* bgMesh = nullptr;
493493
cleaver::Volume* volume = new cleaver::Volume(fields);
494494
cleaver::CleaverMesher mesher(simple);

0 commit comments

Comments
 (0)