<commit_before>#include <string>
#include "itkGEAdwImageIO.h"
#include "itkGE4ImageIO.h"
#include "itkGE5ImageIO.h"
#include "itkSiemensVisionImageIO.h"
#include "itkExceptionObject.h"
#include "itkImageFileReader.h"
#include "itkImage.h"
#include <itkkwsys/SystemTools.hxx>

typedef itk::Image<signed short, 3> ImageType ;
typedef ImageType::Pointer ImagePointer ;
typedef itk::ImageFileReader< ImageType > ImageReaderType ;

int itkGEImageIOTest(int ac, char * av[])
{
  //
  // first argument is passing in the writable directory to do all testing
  if(ac > 1) {
    char *testdir = *++av;
    --ac;
    itkkwsys::SystemTools::ChangeDirectory(testdir);
  }
  if(ac != 4)
    return 1;
  std::string failmode(av[1]);
  std::string filetype(av[2]);
  std::string filename(av[3]);
  bool Failmode = failmode == std::string("true");
  itk::ImageIOBase::Pointer io;
  if(filetype == "GE4")
    {
      io = itk::GE4ImageIO::New();
    }
  else if(filetype == "GE5")
    {
      io = itk::GE5ImageIO::New();
    }
  else if(filetype == "GEAdw")
    {
      io = itk::GE5ImageIO::New();
    }
  else if(filetype == "Siemens")
    {
      io = itk::SiemensVisionImageIO::New();
    }
  else
    {
      return 1;
    }

  ImagePointer input ;
  ImageReaderType::Pointer imageReader = ImageReaderType::New() ;

  try
    {
      imageReader->SetImageIO(io);
      imageReader->SetFileName(filename.c_str()) ;
      imageReader->Update() ;
      input = imageReader->GetOutput() ;
    }
  catch (itk::ExceptionObject e)
    {
      return Failmode ? 1 : 0;
    }
  return Failmode ? 0 : 1;
}
<commit_msg>ERR: mismatch between case statement and file type.<commit_after>#include <string>
#include "itkGEAdwImageIO.h"
#include "itkGE4ImageIO.h"
#include "itkGE5ImageIO.h"
#include "itkSiemensVisionImageIO.h"
#include "itkExceptionObject.h"
#include "itkImageFileReader.h"
#include "itkImage.h"
#include <itkkwsys/SystemTools.hxx>

typedef itk::Image<signed short, 3> ImageType ;
typedef ImageType::Pointer ImagePointer ;
typedef itk::ImageFileReader< ImageType > ImageReaderType ;

int itkGEImageIOTest(int ac, char * av[])
{
  //
  // first argument is passing in the writable directory to do all testing
  if(ac > 1) {
    char *testdir = *++av;
    --ac;
    itkkwsys::SystemTools::ChangeDirectory(testdir);
  }
  if(ac != 4)
    return 1;
  std::string failmode(av[1]);
  std::string filetype(av[2]);
  std::string filename(av[3]);
  bool Failmode = failmode == std::string("true");
  itk::ImageIOBase::Pointer io;
  if(filetype == "GE4")
    {
      io = itk::GE4ImageIO::New();
    }
  else if(filetype == "GE5")
    {
      io = itk::GE5ImageIO::New();
    }
  else if(filetype == "GEAdw")
    {
      io = itk::GEAdwImageIO::New();
    }
  else if(filetype == "Siemens")
    {
      io = itk::SiemensVisionImageIO::New();
    }
  else
    {
      return 1;
    }

  ImagePointer input ;
  ImageReaderType::Pointer imageReader = ImageReaderType::New() ;

  try
    {
      imageReader->SetImageIO(io);
      imageReader->SetFileName(filename.c_str()) ;
      imageReader->Update() ;
      input = imageReader->GetOutput() ;
    }
  catch (itk::ExceptionObject e)
    {
      return Failmode ? 1 : 0;
    }
  return Failmode ? 0 : 1;
}

{'fraction_non_alphanumeric': 0.14965986394557823, 'fraction_numerical': 0.011440940012368584, 'mean_word_length': 3.4497936726272354, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '348554', 'n_tokens_mistral': 1201, 'n_tokens_neox': 1173, 'n_words': 235}