Skip to content

Commit a9604f6

Browse files
authored
Tolerance fix (#32)
* Apply orientation and spacing tolerances to all filters
1 parent 06914e6 commit a9604f6

30 files changed

+122
-11
lines changed

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ CONFIGURE_FILE(
3737
"${PROJECT_BINARY_DIR}/config/EnvironmentInfo.h"
3838
)
3939

40+
#if(CMAKE_COMPILER_IS_GNUCXX)
41+
# include(CodeCoverage)
42+
# setup_target_for_coverage(${PROJECT_NAME}_coverage tests coverage)
43+
#endif()
44+
45+
#SET(CMAKE_CXX_FLAGS "-Wall -pedantic -pthread -g -O0 --coverage")
46+
4047
INCLUDE_DIRECTORIES("${PROJECT_BINARY_DIR}/config")
4148

4249
ENABLE_TESTING()

lib/petpvcDiscreteIYPVCImageFilter.txx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ template< class TInputImage, class TMaskImage >
4545
void DiscreteIYPVCImageFilter< TInputImage, TMaskImage>
4646
::GenerateData()
4747
{
48+
49+
this->SetGlobalDefaultCoordinateTolerance( 1e-2 );
50+
this->SetGlobalDefaultDirectionTolerance( 1e-2 );
51+
4852
typename TInputImage::ConstPointer input = this->GetInput();
4953
typename TInputImage::Pointer output = this->GetOutput();
5054

lib/petpvcFuzzyCorrectionFilter.txx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ template<class TImage>
5151
void FuzzyCorrectionFilter<TImage>::GenerateData()
5252
{
5353

54+
this->SetGlobalDefaultCoordinateTolerance( 1e-2 );
55+
this->SetGlobalDefaultDirectionTolerance( 1e-2 );
56+
5457
//Get pointers to input and output.
5558
typename TImage::ConstPointer input = this->GetInput();
5659
typename TImage::Pointer output = this->GetOutput();

lib/petpvcGTMImageFilter.txx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ template<class TImage>
5454
void GTMImageFilter<TImage>::GenerateData()
5555
{
5656

57+
this->SetGlobalDefaultCoordinateTolerance( 1e-2 );
58+
this->SetGlobalDefaultDirectionTolerance( 1e-2 );
59+
5760
//Get pointers to input and output.
5861
typename TImage::ConstPointer input = this->GetInput();
5962

lib/petpvcIntraRegRLImageFilter.txx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ template< class TInputImage, class TMaskImage >
4545
void IntraRegRLImageFilter< TInputImage, TMaskImage>
4646
::GenerateData()
4747
{
48+
49+
this->SetGlobalDefaultCoordinateTolerance( 1e-2 );
50+
this->SetGlobalDefaultDirectionTolerance( 1e-2 );
51+
4852
typename TInputImage::ConstPointer input = this->GetInput();
4953
typename TInputImage::Pointer output = this->GetOutput();
5054

lib/petpvcIntraRegVCImageFilter.txx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ template< class TInputImage, class TMaskImage >
4545
void IntraRegVCImageFilter< TInputImage, TMaskImage>
4646
::GenerateData()
4747
{
48+
49+
this->SetGlobalDefaultCoordinateTolerance( 1e-2 );
50+
this->SetGlobalDefaultDirectionTolerance( 1e-2 );
51+
4852
typename TInputImage::ConstPointer input = this->GetInput();
4953
typename TInputImage::Pointer output = this->GetOutput();
5054

lib/petpvcIterativeYangPVCImageFilter.txx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ template< class TInputImage, class TMaskImage >
4545
void IterativeYangPVCImageFilter< TInputImage, TMaskImage>
4646
::GenerateData()
4747
{
48+
49+
this->SetGlobalDefaultCoordinateTolerance( 1e-2 );
50+
this->SetGlobalDefaultDirectionTolerance( 1e-2 );
51+
4852
typename TInputImage::ConstPointer input = this->GetInput();
4953
typename TInputImage::Pointer output = this->GetOutput();
5054

lib/petpvcLabbeImageFilter.txx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ template<class TImage>
5555
void LabbeImageFilter<TImage>::GenerateData()
5656
{
5757

58+
this->SetGlobalDefaultCoordinateTolerance( 1e-2 );
59+
this->SetGlobalDefaultDirectionTolerance( 1e-2 );
60+
5861
//Get pointers to input and output.
5962
typename TImage::ConstPointer input = this->GetInput();
6063

lib/petpvcLabbeMTCPVCImageFilter.txx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ template< class TInputImage, class TMaskImage >
4545
void LabbeMTCPVCImageFilter< TInputImage, TMaskImage>
4646
::GenerateData()
4747
{
48+
49+
this->SetGlobalDefaultCoordinateTolerance( 1e-2 );
50+
this->SetGlobalDefaultDirectionTolerance( 1e-2 );
51+
4852
typename TInputImage::ConstPointer input = this->GetInput();
4953
typename TInputImage::Pointer output = this->GetOutput();
5054

lib/petpvcLabbePVCImageFilter.txx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ template< class TInputImage, class TMaskImage >
4444
void LabbePVCImageFilter< TInputImage, TMaskImage>
4545
::GenerateData()
4646
{
47+
48+
this->SetGlobalDefaultCoordinateTolerance( 1e-2 );
49+
this->SetGlobalDefaultDirectionTolerance( 1e-2 );
50+
4751
typename TInputImage::ConstPointer input = this->GetInput();
4852
typename TInputImage::Pointer output = this->GetOutput();
4953

0 commit comments

Comments
 (0)