Skip to content

Commit af75181

Browse files
NIFTI Upstreamthewtex
authored andcommitted
nifti 2021-10-26 (53f295cf)
Code extracted from: https://github.com/NIFTI-Imaging/nifti_clib.git at commit 53f295cf78963058347757bbbae9584a6a8feede (master).
1 parent 9c2c9fa commit af75181

11 files changed

+50
-48
lines changed

CMakeLists.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ option( BUILD_SHARED_LIBS "Toggle building shared libraries." OFF)
5353
option(NIFTI_BUILD_APPLICATIONS "Build various utility tools" ON)
5454
mark_as_advanced(NIFTI_BUILD_APPLICATIONS)
5555

56-
#When including nifti as a subpackage, a prefix is often needed to avoid conflicts with sytem installed libraries.
56+
#When including nifti as a subpackage, a prefix is often needed to avoid conflicts with system installed libraries.
5757
set_if_not_defined(NIFTI_PACKAGE_PREFIX "")
5858
set(PACKAGE_NAME ${NIFTI_PACKAGE_PREFIX}NIFTI)
5959
set_if_not_defined(NIFTI_INSTALL_EXPORT_NAME ${PACKAGE_NAME}Targets)
6060

6161
# Set default shared library version
6262
# This library version will be applied to all libraries in the package
63-
# unless it is not explicitely for a certain lib.
63+
# unless it is not explicitly for a certain lib.
6464
set(NIFTI_SHAREDLIB_VERSION ${GIT_REPO_VERSION} )
6565
if(BUILD_SHARED_LIBS AND NOT NIFTI_LIBRARY_PROPERTIES)
6666
set(NIFTI_LIBRARY_PROPERTIES ${DEFAULT_SHARED_LIBS}
@@ -150,7 +150,9 @@ endif()
150150

151151
#######################################################################
152152
# Find unix math libraries
153-
if(NOT WIN32)
153+
if(EMSCRIPTEN OR WASI)
154+
set(NIFTI_SYSTEM_MATH_LIB m)
155+
elseif(NOT WIN32)
154156
find_library(NIFTI_SYSTEM_MATH_LIB m)
155157
else()
156158
set(NIFTI_SYSTEM_MATH_LIB "")
@@ -179,7 +181,7 @@ endif()
179181

180182
option(USE_FSL_CODE "If OFF, The copyright of this code is questionable for inclusion with nifti." OFF)
181183
mark_as_advanced(USE_FSL_CODE)
182-
# the order of add_subdirectory is important! fsliolob has to preceed examples
184+
# the order of add_subdirectory is important! fsliolob has to precede, examples
183185
# as otherwise FSLIOLIB_SOURCE_DIR is undefined and hence the examples
184186
# will fail to compile
185187
if(USE_FSL_CODE)
@@ -202,7 +204,7 @@ endif()
202204

203205
# Report installed targets
204206
get_property(nifti_installed_targets GLOBAL PROPERTY nifti_installed_targets)
205-
message("nifti_installed_targets: ${nifti_installed_targets}")
207+
message(STATUS "nifti_installed_targets: ${nifti_installed_targets}")
206208

207209
if(CMAKE_VER_AT_LEAST_3_13)
208210
# Target installation for CMake versions >=3.13

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ hope it is also a useful i/o library.
1616
`Nifti_clib` code is released into the public domain,
1717
developers are encouraged to incorporate niftilib code into their applications,
1818
and, to contribute changes and enhancements to niftilib. Please contact us if
19-
you would like to contribute additonal functionality to the i/o library.
19+
you would like to contribute additional functionality to the i/o library.
2020

2121
The main webpage for this project is [hosted on github](https://nifti-imaging.github.io/).
22-
This web site provde historical information. Additional informaiton from the [NIFTI DFWG](http://nifti.nimh.nih.gov)
22+
This web site provde historical information. Additional information from the [NIFTI DFWG](http://nifti.nimh.nih.gov)
2323

2424
The testing dashboard for monitoring the health of the libraries is at
2525
[my.cdash.org](https://my.cdash.org/index.php?project=nifti_clib).

cmake/local_dashboard.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,6 @@ set(dashboard_cache "
9797
# Eventually USE_NIFTI1_CODE:BOOL=ON must be added.
9898

9999
string(TIMESTAMP build_date "%Y-%m-%d")
100-
message("CDash Build Identifier: ${build_date} ${CTEST_BUILD_NAME}")
101-
message("CTEST_SITE = ${CTEST_SITE}")
100+
message(STATUS "CDash Build Identifier: ${build_date} ${CTEST_BUILD_NAME}")
101+
message(STATUS "CTEST_SITE = ${CTEST_SITE}")
102102
include("${CTEST_SCRIPT_DIRECTORY}/nifti_common.cmake")

cmake/nifti_common.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ if(EXISTS ${CTEST_SOURCE_DIRECTORY})
218218
set(vcs_refresh "because it is not managed by git.")
219219
endif()
220220
if(vcs_refresh AND "${CTEST_SOURCE_DIRECTORY}" MATCHES "/(NIFTI|nifti_clib)[^/]*")
221-
message("Deleting source tree\n ${CTEST_SOURCE_DIRECTORY}\n${vcs_refresh}")
221+
message(STATUS "Deleting source tree\n ${CTEST_SOURCE_DIRECTORY}\n${vcs_refresh}")
222222
file(REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}")
223223
endif()
224224
endif()
@@ -314,7 +314,7 @@ foreach(v
314314
)
315315
set(vars "${vars} ${v}=[${${v}}]\n")
316316
endforeach(v)
317-
message("Dashboard script configuration:\n${vars}\n")
317+
message(STATUS "Dashboard script configuration:\n${vars}\n")
318318

319319
# Avoid non-ascii characters in tool output.
320320
set(ENV{LC_ALL} C)
@@ -347,7 +347,7 @@ if(NOT EXISTS "${CTEST_BINARY_DIRECTORY}")
347347
file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
348348
elseif(NOT "${CTEST_SOURCE_DIRECTORY}" STREQUAL "${CTEST_BINARY_DIRECTORY}"
349349
AND NOT dashboard_no_clean)
350-
message("Clearing build tree...")
350+
message(STATUS "Clearing build tree...")
351351
ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
352352
endif()
353353

@@ -425,7 +425,7 @@ while(NOT dashboard_done)
425425
dashboard_hook_test()
426426
endif()
427427
ctest_test(${CTEST_TEST_ARGS} RETURN_VALUE test_return)
428-
set(safe_message_skip 1) # Block furhter messages
428+
set(safe_message_skip 1) # Block further messages
429429

430430
if(dashboard_do_coverage)
431431
if(COMMAND dashboard_hook_coverage)

cmake/nifti_macros.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ function(get_lib_version_vars version_header libver libver_major)
156156
# Check that a valid version has been specified (of the form XX.XX.XX)
157157
string(REGEX MATCH "^[0-9]*\.[0-9]*\.[0-9]*$" VER_MATCHED "${LIB_VERSION}" )
158158
if("" STREQUAL "${VER_MATCHED}")
159-
message("matched ${VER_MATCHED}")
159+
message(STATUS "matched ${VER_MATCHED}")
160160
message(FATAL_ERROR "Cannot find a valid version in the version header file ${version_header} (Found: '${LIB_VERSION}')")
161161
endif()
162162
# Set outputs in calling scope

cmake/travis_dashboard.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,6 @@ set(dashboard_cache "
100100
# Eventually USE_NIFTI1_CODE:BOOL=ON must be added.
101101

102102
string(TIMESTAMP build_date "%Y-%m-%d")
103-
message("CDash Build Identifier: ${build_date} ${CTEST_BUILD_NAME}")
104-
message("CTEST_SITE = ${CTEST_SITE}")
103+
message(STATUS "CDash Build Identifier: ${build_date} ${CTEST_BUILD_NAME}")
104+
message(STATUS "CTEST_SITE = ${CTEST_SITE}")
105105
include("${CTEST_SCRIPT_DIRECTORY}/nifti_common.cmake")

niftilib/nifti1.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,7 @@ typedef struct { unsigned char r,g,b; } rgb_byte ;
873873
as a displacement field or vector:
874874
- dataset must have a 5th dimension
875875
- intent_code must be NIFTI_INTENT_DISPVECT
876-
- dim[5] must be the dimensionality of the displacment
876+
- dim[5] must be the dimensionality of the displacement
877877
vector (e.g., 3 for spatial displacement, 2 for in-plane) */
878878

879879
#define NIFTI_INTENT_DISPVECT 1006 /* specifically for displacements */

niftilib/nifti1_io.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ static char const * const gni_history[] =
4242
" (FMRIB Centre, University of Oxford, UK)\n"
4343
" - Mainly adding low-level IO and changing things to allow gzipped\n"
4444
" files to be read and written\n"
45-
" - Full backwards compatability should have been maintained\n"
45+
" - Full backwards compatibility should have been maintained\n"
4646
"\n",
4747
"0.2 16 Nov 2004 [rickr]\n"
4848
" (Rick Reynolds of the National Institutes of Health, SSCC/DIRP/NIMH)\n"
@@ -265,7 +265,7 @@ static char const * const gni_history[] =
265265
"1.12b 25 August 2005 [rickr] - changes by Hans Johnson\n",
266266
"1.13 25 August 2005 [rickr]\n",
267267
" - finished changes by Hans for Insight\n"
268-
" - added const in all appropraite parameter locations (30-40)\n"
268+
" - added const in all appropriate parameter locations (30-40)\n"
269269
" (any pointer referencing data that will not change)\n"
270270
" - shortened all string constants below 509 character limit\n"
271271
"1.14 28 October 2005 [HJohnson]\n",
@@ -771,7 +771,7 @@ int nifti_image_load_bricks( nifti_image * nim , int nbricks,
771771

772772
if( rv != 0 ){
773773
nifti_free_NBL( NBL ); /* failure! */
774-
NBL->nbricks = 0; /* repetative, but clear */
774+
NBL->nbricks = 0; /* repetitive, but clear */
775775
}
776776

777777
if( slist ){ free(slist); free(sindex); }
@@ -1048,7 +1048,7 @@ int valid_nifti_brick_list(nifti_image * nim , int nbricks,
10481048

10491049
if( nim->dim[0] < 3 ){
10501050
if( disp_error || g_opts.debug > 1 )
1051-
fprintf(stderr,"** cannot read explict brick list from %d-D dataset\n",
1051+
fprintf(stderr,"** cannot read explicit brick list from %d-D dataset\n",
10521052
nim->dim[0]);
10531053
return 0;
10541054
}
@@ -1945,7 +1945,7 @@ mat33 nifti_mat33_polar( mat33 A )
19451945
}
19461946

19471947
/*---------------------------------------------------------------------------*/
1948-
/*! compute the (closest) orientation from a 4x4 ijk->xyz tranformation matrix
1948+
/*! compute the (closest) orientation from a 4x4 ijk->xyz transformation matrix
19491949
19501950
<pre>
19511951
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 )
21362136
/*! swap each byte pair from the given list of n pairs
21372137
*
21382138
* Due to alignment of structures at some architectures (e.g. on ARM),
2139-
* stick to char varaibles.
2139+
* stick to char variables.
21402140
* Fixes http://bugs.debian.org/446893 Yaroslav <debian@onerussian.com>
21412141
*
21422142
*//*--------------------------------------------------------------------*/
@@ -2781,7 +2781,7 @@ char * nifti_findhdrname(const char* fname)
27812781

27822782
/* note: efirst is 0 in the case of ".img" */
27832783

2784-
/* if the user passed an uppercase entension (.IMG), search for uppercase */
2784+
/* if the user passed an uppercase extension (.IMG), search for uppercase */
27852785
if( eisupper ) {
27862786
make_uppercase(elist[0]);
27872787
make_uppercase(elist[1]);
@@ -3107,11 +3107,11 @@ int nifti_set_filenames( nifti_image * nim, const char * prefix, int check,
31073107
- if type 1, expect .nii (and names must match)
31083108
31093109
\param nim given nifti_image
3110-
\param show_warn if set, print a warning message for any mis-match
3110+
\param show_warn if set, print a warning message for any mismatch
31113111
31123112
\return
31133113
- 1 if the values seem to match
3114-
- 0 if there is a mis-match
3114+
- 0 if there is a mismatch
31153115
- -1 if there is not sufficient information to create file(s)
31163116
31173117
\sa NIFTI_FTYPE_* codes in nifti1_io.h
@@ -3163,7 +3163,7 @@ int nifti_type_and_names_match( nifti_image * nim, int show_warn )
31633163
errs++;
31643164
}
31653165

3166-
if( errs ) return 0; /* do not proceed, but this is just a mis-match */
3166+
if( errs ) return 0; /* do not proceed, but this is just a mismatch */
31673167

31683168
/* general tests */
31693169
if( nim->nifti_type == NIFTI_FTYPE_NIFTI1_1 ){ /* .nii */
@@ -3676,7 +3676,7 @@ nifti_image* nifti_convert_nhdr2nim(struct nifti_1_header nhdr,
36763676
if( nhdr.dim[ii] <= 0 ) nhdr.dim[ii] = 1 ;
36773677

36783678
/* fix any remaining bad dim[] values, so garbage does not propagate */
3679-
/* (only values 0 or 1 seem rational, otherwise set to arbirary 1) */
3679+
/* (only values 0 or 1 seem rational, otherwise set to arbitrary 1) */
36803680
for( ii=nhdr.dim[0]+1 ; ii <= 7 ; ii++ )
36813681
if( nhdr.dim[ii] != 1 && nhdr.dim[ii] != 0) nhdr.dim[ii] = 1 ;
36823682

@@ -5374,7 +5374,7 @@ nifti_1_header * nifti_make_new_header(const int arg_dims[], int arg_dtype)
53745374
/*! basic creation of a nifti_image struct
53755375
53765376
Create a nifti_image from the given dimensions and data type.
5377-
Optinally, allocate zero-filled data.
5377+
Optionally, allocate zero-filled data.
53785378
53795379
\param dims : optional dim[8] (default {3,1,1,1,0,0,0,0})
53805380
\param datatype : optional datatype (default DT_FLOAT32)
@@ -5578,7 +5578,7 @@ int nifti_copy_extensions(nifti_image * nim_dest, const nifti_image * nim_src)
55785578
/* data length is size-8, as esize includes space for esize and ecode */
55795579
data = (char *)calloc(size-8,sizeof(char)); /* maybe size > old */
55805580
if( !data ){
5581-
fprintf(stderr,"** failed to alloc %d bytes for extention\n", size);
5581+
fprintf(stderr,"** failed to alloc %d bytes for extension\n", size);
55825582
if( c == 0 ) { free(nim_dest->ext_list); nim_dest->ext_list = NULL; }
55835583
/* otherwise, keep what we have (a.o.t. deleting them all) */
55845584
return -1;
@@ -6852,7 +6852,7 @@ compute_strides(int *strides,const int *size,int nbyper)
68526852
/*---------------------------------------------------------------------------*/
68536853
/*! read an arbitrary subregion from a nifti image
68546854
6855-
This function may be used to read a single arbitary subregion of any
6855+
This function may be used to read a single arbitrary subregion of any
68566856
rectangular size from a nifti dataset, such as a small 5x5x5 subregion
68576857
around the center of a 3D image.
68586858

niftilib/nifti1_io.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ extern "C" {
4545
4646
Mainly adding low-level IO and changing things to allow gzipped files
4747
to be read and written
48-
Full backwards compatability should have been maintained
48+
Full backwards compatibility should have been maintained
4949
5050
Modified by: Rick Reynolds (SSCC/DIRP/NIMH, National Institutes of Health)
5151
Date: December 2004
@@ -515,7 +515,7 @@ typedef struct {
515515
char const * const name; /* text string to match #define */
516516
} nifti_type_ele;
517517

518-
#undef LNI_FERR /* local nifti file error, to be compact and repetative */
518+
#undef LNI_FERR /* local nifti file error, to be compact and repetitive */
519519
#define LNI_FERR(func,msg,file) \
520520
fprintf(stderr,"** ERROR (%s): %s '%s'\n",func,msg,file)
521521

niftilib/nifti1_tool.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ static const char * g_history[] =
7777
"\n",
7878
"1.1 14 January 2005 [rickr]\n"
7979
" - changed all non-error/non-debug output from stderr to stdout\n"
80-
" note: creates a mis-match between normal output and debug messages\n"
80+
" note: creates a mismatch between normal output and debug messages\n"
8181
" - modified act_diff_hdrs and act_diff_nims to do the processing in\n"
8282
" lower-level functions\n",
8383
" - added functions diff_hdrs, diff_hdrs_list, diff_nims, diff_nims_list\n"
@@ -229,7 +229,7 @@ int main( int argc, char * argv[] )
229229
if((opts.swap_hdr || opts.swap_ana || opts.swap_old )
230230
&& ((rv = act_swap_hdrs (&opts)) != 0) ) FREE_RETURN(rv);
231231

232-
/* if a diff, return wither a difference exists (like the UNIX command) */
232+
/* if a diff, return whether, a difference exists (like the UNIX command) */
233233
if( opts.diff_hdr && ((rv = act_diff_hdrs(&opts)) != 0) ) FREE_RETURN(rv);
234234
if( opts.diff_nim && ((rv = act_diff_nims(&opts)) != 0) ) FREE_RETURN(rv);
235235

@@ -341,7 +341,7 @@ int process_opts( int argc, char * argv[], nt_opts * opts )
341341
for( index = 1; index < 8; index++ )
342342
{
343343
ac++;
344-
CHECK_NEXT_OPT_MSG(ac,argc,"-cci","7 dimension values are requred");
344+
CHECK_NEXT_OPT_MSG(ac,argc,"-cci","7 dimension values are required");
345345
if( ! isdigit(argv[ac][0]) && strcmp(argv[ac],"-1") ){
346346
fprintf(stderr,"** -cci param %d (= '%s') is not a valid\n"
347347
" consider: 'nifti_tool -help'\n",index,argv[ac]);
@@ -385,7 +385,7 @@ int process_opts( int argc, char * argv[], nt_opts * opts )
385385
{
386386
ac++;
387387
CHECK_NEXT_OPT_MSG(ac,argc,"-disp_ci",
388-
"7 dimension values are requred");
388+
"7 dimension values are required");
389389
if( ! isdigit(argv[ac][0]) && strcmp(argv[ac],"-1") ){
390390
fprintf(stderr,"** -disp_ci param %d (= '%s') is not a valid\n"
391391
" consider: 'nifti_tool -help'\n",index,argv[ac]);
@@ -404,7 +404,7 @@ int process_opts( int argc, char * argv[], nt_opts * opts )
404404
for( index = 1; index <= 3; index++ )
405405
{
406406
ac++;
407-
CHECK_NEXT_OPT_MSG(ac,argc,"-dts","i,j,k indices are requied\n");
407+
CHECK_NEXT_OPT_MSG(ac,argc,"-dts","i,j,k indices are required\n");
408408
if( ! isdigit(argv[ac][0]) ){
409409
fprintf(stderr,"** -dts param %d (= '%s') is not a number\n"
410410
" consider: 'nifti_tool -help'\n",index,argv[ac]);
@@ -460,7 +460,7 @@ int process_opts( int argc, char * argv[], nt_opts * opts )
460460
for( index = 0; index < 8; index++ )
461461
{
462462
ac++;
463-
CHECK_NEXT_OPT_MSG(ac,argc,"-new_dim","8 dim values are requred");
463+
CHECK_NEXT_OPT_MSG(ac,argc,"-new_dim","8 dim values are required");
464464
if( ! isdigit(argv[ac][0]) && strcmp(argv[ac],"-1") ){
465465
fprintf(stderr,"** -new_dim param %d (= '%s') is not a valid\n"
466466
" consider: 'nifti_tool -help'\n",index,argv[ac]);
@@ -1061,7 +1061,7 @@ int use_full(const char * prog )
10611061
" nifti_tool -check_hdr -infiles dset0.nii dset1.nii\n"
10621062
" nifti_tool -check_hdr -infiles *.nii *.hdr\n"
10631063
" \n"
1064-
" e.g. add the -quiet option, so that only errros are reported\n"
1064+
" e.g. add the -quiet option, so that only errors are reported\n"
10651065
" nifti_tool -check_hdr -quiet -infiles *.nii *.hdr\n"
10661066
"\n");
10671067
printf(
@@ -2581,7 +2581,7 @@ int act_mod_hdrs( nt_opts * opts )
25812581
}
25822582
if( opts->keep_hist && nifti_add_extension(nim, opts->command,
25832583
strlen(opts->command), NIFTI_ECODE_COMMENT) )
2584-
fprintf(stderr,"** failed to add command to image as exten\n");
2584+
fprintf(stderr,"** failed to add command to image as extension\n");
25852585
if( nifti_set_filenames(nim, opts->prefix, 1, 1) )
25862586
{
25872587
NTL_FERR(func,"failed to set prefix for new file: ",opts->prefix);
@@ -2696,7 +2696,7 @@ int act_swap_hdrs( nt_opts * opts )
26962696
}
26972697
if( opts->keep_hist && nifti_add_extension(nim, opts->command,
26982698
strlen(opts->command), NIFTI_ECODE_COMMENT) )
2699-
fprintf(stderr,"** failed to add command to image as exten\n");
2699+
fprintf(stderr,"** failed to add command to image as extension\n");
27002700
if( nifti_set_filenames(nim, opts->prefix, 1, 1) )
27012701
{
27022702
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 )
40674067
return nifti_image_read(fname, doread);
40684068
}
40694069

4070-
/* so generate an emtpy image */
4070+
/* so generate an empty image */
40714071
if(g_debug > 1) {
40724072
fprintf(stderr,"+d NT_IR: generating EMPTY IMAGE from %s...\n",fname);
40734073
if(g_debug > 2) {
@@ -4106,7 +4106,7 @@ nifti_1_header * nt_read_header(nt_opts * opts, const char * fname, int * swappe
41064106
return nifti_read_header(fname, swapped, check);
41074107
}
41084108

4109-
/* so generate an emtpy image */
4109+
/* so generate an empty image */
41104110
if(g_debug > 1) {
41114111
fprintf(stderr,"+d NT_RH: generating EMPTY IMAGE from %s...\n",fname);
41124112
if(g_debug > 2) {
@@ -4149,7 +4149,7 @@ nifti_image * nt_read_bricks(nt_opts * opts, const char * fname, int len, int *
41494149
return nifti_image_read_bricks(fname, len, list, NBL);
41504150
}
41514151

4152-
/* so generate an emtpy image */
4152+
/* so generate an empty image */
41534153
if(g_debug > 1) {
41544154
fprintf(stderr,"+d NT_RB: generating EMPTY IMAGE from %s...\n",fname);
41554155
if(g_debug > 2) {

niftilib/nifti_tester001.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ nifti_image * generate_reference_image( const char * write_image_filename , int
4040
reference_header.dim[3]=11;
4141
reference_header.dim[4]=7;
4242
reference_header.dim[5]=3;
43-
reference_header.dim[6]=1; //This MUST be 1 anything else is invalid due to code that usees huristics to fix other possible problems;
44-
reference_header.dim[7]=1; //This MUST be 1 anything else is invalid due to code that usees huristics to fix other possible problems;
43+
reference_header.dim[6]=1; //This MUST be 1 anything else is invalid due to code that uses heuristics to fix other possible problems;
44+
reference_header.dim[7]=1; //This MUST be 1 anything else is invalid due to code that uses heuristics to fix other possible problems;
4545
reference_header.intent_p1=10101010.101F;
4646
reference_header.intent_p2=987654321.0F;
4747
reference_header.intent_p3=-1234.0F;
@@ -84,7 +84,7 @@ nifti_image * generate_reference_image( const char * write_image_filename , int
8484
reference_header.magic[3]='\0';
8585
/* String is purposfully too long */
8686
strncpy(reference_header.intent_name,"PHANTOM_DATA to be used for regression testing the nifti reader/writer",16);
87-
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);
87+
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);
8888

8989
{
9090
int nbyper;

0 commit comments

Comments
 (0)