From af75181f29fba0cb54bf9b10b7d05537a960c3fe Mon Sep 17 00:00:00 2001 From: NIFTI Upstream Date: Tue, 26 Oct 2021 17:36:24 -0500 Subject: [PATCH] nifti 2021-10-26 (53f295cf) Code extracted from: https://github.com/NIFTI-Imaging/nifti_clib.git at commit 53f295cf78963058347757bbbae9584a6a8feede (master). --- CMakeLists.txt | 12 +++++++----- README.md | 4 ++-- cmake/local_dashboard.cmake | 4 ++-- cmake/nifti_common.cmake | 8 ++++---- cmake/nifti_macros.cmake | 2 +- cmake/travis_dashboard.cmake | 4 ++-- niftilib/nifti1.h | 2 +- niftilib/nifti1_io.c | 28 ++++++++++++++-------------- niftilib/nifti1_io.h | 4 ++-- niftilib/nifti1_tool.c | 24 ++++++++++++------------ niftilib/nifti_tester001.c | 6 +++--- 11 files changed, 50 insertions(+), 48 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ba265d400aa..713b8733bdf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,14 +53,14 @@ option( BUILD_SHARED_LIBS "Toggle building shared libraries." OFF) option(NIFTI_BUILD_APPLICATIONS "Build various utility tools" ON) mark_as_advanced(NIFTI_BUILD_APPLICATIONS) -#When including nifti as a subpackage, a prefix is often needed to avoid conflicts with sytem installed libraries. +#When including nifti as a subpackage, a prefix is often needed to avoid conflicts with system installed libraries. set_if_not_defined(NIFTI_PACKAGE_PREFIX "") set(PACKAGE_NAME ${NIFTI_PACKAGE_PREFIX}NIFTI) set_if_not_defined(NIFTI_INSTALL_EXPORT_NAME ${PACKAGE_NAME}Targets) # Set default shared library version # This library version will be applied to all libraries in the package -# unless it is not explicitely for a certain lib. +# unless it is not explicitly for a certain lib. set(NIFTI_SHAREDLIB_VERSION ${GIT_REPO_VERSION} ) if(BUILD_SHARED_LIBS AND NOT NIFTI_LIBRARY_PROPERTIES) set(NIFTI_LIBRARY_PROPERTIES ${DEFAULT_SHARED_LIBS} @@ -150,7 +150,9 @@ endif() ####################################################################### # Find unix math libraries -if(NOT WIN32) +if(EMSCRIPTEN OR WASI) + set(NIFTI_SYSTEM_MATH_LIB m) +elseif(NOT WIN32) find_library(NIFTI_SYSTEM_MATH_LIB m) else() set(NIFTI_SYSTEM_MATH_LIB "") @@ -179,7 +181,7 @@ endif() option(USE_FSL_CODE "If OFF, The copyright of this code is questionable for inclusion with nifti." OFF) mark_as_advanced(USE_FSL_CODE) -# the order of add_subdirectory is important! fsliolob has to preceed examples +# the order of add_subdirectory is important! fsliolob has to precede, examples # as otherwise FSLIOLIB_SOURCE_DIR is undefined and hence the examples # will fail to compile if(USE_FSL_CODE) @@ -202,7 +204,7 @@ endif() # Report installed targets get_property(nifti_installed_targets GLOBAL PROPERTY nifti_installed_targets) -message("nifti_installed_targets: ${nifti_installed_targets}") +message(STATUS "nifti_installed_targets: ${nifti_installed_targets}") if(CMAKE_VER_AT_LEAST_3_13) # Target installation for CMake versions >=3.13 diff --git a/README.md b/README.md index 88e79153c33..0796f3eeb69 100644 --- a/README.md +++ b/README.md @@ -16,10 +16,10 @@ hope it is also a useful i/o library. `Nifti_clib` code is released into the public domain, developers are encouraged to incorporate niftilib code into their applications, and, to contribute changes and enhancements to niftilib. Please contact us if -you would like to contribute additonal functionality to the i/o library. +you would like to contribute additional functionality to the i/o library. The main webpage for this project is [hosted on github](https://nifti-imaging.github.io/). -This web site provde historical information. Additional informaiton from the [NIFTI DFWG](http://nifti.nimh.nih.gov) +This web site provde historical information. Additional information from the [NIFTI DFWG](http://nifti.nimh.nih.gov) The testing dashboard for monitoring the health of the libraries is at [my.cdash.org](https://my.cdash.org/index.php?project=nifti_clib). diff --git a/cmake/local_dashboard.cmake b/cmake/local_dashboard.cmake index 3e457d73e8e..a69588c1336 100644 --- a/cmake/local_dashboard.cmake +++ b/cmake/local_dashboard.cmake @@ -97,6 +97,6 @@ set(dashboard_cache " # Eventually USE_NIFTI1_CODE:BOOL=ON must be added. string(TIMESTAMP build_date "%Y-%m-%d") -message("CDash Build Identifier: ${build_date} ${CTEST_BUILD_NAME}") -message("CTEST_SITE = ${CTEST_SITE}") +message(STATUS "CDash Build Identifier: ${build_date} ${CTEST_BUILD_NAME}") +message(STATUS "CTEST_SITE = ${CTEST_SITE}") include("${CTEST_SCRIPT_DIRECTORY}/nifti_common.cmake") diff --git a/cmake/nifti_common.cmake b/cmake/nifti_common.cmake index ef4c33b26a6..e766f738d51 100644 --- a/cmake/nifti_common.cmake +++ b/cmake/nifti_common.cmake @@ -218,7 +218,7 @@ if(EXISTS ${CTEST_SOURCE_DIRECTORY}) set(vcs_refresh "because it is not managed by git.") endif() if(vcs_refresh AND "${CTEST_SOURCE_DIRECTORY}" MATCHES "/(NIFTI|nifti_clib)[^/]*") - message("Deleting source tree\n ${CTEST_SOURCE_DIRECTORY}\n${vcs_refresh}") + message(STATUS "Deleting source tree\n ${CTEST_SOURCE_DIRECTORY}\n${vcs_refresh}") file(REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}") endif() endif() @@ -314,7 +314,7 @@ foreach(v ) set(vars "${vars} ${v}=[${${v}}]\n") endforeach(v) -message("Dashboard script configuration:\n${vars}\n") +message(STATUS "Dashboard script configuration:\n${vars}\n") # Avoid non-ascii characters in tool output. set(ENV{LC_ALL} C) @@ -347,7 +347,7 @@ if(NOT EXISTS "${CTEST_BINARY_DIRECTORY}") file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}") elseif(NOT "${CTEST_SOURCE_DIRECTORY}" STREQUAL "${CTEST_BINARY_DIRECTORY}" AND NOT dashboard_no_clean) - message("Clearing build tree...") + message(STATUS "Clearing build tree...") ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY}) endif() @@ -425,7 +425,7 @@ while(NOT dashboard_done) dashboard_hook_test() endif() ctest_test(${CTEST_TEST_ARGS} RETURN_VALUE test_return) - set(safe_message_skip 1) # Block furhter messages + set(safe_message_skip 1) # Block further messages if(dashboard_do_coverage) if(COMMAND dashboard_hook_coverage) diff --git a/cmake/nifti_macros.cmake b/cmake/nifti_macros.cmake index a09ae9689f0..6e32fe917af 100644 --- a/cmake/nifti_macros.cmake +++ b/cmake/nifti_macros.cmake @@ -156,7 +156,7 @@ function(get_lib_version_vars version_header libver libver_major) # Check that a valid version has been specified (of the form XX.XX.XX) string(REGEX MATCH "^[0-9]*\.[0-9]*\.[0-9]*$" VER_MATCHED "${LIB_VERSION}" ) if("" STREQUAL "${VER_MATCHED}") - message("matched ${VER_MATCHED}") + message(STATUS "matched ${VER_MATCHED}") message(FATAL_ERROR "Cannot find a valid version in the version header file ${version_header} (Found: '${LIB_VERSION}')") endif() # Set outputs in calling scope diff --git a/cmake/travis_dashboard.cmake b/cmake/travis_dashboard.cmake index 3a7c37a86a1..680e0031eb6 100644 --- a/cmake/travis_dashboard.cmake +++ b/cmake/travis_dashboard.cmake @@ -100,6 +100,6 @@ set(dashboard_cache " # Eventually USE_NIFTI1_CODE:BOOL=ON must be added. string(TIMESTAMP build_date "%Y-%m-%d") -message("CDash Build Identifier: ${build_date} ${CTEST_BUILD_NAME}") -message("CTEST_SITE = ${CTEST_SITE}") +message(STATUS "CDash Build Identifier: ${build_date} ${CTEST_BUILD_NAME}") +message(STATUS "CTEST_SITE = ${CTEST_SITE}") include("${CTEST_SCRIPT_DIRECTORY}/nifti_common.cmake") diff --git a/niftilib/nifti1.h b/niftilib/nifti1.h index 4121dc0ff93..dd6c9ac5e75 100644 --- a/niftilib/nifti1.h +++ b/niftilib/nifti1.h @@ -873,7 +873,7 @@ typedef struct { unsigned char r,g,b; } rgb_byte ; as a displacement field or vector: - dataset must have a 5th dimension - intent_code must be NIFTI_INTENT_DISPVECT - - dim[5] must be the dimensionality of the displacment + - dim[5] must be the dimensionality of the displacement vector (e.g., 3 for spatial displacement, 2 for in-plane) */ #define NIFTI_INTENT_DISPVECT 1006 /* specifically for displacements */ diff --git a/niftilib/nifti1_io.c b/niftilib/nifti1_io.c index 30fcce47049..f04908052bc 100644 --- a/niftilib/nifti1_io.c +++ b/niftilib/nifti1_io.c @@ -42,7 +42,7 @@ static char const * const gni_history[] = " (FMRIB Centre, University of Oxford, UK)\n" " - Mainly adding low-level IO and changing things to allow gzipped\n" " files to be read and written\n" - " - Full backwards compatability should have been maintained\n" + " - Full backwards compatibility should have been maintained\n" "\n", "0.2 16 Nov 2004 [rickr]\n" " (Rick Reynolds of the National Institutes of Health, SSCC/DIRP/NIMH)\n" @@ -265,7 +265,7 @@ static char const * const gni_history[] = "1.12b 25 August 2005 [rickr] - changes by Hans Johnson\n", "1.13 25 August 2005 [rickr]\n", " - finished changes by Hans for Insight\n" - " - added const in all appropraite parameter locations (30-40)\n" + " - added const in all appropriate parameter locations (30-40)\n" " (any pointer referencing data that will not change)\n" " - shortened all string constants below 509 character limit\n" "1.14 28 October 2005 [HJohnson]\n", @@ -771,7 +771,7 @@ int nifti_image_load_bricks( nifti_image * nim , int nbricks, if( rv != 0 ){ nifti_free_NBL( NBL ); /* failure! */ - NBL->nbricks = 0; /* repetative, but clear */ + NBL->nbricks = 0; /* repetitive, but clear */ } if( slist ){ free(slist); free(sindex); } @@ -1048,7 +1048,7 @@ int valid_nifti_brick_list(nifti_image * nim , int nbricks, if( nim->dim[0] < 3 ){ if( disp_error || g_opts.debug > 1 ) - fprintf(stderr,"** cannot read explict brick list from %d-D dataset\n", + fprintf(stderr,"** cannot read explicit brick list from %d-D dataset\n", nim->dim[0]); return 0; } @@ -1945,7 +1945,7 @@ mat33 nifti_mat33_polar( mat33 A ) } /*---------------------------------------------------------------------------*/ -/*! compute the (closest) orientation from a 4x4 ijk->xyz tranformation matrix +/*! compute the (closest) orientation from a 4x4 ijk->xyz transformation matrix
    Input:  4x4 matrix that transforms (i,j,k) indexes to (x,y,z) coordinates,
@@ -2136,7 +2136,7 @@ void nifti_mat44_to_orientation( mat44 R , int *icod, int *jcod, int *kcod )
 /*! swap each byte pair from the given list of n pairs
  *
  *  Due to alignment of structures at some architectures (e.g. on ARM),
- *  stick to char varaibles.
+ *  stick to char variables.
  *  Fixes http://bugs.debian.org/446893   Yaroslav 
  *
 *//*--------------------------------------------------------------------*/
@@ -2781,7 +2781,7 @@ char * nifti_findhdrname(const char* fname)
 
    /* note: efirst is 0 in the case of ".img" */
 
-   /* if the user passed an uppercase entension (.IMG), search for uppercase */
+   /* if the user passed an uppercase extension (.IMG), search for uppercase */
    if( eisupper ) {
       make_uppercase(elist[0]);
       make_uppercase(elist[1]);
@@ -3107,11 +3107,11 @@ int nifti_set_filenames( nifti_image * nim, const char * prefix, int check,
     - if type 1, expect .nii (and names must match)
 
     \param nim       given nifti_image
-    \param show_warn if set, print a warning message for any mis-match
+    \param show_warn if set, print a warning message for any mismatch
 
     \return
         -   1 if the values seem to match
-        -   0 if there is a mis-match
+        -   0 if there is a mismatch
         -  -1 if there is not sufficient information to create file(s)
 
     \sa NIFTI_FTYPE_* codes in nifti1_io.h
@@ -3163,7 +3163,7 @@ int nifti_type_and_names_match( nifti_image * nim, int show_warn )
       errs++;
    }
 
-   if( errs ) return 0;   /* do not proceed, but this is just a mis-match */
+   if( errs ) return 0;   /* do not proceed, but this is just a mismatch */
 
    /* general tests */
    if( nim->nifti_type == NIFTI_FTYPE_NIFTI1_1 ){  /* .nii */
@@ -3676,7 +3676,7 @@ nifti_image* nifti_convert_nhdr2nim(struct nifti_1_header nhdr,
      if( nhdr.dim[ii] <= 0 ) nhdr.dim[ii] = 1 ;
 
    /* fix any remaining bad dim[] values, so garbage does not propagate */
-   /* (only values 0 or 1 seem rational, otherwise set to arbirary 1)   */
+   /* (only values 0 or 1 seem rational, otherwise set to arbitrary 1)   */
    for( ii=nhdr.dim[0]+1 ; ii <= 7 ; ii++ )
      if( nhdr.dim[ii] != 1 && nhdr.dim[ii] != 0) nhdr.dim[ii] = 1 ;
 
@@ -5374,7 +5374,7 @@ nifti_1_header * nifti_make_new_header(const int arg_dims[], int arg_dtype)
 /*! basic creation of a nifti_image struct
 
    Create a nifti_image from the given dimensions and data type.
-   Optinally, allocate zero-filled data.
+   Optionally, allocate zero-filled data.
 
    \param dims      : optional dim[8]   (default {3,1,1,1,0,0,0,0})
    \param datatype  : optional datatype (default DT_FLOAT32)
@@ -5578,7 +5578,7 @@ int nifti_copy_extensions(nifti_image * nim_dest, const nifti_image * nim_src)
       /* data length is size-8, as esize includes space for esize and ecode */
       data = (char *)calloc(size-8,sizeof(char));      /* maybe size > old */
       if( !data ){
-         fprintf(stderr,"** failed to alloc %d bytes for extention\n", size);
+         fprintf(stderr,"** failed to alloc %d bytes for extension\n", size);
          if( c == 0 ) { free(nim_dest->ext_list); nim_dest->ext_list = NULL; }
          /* otherwise, keep what we have (a.o.t. deleting them all) */
          return -1;
@@ -6852,7 +6852,7 @@ compute_strides(int *strides,const int *size,int nbyper)
 /*---------------------------------------------------------------------------*/
 /*! read an arbitrary subregion from a nifti image
 
-    This function may be used to read a single arbitary subregion of any
+    This function may be used to read a single arbitrary subregion of any
     rectangular size from a nifti dataset, such as a small 5x5x5 subregion
     around the center of a 3D image.
 
diff --git a/niftilib/nifti1_io.h b/niftilib/nifti1_io.h
index 002cb47f3e9..c9619e8a6a2 100644
--- a/niftilib/nifti1_io.h
+++ b/niftilib/nifti1_io.h
@@ -45,7 +45,7 @@ extern "C" {
 
       Mainly adding low-level IO and changing things to allow gzipped files
       to be read and written
-      Full backwards compatability should have been maintained
+      Full backwards compatibility should have been maintained
 
    Modified by: Rick Reynolds (SSCC/DIRP/NIMH, National Institutes of Health)
    Date: December 2004
@@ -515,7 +515,7 @@ typedef struct {
     char const * const name;           /* text string to match #define */
 } nifti_type_ele;
 
-#undef  LNI_FERR /* local nifti file error, to be compact and repetative */
+#undef  LNI_FERR /* local nifti file error, to be compact and repetitive */
 #define LNI_FERR(func,msg,file)                                      \
             fprintf(stderr,"** ERROR (%s): %s '%s'\n",func,msg,file)
 
diff --git a/niftilib/nifti1_tool.c b/niftilib/nifti1_tool.c
index 8b0ac838a3a..8f8ffb505bc 100644
--- a/niftilib/nifti1_tool.c
+++ b/niftilib/nifti1_tool.c
@@ -77,7 +77,7 @@ static const char * g_history[] =
   "\n",
   "1.1  14 January 2005 [rickr]\n"
   "   - changed all non-error/non-debug output from stderr to stdout\n"
-  "       note: creates a mis-match between normal output and debug messages\n"
+  "       note: creates a mismatch between normal output and debug messages\n"
   "   - modified act_diff_hdrs and act_diff_nims to do the processing in\n"
   "       lower-level functions\n",
   "   - added functions diff_hdrs, diff_hdrs_list, diff_nims, diff_nims_list\n"
@@ -229,7 +229,7 @@ int main( int argc, char * argv[] )
    if((opts.swap_hdr  || opts.swap_ana || opts.swap_old )
                       && ((rv = act_swap_hdrs (&opts)) != 0) ) FREE_RETURN(rv);
 
-   /* if a diff, return wither a difference exists (like the UNIX command) */
+   /* if a diff, return whether, a difference exists (like the UNIX command) */
    if( opts.diff_hdr  && ((rv = act_diff_hdrs(&opts)) != 0) ) FREE_RETURN(rv);
    if( opts.diff_nim  && ((rv = act_diff_nims(&opts)) != 0) ) FREE_RETURN(rv);
 
@@ -341,7 +341,7 @@ int process_opts( int argc, char * argv[], nt_opts * opts )
          for( index = 1; index < 8; index++ )
          {
             ac++;
-            CHECK_NEXT_OPT_MSG(ac,argc,"-cci","7 dimension values are requred");
+            CHECK_NEXT_OPT_MSG(ac,argc,"-cci","7 dimension values are required");
             if( ! isdigit(argv[ac][0]) && strcmp(argv[ac],"-1") ){
                fprintf(stderr,"** -cci param %d (= '%s') is not a valid\n"
                        "   consider: 'nifti_tool -help'\n",index,argv[ac]);
@@ -385,7 +385,7 @@ int process_opts( int argc, char * argv[], nt_opts * opts )
          {
             ac++;
             CHECK_NEXT_OPT_MSG(ac,argc,"-disp_ci",
-                               "7 dimension values are requred");
+                               "7 dimension values are required");
             if( ! isdigit(argv[ac][0]) && strcmp(argv[ac],"-1") ){
                fprintf(stderr,"** -disp_ci param %d (= '%s') is not a valid\n"
                        "   consider: 'nifti_tool -help'\n",index,argv[ac]);
@@ -404,7 +404,7 @@ int process_opts( int argc, char * argv[], nt_opts * opts )
          for( index = 1; index <= 3; index++ )
          {
             ac++;
-            CHECK_NEXT_OPT_MSG(ac,argc,"-dts","i,j,k indices are requied\n");
+            CHECK_NEXT_OPT_MSG(ac,argc,"-dts","i,j,k indices are required\n");
             if( ! isdigit(argv[ac][0]) ){
                fprintf(stderr,"** -dts param %d (= '%s') is not a number\n"
                        "   consider: 'nifti_tool -help'\n",index,argv[ac]);
@@ -460,7 +460,7 @@ int process_opts( int argc, char * argv[], nt_opts * opts )
          for( index = 0; index < 8; index++ )
          {
             ac++;
-            CHECK_NEXT_OPT_MSG(ac,argc,"-new_dim","8 dim values are requred");
+            CHECK_NEXT_OPT_MSG(ac,argc,"-new_dim","8 dim values are required");
             if( ! isdigit(argv[ac][0]) && strcmp(argv[ac],"-1") ){
                fprintf(stderr,"** -new_dim param %d (= '%s') is not a valid\n"
                        "   consider: 'nifti_tool -help'\n",index,argv[ac]);
@@ -1061,7 +1061,7 @@ int use_full(const char * prog )
    "       nifti_tool -check_hdr -infiles dset0.nii dset1.nii\n"
    "       nifti_tool -check_hdr -infiles *.nii *.hdr\n"
    "       \n"
-   "       e.g. add the -quiet option, so that only errros are reported\n"
+   "       e.g. add the -quiet option, so that only errors are reported\n"
    "       nifti_tool -check_hdr -quiet -infiles *.nii *.hdr\n"
    "\n");
    printf(
@@ -2581,7 +2581,7 @@ int act_mod_hdrs( nt_opts * opts )
          }
          if( opts->keep_hist && nifti_add_extension(nim, opts->command,
                                 strlen(opts->command), NIFTI_ECODE_COMMENT) )
-               fprintf(stderr,"** failed to add command to image as exten\n");
+               fprintf(stderr,"** failed to add command to image as extension\n");
          if( nifti_set_filenames(nim, opts->prefix, 1, 1) )
          {
             NTL_FERR(func,"failed to set prefix for new file: ",opts->prefix);
@@ -2696,7 +2696,7 @@ int act_swap_hdrs( nt_opts * opts )
          }
          if( opts->keep_hist && nifti_add_extension(nim, opts->command,
                                 strlen(opts->command), NIFTI_ECODE_COMMENT) )
-               fprintf(stderr,"** failed to add command to image as exten\n");
+               fprintf(stderr,"** failed to add command to image as extension\n");
          if( nifti_set_filenames(nim, opts->prefix, 1, 1) )
          {
             NTL_FERR(func,"failed to set prefix for new file: ",opts->prefix);
@@ -4067,7 +4067,7 @@ nifti_image * nt_image_read( nt_opts * opts, const char * fname, int doread )
         return nifti_image_read(fname, doread);
     }
 
-    /* so generate an emtpy image */
+    /* so generate an empty image */
     if(g_debug > 1) {
         fprintf(stderr,"+d NT_IR: generating EMPTY IMAGE from %s...\n",fname);
         if(g_debug > 2) {
@@ -4106,7 +4106,7 @@ nifti_1_header * nt_read_header(nt_opts * opts, const char * fname, int * swappe
         return nifti_read_header(fname, swapped, check);
     }
 
-    /* so generate an emtpy image */
+    /* so generate an empty image */
     if(g_debug > 1) {
         fprintf(stderr,"+d NT_RH: generating EMPTY IMAGE from %s...\n",fname);
         if(g_debug > 2) {
@@ -4149,7 +4149,7 @@ nifti_image * nt_read_bricks(nt_opts * opts, const char * fname, int len, int *
         return nifti_image_read_bricks(fname, len, list, NBL);
     }
 
-    /* so generate an emtpy image */
+    /* so generate an empty image */
     if(g_debug > 1) {
         fprintf(stderr,"+d NT_RB: generating EMPTY IMAGE from %s...\n",fname);
         if(g_debug > 2) {
diff --git a/niftilib/nifti_tester001.c b/niftilib/nifti_tester001.c
index 8df4087ac7e..916eb9654f2 100644
--- a/niftilib/nifti_tester001.c
+++ b/niftilib/nifti_tester001.c
@@ -40,8 +40,8 @@ nifti_image * generate_reference_image( const char * write_image_filename , int
   reference_header.dim[3]=11;
   reference_header.dim[4]=7;
   reference_header.dim[5]=3;
-  reference_header.dim[6]=1; //This MUST be 1 anything else is invalid due to code that usees huristics to fix other possible problems;
-  reference_header.dim[7]=1; //This MUST be 1 anything else is invalid due to code that usees huristics to fix other possible problems;
+  reference_header.dim[6]=1; //This MUST be 1 anything else is invalid due to code that uses heuristics to fix other possible problems;
+  reference_header.dim[7]=1; //This MUST be 1 anything else is invalid due to code that uses heuristics to fix other possible problems;
   reference_header.intent_p1=10101010.101F;
   reference_header.intent_p2=987654321.0F;
   reference_header.intent_p3=-1234.0F;
@@ -84,7 +84,7 @@ nifti_image * generate_reference_image( const char * write_image_filename , int
   reference_header.magic[3]='\0';
   /* String is purposfully too long */
   strncpy(reference_header.intent_name,"PHANTOM_DATA to be used for regression testing the nifti reader/writer",16);
-  strncpy(reference_header.descrip,"This is a very long dialog here to use up more than 80 characters of space to test to see if the code is robust enough to deal appropriatly with very long and obnoxious lines.",80);
+  strncpy(reference_header.descrip,"This is a very long dialog here to use up more than 80 characters of space to test to see if the code is robust enough to deal appropriately with very long and obnoxious lines.",80);
 
   {
   int nbyper;