Skip to content

Commit 7cc027a

Browse files
committed
STYLE: Clean up the test by removing old convenience function
The output can now easily be compressed by passing "compress" command line argument to the test.
1 parent 1f3e6d3 commit 7cc027a

1 file changed

Lines changed: 1 addition & 35 deletions

File tree

test/itkOpenSlideImageIOTest.cxx

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,11 @@
2727
#include "itkImageFileWriter.h"
2828
#include "itkImage.h"
2929
#include "itkRGBAPixel.h"
30-
#include "itkOpenSlideImageIO.h"
3130

3231
#define SPECIFIC_IMAGEIO_MODULE_TEST
3332

3433
namespace
3534
{
36-
3735
bool
3836
ParseValue(const char * p_cValue, std::string & strCommand, std::string & strValue)
3937
{
@@ -60,36 +58,6 @@ ParseValue(const char * p_cValue, std::string & strCommand, std::string & strVal
6058

6159
return true;
6260
}
63-
64-
#if 0
65-
// For generating data for tests (particularly the streaming one)
66-
bool CompressImageFile(const char *p_cFileName) {
67-
using PixelType = itk::RGBAPixel<unsigned char>;
68-
using ImageType = itk::Image<PixelType, 2>;
69-
70-
using ReaderType = itk::ImageFileReader<ImageType>;
71-
using WriterType = itk::ImageFileWriter<ImageType>;
72-
73-
ReaderType::Pointer p_clReader = ReaderType::New();
74-
WriterType::Pointer p_clWriter = WriterType::New();
75-
76-
p_clReader->SetFileName(p_cFileName);
77-
p_clWriter->SetInput(p_clReader->GetOutput());
78-
p_clWriter->SetFileName(p_cFileName);
79-
p_clWriter->UseCompressionOn();
80-
81-
try {
82-
p_clWriter->Update();
83-
}
84-
catch (itk::ExceptionObject &e) {
85-
std::cerr << "Error: " << e << std::endl;
86-
return false;
87-
}
88-
89-
return true;
90-
}
91-
#endif
92-
9361
} // End anonymous namespace
9462

9563
int
@@ -111,6 +79,7 @@ itkOpenSlideImageIOTest(int argc, char * argv[])
11179
const char * const p_cInputImage = argv[1];
11280
const char * const p_cOutputImage = argv[2];
11381

82+
// skip program name, input file name, and output file name
11483
argc -= 3;
11584
argv += 3;
11685

@@ -292,8 +261,5 @@ itkOpenSlideImageIOTest(int argc, char * argv[])
292261
return iFailCode;
293262
}
294263

295-
// Use this to compress output images when updating tests
296-
// CompressImageFile(p_cOutputImage);
297-
298264
return iSuccessCode;
299265
}

0 commit comments

Comments
 (0)