Skip to content

Commit c69a657

Browse files
PtiLukyhjmjohnson
authored andcommitted
ENH: Add Unit test for reading short rescaled into ushort
1 parent 164c1cb commit c69a657

File tree

4 files changed

+16
-1
lines changed

4 files changed

+16
-1
lines changed

Modules/IO/GDCM/src/itkGDCMImageIO.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ GDCMImageIO::InternalReadImageInformation()
537537
switch (outputpt)
538538
{
539539
// Default comparison uses the > operator and the order in ScalarType enum
540-
// INT types needs to be adjusted so signed input is allowed to produce unsigned output
540+
// INT types need to be adjusted so signed input is allowed to produce unsigned output
541541
case gdcm::PixelFormat::UINT8:
542542
ptLarger = pixeltype > gdcm::PixelFormat::INT8;
543543
break;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bafkreifqaycilgy52jjjytkjbfrfaioc57bfjnfhfuuynozr3g3xmv6apu

Modules/IO/GDCM/test/CMakeLists.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,19 @@ itk_add_test(
250250
itkGDCMImageIONoPreambleTest
251251
DATA{Input/preamble.dcm})
252252

253+
itk_add_test(
254+
NAME
255+
itkGDCMImageIOIntToUintTest
256+
COMMAND
257+
ITKIOGDCMTestDriver
258+
--compare
259+
DATA{Baseline/itkGDCMImageIOTestIntToUint.mha}
260+
${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTestIntToUint.mha
261+
itkGDCMImageReadWriteTest
262+
DATA{Input/030658_001.dcm}
263+
${ITK_TEST_OUTPUT_DIR}/itkGDCMImageIOTestIntToUint.mha
264+
scalar)
265+
253266
itk_add_test(
254267
NAME
255268
itkGDCMImageIO32bitsStoredTest
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bafkreieyej3y53xaqg6dcedbv5pa6y5m25rdrg42wdqm43oh4ijjrlpl4a

0 commit comments

Comments
 (0)