Skip to content

Commit f1f7eaa

Browse files
committed
Merge pull request #2 from joelthelion/master
ITKv4 compatibility
2 parents dafa4aa + 473ec0b commit f1f7eaa

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

Source/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
cmake_minimum_required(VERSION 2.8)
12
INCLUDE(${CMAKE_SOURCE_DIR}/IJMacros.txt)
23

34
#Change PROJECT_NAME to the name of your project
@@ -14,8 +15,8 @@ INCLUDE(Dart)
1415
#
1516
# The packages can be specified with a version number, for example:
1617
#
17-
# ITK 2.8.1
1818
# ITK 3.2.0
19+
# ITK 4.6.0
1920
#
2021
# If no version is specified, the most recent release of the package
2122
# will be used.
@@ -32,8 +33,7 @@ ENDFOREACH(Package)
3233
#Set any libraries that your project depends on.
3334
#examples: ITKCommon, VTKRendering, etc
3435
SET(Libraries
35-
ITKCommon
36-
ITKIO
36+
${ITK_LIBRARIES}
3737
)
3838

3939
#the following block of code is an example of how to build an executable in

Source/ImageCompare.cxx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include "itkImageFileWriter.h"
88
#include "itkRescaleIntensityImageFilter.h"
99
#include "itkExtractImageFilter.h"
10-
#include "itkDifferenceImageFilter.h"
10+
#include "itkTestingComparisonImageFilter.h"
1111

1212
using namespace std;
1313

@@ -136,7 +136,7 @@ int RegressionTestImage (const char *testImageFilename, const char *baselineImag
136136
}
137137

138138
// Now compare the two images
139-
typedef itk::DifferenceImageFilter<ImageType,ImageType> DiffType;
139+
typedef itk::Testing::ComparisonImageFilter<ImageType,ImageType> DiffType;
140140
DiffType::Pointer diff = DiffType::New();
141141
diff->SetValidInput(baselineReader->GetOutput());
142142
diff->SetTestInput(testReader->GetOutput());
@@ -184,7 +184,7 @@ int RegressionTestImage (const char *testImageFilename, const char *baselineImag
184184
std::cout << status;
185185
std::cout << "</DartMeasurement>" << std::endl;
186186

187-
::itk::OStringStream diffName;
187+
std::ostringstream diffName;
188188
diffName << testImageFilename << ".diff.png";
189189
try
190190
{
@@ -209,7 +209,7 @@ int RegressionTestImage (const char *testImageFilename, const char *baselineImag
209209
std::cout << diffName.str();
210210
std::cout << "</DartMeasurementFile>" << std::endl;
211211
}
212-
::itk::OStringStream baseName;
212+
std::ostringstream baseName;
213213
baseName << testImageFilename << ".base.png";
214214
try
215215
{
@@ -234,7 +234,7 @@ int RegressionTestImage (const char *testImageFilename, const char *baselineImag
234234
std::cout << baseName.str();
235235
std::cout << "</DartMeasurementFile>" << std::endl;
236236

237-
::itk::OStringStream testName;
237+
std::ostringstream testName;
238238
testName << testImageFilename << ".test.png";
239239
try
240240
{

Source/ImageCopy.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ int main(int argc, char **argv)
4545

4646
writer->SetInput(baselineReader->GetOutput());
4747

48-
::itk::OStringStream baseName;
48+
std::ostringstream baseName;
4949

5050
baseName << argv[1] << ".base.png";
5151

0 commit comments

Comments
 (0)