<commit_before>#
# This CMakeLists file will generate the file elxSupportedImageTypes.h
# in the bin directory. This file defines the types of images for which
# elastix is compiled.
#

# User specified variables:
mark_as_advanced( ELASTIX_IMAGE_DIMENSIONS )
if( NOT ELASTIX_IMAGE_DIMENSIONS )
  set( ELASTIX_IMAGE_DIMENSIONS 2 3 4 CACHE STRING "Specify image dimensions" )
endif()

mark_as_advanced( ELASTIX_IMAGE_2D_PIXELTYPES )
if( NOT ELASTIX_IMAGE_2D_PIXELTYPES )
  set( ELASTIX_IMAGE_2D_PIXELTYPES "float" CACHE STRING "Specify 2D pixel types" )
endif()

mark_as_advanced( ELASTIX_IMAGE_3D_PIXELTYPES )
if( NOT ELASTIX_IMAGE_3D_PIXELTYPES )
  set( ELASTIX_IMAGE_3D_PIXELTYPES "short" "float" CACHE STRING "Specify 3D pixel types" )
endif()

mark_as_advanced( ELASTIX_IMAGE_4D_PIXELTYPES )
if( NOT ELASTIX_IMAGE_4D_PIXELTYPES )
  set( ELASTIX_IMAGE_4D_PIXELTYPES "short" CACHE STRING "Specify 4D pixel types" )
endif()

# Define supported dimensions and types for sanity checks.
# Gives protection against typo's.
set( supportedDimensions 2 3 4 )
set( supportedTypes "char" "unsigned char"
  "short" "unsigned short" "int" "unsigned int"
  "long" "unsigned long" "float" "double" )

mark_as_advanced( USE_ALL_PIXELTYPES )
option( USE_ALL_PIXELTYPES "Build all pixel types" OFF )
if( ${USE_ALL_PIXELTYPES} )
  set( ELASTIX_IMAGE_2D_PIXELTYPES ${supportedTypes} )
  set( ELASTIX_IMAGE_3D_PIXELTYPES ${supportedTypes} )
  set( ELASTIX_IMAGE_4D_PIXELTYPES ${supportedTypes} )
endif()

# Sanity check if > 0 number of dimensions are requested
list( LENGTH ELASTIX_IMAGE_DIMENSIONS numDims )
if( ${numDims} EQUAL 0 )
  message( FATAL_ERROR "ERROR: you should set one or more values "
    " to ELASTIX_IMAGE_DIMENSIONS!\n"<commit_msg>COMP: Allow option for building all pixel types to be set from command line<commit_after>#
# This CMakeLists file will generate the file elxSupportedImageTypes.h
# in the bin directory. This file defines the types of images for which
# elastix is compiled.
#

# User specified variables:
mark_as_advanced( ELASTIX_IMAGE_DIMENSIONS )
if( NOT ELASTIX_IMAGE_DIMENSIONS )
  set( ELASTIX_IMAGE_DIMENSIONS 2 3 4 CACHE STRING "Specify image dimensions" )
endif()

mark_as_advanced( ELASTIX_IMAGE_2D_PIXELTYPES )
if( NOT ELASTIX_IMAGE_2D_PIXELTYPES )
  set( ELASTIX_IMAGE_2D_PIXELTYPES "float" CACHE STRING "Specify 2D pixel types" )
endif()

mark_as_advanced( ELASTIX_IMAGE_3D_PIXELTYPES )
if( NOT ELASTIX_IMAGE_3D_PIXELTYPES )
  set( ELASTIX_IMAGE_3D_PIXELTYPES "short" "float" CACHE STRING "Specify 3D pixel types" )
endif()

mark_as_advanced( ELASTIX_IMAGE_4D_PIXELTYPES )
if( NOT ELASTIX_IMAGE_4D_PIXELTYPES )
  set( ELASTIX_IMAGE_4D_PIXELTYPES "short" CACHE STRING "Specify 4D pixel types" )
endif()

mark_as_advanced( USE_ALL_PIXELTYPES )
if( NOT USE_ALL_PIXELTYPES )
 option( USE_ALL_PIXELTYPES "Build all pixel types" OFF )
endif()

# Define supported dimensions and types for sanity checks.
# Gives protection against typo's.
set( supportedDimensions 2 3 4 )
set( supportedTypes "char" "unsigned char"
  "short" "unsigned short" "int" "unsigned int"
  "long" "unsigned long" "float" "double" )

if( ${USE_ALL_PIXELTYPES} )
  set( ELASTIX_IMAGE_2D_PIXELTYPES ${supportedTypes} )
  set( ELASTIX_IMAGE_3D_PIXELTYPES ${supportedTypes} )
  set( ELASTIX_IMAGE_4D_PIXELTYPES ${supportedTypes} )
endif()

# Sanity check if > 0 number of dimensions are requested
list( LENGTH ELASTIX_IMAGE_DIMENSIONS numDims )
if( ${numDims} EQUAL 0 )
  message( FATAL_ERROR "ERROR: you should set one or more values "
    " to ELASTIX_IMAGE_DIMENSIONS!\n"
{'fraction_non_alphanumeric': 0.07713884992987377, 'fraction_numerical': 0.012903225806451613, 'mean_word_length': 6.061386138613861, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '3080348', 'n_tokens_mistral': 1379, 'n_tokens_neox': 1355, 'n_words': 362}