-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
5 changed files
with
252 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
itk_module_test() | ||
|
||
set(NDRegTests | ||
itkMetamorphosisImageRegistrationMethodv4Test.cxx | ||
itkTimeVaryingVelocityFieldSemiLagrangianIntegrationImageFilterTest.cxx | ||
itkTimeVaryingVelocityFieldSemiLagrangianTransformTest.cxx | ||
itkWrapExtrapolateImageFunctionTest.cxx | ||
) | ||
|
||
CreateTestDriver(NDReg "${NDReg-Test_LIBRARIES}" "${NDRegTests}") | ||
|
||
itk_add_test(NAME itkMetamorphosisImageRegistrationMethodv4Test | ||
COMMAND NDRegTestDriver | ||
--compare ${ITK_TEST_OUTPUT_DIR}/itkMyFilterTestOutput.mha | ||
DATA{Baseline/itkMyFilterTestOutput.mha} | ||
itkMetamorphosisImageRegistrationMethodv4Test ${ITK_TEST_OUTPUT_DIR}/itkMyFilterTestOutput.mha | ||
) | ||
|
||
itk_add_test(NAME itkTimeVaryingVelocityFieldSemiLagrangianIntegrationImageFilterTest | ||
COMMAND NDRegTestDriver | ||
--compare ${ITK_TEST_OUTPUT_DIR}/itkMyFilterTestOutput.mha | ||
DATA{Baseline/itkMyFilterTestOutput.mha} | ||
itkTimeVaryingVelocityFieldSemiLagrangianIntegrationImageFilterTest ${ITK_TEST_OUTPUT_DIR}/itkMyFilterTestOutput.mha | ||
) | ||
|
||
itk_add_test(NAME itkTimeVaryingVelocityFieldSemiLagrangianTransformTest | ||
COMMAND NDRegTestDriver --without-threads | ||
--compare ${ITK_TEST_OUTPUT_DIR}/itkNormalDistributionImageSourceTestOutput.mha | ||
DATA{Baseline/itkNormalDistributionImageSourceTestOutput.mha} | ||
itkTimeVaryingVelocityFieldSemiLagrangianTransformTest ${ITK_TEST_OUTPUT_DIR}/itkNormalDistributionImageSourceTestOutput.mha | ||
) | ||
|
||
itk_add_test(NAME itkWrapExtrapolateImageFunctionTest | ||
COMMAND NDRegTestDriver | ||
--compare ${ITK_TEST_OUTPUT_DIR}/itkMyFilterTestOutput.mha | ||
DATA{Baseline/itkMyFilterTestOutput.mha} | ||
itkWrapExtrapolateImageFunctionTest ${ITK_TEST_OUTPUT_DIR}/itkMyFilterTestOutput.mha | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/*========================================================================= | ||
* | ||
* Copyright Insight Software Consortium | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0.txt | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*=========================================================================*/ | ||
|
||
#include "itkMetamorphosisImageRegistrationMethodv4.h" | ||
#include "itkImageFileWriter.h" | ||
#include "itkTestingMacros.h" | ||
|
||
|
||
int itkMetamorphosisImageRegistrationMethodv4Test( int argc, char * argv[] ) | ||
{ | ||
if( argc < 2 ) | ||
{ | ||
std::cerr << "Missing parameters." << std::endl; | ||
std::cerr << "Usage: " << argv[0]; | ||
std::cerr << " outputImage"; | ||
std::cerr << std::endl; | ||
return EXIT_FAILURE; | ||
} | ||
|
||
|
||
const char * outputImageFileName = argv[1]; | ||
|
||
const unsigned int Dimension = 2; | ||
using PixelType = float; | ||
using ImageType = itk::Image< PixelType, Dimension >; | ||
|
||
using MetamorphosisImageRegistrationMethodv4Type = itk::MetamorphosisImageRegistrationMethodv4< ImageType, ImageType >; | ||
MetamorphosisImageRegistrationMethodv4Type::Pointer metamorphosisImageRegistration = | ||
MetamorphosisImageRegistrationMethodv4Type::New(); | ||
|
||
EXERCISE_BASIC_OBJECT_METHODS( metamorphosisImageRegistration, MetamorphosisImageRegistrationMethodv4, | ||
TimeVaryingVelocityFieldImageRegistrationMethodv4 ); | ||
|
||
|
||
|
||
std::cout << "Test finished." << std::endl; | ||
return EXIT_SUCCESS; | ||
} |
58 changes: 58 additions & 0 deletions
58
test/itkTimeVaryingVelocityFieldSemiLagrangianIntegrationImageFilterTest.cxx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/*========================================================================= | ||
* | ||
* Copyright Insight Software Consortium | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0.txt | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*=========================================================================*/ | ||
|
||
#include "itkTimeVaryingVelocityFieldSemiLagrangianIntegrationImageFilter.h" | ||
#include "itkImageFileWriter.h" | ||
#include "itkTestingMacros.h" | ||
|
||
|
||
int itkTimeVaryingVelocityFieldSemiLagrangianIntegrationImageFilterTest( int argc, char * argv[] ) | ||
{ | ||
if( argc < 2 ) | ||
{ | ||
std::cerr << "Missing parameters." << std::endl; | ||
std::cerr << "Usage: " << argv[0]; | ||
std::cerr << " outputImage"; | ||
std::cerr << std::endl; | ||
return EXIT_FAILURE; | ||
} | ||
|
||
constexpr unsigned int Dimension = 3; | ||
|
||
using PixelType = float; | ||
using ImageType = itk::Image< PixelType, Dimension >; | ||
|
||
using VectorType = itk::Vector< PixelType, Dimension >; | ||
using DisplacementFieldType = itk::Image< VectorType, Dimension >; | ||
using TimeVaryingVelocityFieldType = itk::Image< VectorType, Dimension >; | ||
|
||
using TimeVaryingVelocityFieldSemiLagrangianIntegrationImageFilterType = | ||
itk::TimeVaryingVelocityFieldSemiLagrangianIntegrationImageFilter< TimeVaryingVelocityFieldType, | ||
DisplacementFieldType >; | ||
TimeVaryingVelocityFieldSemiLagrangianIntegrationImageFilterType::Pointer | ||
timeVaryingVelocityFieldSemiLagrangianIntegrationImageFilter = | ||
TimeVaryingVelocityFieldSemiLagrangianIntegrationImageFilterType::New(); | ||
|
||
EXERCISE_BASIC_OBJECT_METHODS( timeVaryingVelocityFieldSemiLagrangianIntegrationImageFilter, | ||
TimeVaryingVelocityFieldSemiLagrangianIntegrationImageFilter, TimeVaryingVelocityFieldIntegrationImageFilter ); | ||
|
||
|
||
|
||
std::cout << "Test finished." << std::endl; | ||
return EXIT_SUCCESS; | ||
} |
52 changes: 52 additions & 0 deletions
52
test/itkTimeVaryingVelocityFieldSemiLagrangianTransformTest.cxx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/*========================================================================= | ||
* | ||
* Copyright Insight Software Consortium | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0.txt | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*=========================================================================*/ | ||
|
||
#include "itkTimeVaryingVelocityFieldSemiLagrangianTransform.h" | ||
#include "itkImageFileWriter.h" | ||
#include "itkTestingMacros.h" | ||
|
||
|
||
int itkTimeVaryingVelocityFieldSemiLagrangianTransformTest( int argc, char * argv[] ) | ||
{ | ||
if( argc < 2 ) | ||
{ | ||
std::cerr << "Missing parameters." << std::endl; | ||
std::cerr << "Usage: " << argv[0]; | ||
std::cerr << " outputImage"; | ||
std::cerr << std::endl; | ||
return EXIT_FAILURE; | ||
} | ||
|
||
constexpr unsigned int Dimension = 2; | ||
|
||
using PixelType = float; | ||
using ImageType = itk::Image< PixelType, Dimension >; | ||
|
||
using TimeVaryingVelocityFieldSemiLagrangianTransformType = | ||
itk::TimeVaryingVelocityFieldSemiLagrangianTransform< PixelType >; | ||
TimeVaryingVelocityFieldSemiLagrangianTransform::Pointer timeVaryingVelocityFieldSemiLagrangianTransform = | ||
TimeVaryingVelocityFieldSemiLagrangianTransform::New(); | ||
|
||
EXERCISE_BASIC_OBJECT_METHODS( timeVaryingVelocityFieldSemiLagrangianTransform, | ||
TimeVaryingVelocityFieldSemiLagrangianTransform, TimeVaryingVelocityFieldTransform ); | ||
|
||
|
||
|
||
std::cout << "Test finished." << std::endl; | ||
return EXIT_SUCCESS; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/*========================================================================= | ||
* | ||
* Copyright Insight Software Consortium | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0.txt | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*=========================================================================*/ | ||
|
||
#include "itkWrapExtrapolateImageFunction.h" | ||
#include "itkImageFileWriter.h" | ||
#include "itkTestingMacros.h" | ||
|
||
|
||
int itkWrapExtrapolateImageFunctionTest( int argc, char * argv[] ) | ||
{ | ||
if( argc < 2 ) | ||
{ | ||
std::cerr << "Missing parameters." << std::endl; | ||
std::cerr << "Usage: " << argv[0]; | ||
std::cerr << " outputImage"; | ||
std::cerr << std::endl; | ||
return EXIT_FAILURE; | ||
} | ||
|
||
constexpr unsigned int Dimension = 2; | ||
|
||
using PixelType = float; | ||
using ImageType = itk::Image< PixelType, Dimension >; | ||
|
||
using WrapExtrapolateImageFunctionType = itk::WrapExtrapolateImageFunction< ImageType >; | ||
WrapExtrapolateImageFunctionType::Pointer wrapExtrapolateImageFunction = | ||
WrapExtrapolateImageFunctionType::New(); | ||
|
||
EXERCISE_BASIC_OBJECT_METHODS( wrapExtrapolateImageFunction, WrapExtrapolateImageFunction, | ||
ExtrapolateImageFunction ); | ||
|
||
|
||
|
||
std::cout << "Test finished." << std::endl; | ||
return EXIT_SUCCESS; | ||
} |