Skip to content

Commit

Permalink
COMP: Rename ITK macros to up-to-date name conventions
Browse files Browse the repository at this point in the history
This includes changing TRY_EXPECT_NO_EXCEPTION to ITK_TRY_EXPECT_NO_EXCEPTION.
Also it changes EXERCISE_BASIC_OBJECT_METHODS to ITK_EXERCISE_BASIC_OBJECT_METHODS.
  • Loading branch information
mseng10 authored and hjmjohnson committed Dec 30, 2020
1 parent f879274 commit 9f7c907
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/itkStripTsImageFilterTest.cxx
Expand Up @@ -53,21 +53,21 @@ itkStripTsImageFilterTest(int argc, char * argv[])
ReaderType::Pointer reader = ReaderType::New();
reader->SetFileName(patientImageFilename);

TRY_EXPECT_NO_EXCEPTION(reader->Update());
ITK_TRY_EXPECT_NO_EXCEPTION(reader->Update());


using AtlasReaderType = itk::ImageFileReader<AtlasImageType>;
AtlasReaderType::Pointer atlasReader = AtlasReaderType::New();
atlasReader->SetFileName(atlasImageFilename);

TRY_EXPECT_NO_EXCEPTION(atlasReader->Update());
ITK_TRY_EXPECT_NO_EXCEPTION(atlasReader->Update());


using LabelReaderType = itk::ImageFileReader<AtlasLabelType>;
LabelReaderType::Pointer labelReader = LabelReaderType::New();
labelReader->SetFileName(atlasMaskFilename);

TRY_EXPECT_NO_EXCEPTION(labelReader->Update());
ITK_TRY_EXPECT_NO_EXCEPTION(labelReader->Update());


// Perform skull-stripping using stripTsImageFilter
Expand All @@ -77,14 +77,14 @@ itkStripTsImageFilterTest(int argc, char * argv[])
using StripTsFilterType = itk::StripTsImageFilter<ImageType, AtlasImageType, AtlasLabelType>;
StripTsFilterType::Pointer stripTsFilter = StripTsFilterType::New();

EXERCISE_BASIC_OBJECT_METHODS(stripTsFilter, StripTsImageFilter, ImageToImageFilter);
ITK_EXERCISE_BASIC_OBJECT_METHODS(stripTsFilter, StripTsImageFilter, ImageToImageFilter);

// Set the required inputs for the stripTsImageFilter
stripTsFilter->SetInput(reader->GetOutput());
stripTsFilter->SetAtlasImage(atlasReader->GetOutput());
stripTsFilter->SetAtlasBrainMask(labelReader->GetOutput());

TRY_EXPECT_NO_EXCEPTION(stripTsFilter->Update());
ITK_TRY_EXPECT_NO_EXCEPTION(stripTsFilter->Update());


// Mask the patient image using the output generated from the stripTsImageFilter as mask
Expand All @@ -94,7 +94,7 @@ itkStripTsImageFilterTest(int argc, char * argv[])
maskFilter->SetInput1(reader->GetOutput());
maskFilter->SetInput2(stripTsFilter->GetOutput());

TRY_EXPECT_NO_EXCEPTION(maskFilter->Update());
ITK_TRY_EXPECT_NO_EXCEPTION(maskFilter->Update());


// Write mask and masked patient image
Expand All @@ -103,15 +103,15 @@ itkStripTsImageFilterTest(int argc, char * argv[])
maskWriter->SetInput(stripTsFilter->GetOutput());
maskWriter->SetFileName(argv[4]);

TRY_EXPECT_NO_EXCEPTION(maskWriter->Update());
ITK_TRY_EXPECT_NO_EXCEPTION(maskWriter->Update());


using ImageWriterType = itk::ImageFileWriter<ImageType>;
ImageWriterType::Pointer imageWriter = ImageWriterType::New();
imageWriter->SetInput(maskFilter->GetOutput());
imageWriter->SetFileName(argv[5]);

TRY_EXPECT_NO_EXCEPTION(imageWriter->Update());
ITK_TRY_EXPECT_NO_EXCEPTION(imageWriter->Update());


double endTime = time(nullptr);
Expand Down

0 comments on commit 9f7c907

Please sign in to comment.