<commit_before>## Intro ##
This is a simple library to allow the Amira 3D visualisation software (http://www.vsg3d.com/amira/overview) to read data in the NRRD (Nearly Raw Raster Data) format (http://teem.sourceforge.net/nrrd/format.html).

For installation instructions, see below.

## Limitations ##
  * VERY LIMITED TESTING SO FAR!
  * Currently only reads 3D (scalar) and 4D (vector) fields
  * Only writes 3D data

## History ##
  * v0.2 - Mac OS X 10.9 (clang) compatible release
  * v0.1 - first release

## Installation ##
For installation on non-Mac-OS-X-10.9 systems (i.e. using gcc rather than clang), see INSTALL file.

### Installing built files ###
Copy the library files (``.dylib``) and the resource files (``.rc``) into:

  /Applications/Amira-5.6/lib/arch-MacX-Optimize
  /Applications/Amira-5.6/share/resources

respectively.

### Building from source ###
Although everything should work on Linux or Windows, my only experience is with Mac.

#### Mac Setup ####
  * AmiraDev (Tested with 6.4)
  * Apple's Xcode 9.2 (http://developer.apple.com/xcode/)
  * teem >= 1.11.0 (homebrew)

#### Build teem ####
1. `brew install teem`

#### Build hxNrrdIO ####
1. Make an Amira local directory using the Development Wizard.
2. Use git to clone the ``hxNrrdIO`` repository into the ``src`` subdirectory (or extract a tar ball).
3. Make the build files using the Development Wizard in Amira.
4. Edit the ``src/hxNrrdIO/GNUmakefile`` produced such that:
  ```
  HX_SDKROOT = $(HX_XCODE_DEVELOPER_ROOT)/SDKs/MacOSX10.7.sdk
  ```
  points to a current SDK, giving a line such as:
  ```
  HX_SDKROOT = $(HX_XCODE_DEVELOPER_ROOT)/SDKs/MacOSX.sdk
  ```

5. Edit the file further to disable openmp when compiling using clang:
  Change:

  ```
  HX_OPENMP_FLAG = $(shell $(CXX) --help -v 2>&1 | grep -q fopenmp && echo "-fopenmp")
  ```

  to

  ```
  HX_OPENMP_FLAG = ""
  ```

6. Edit the file one more time to ensure that lib teem is found in /usr/local/lib
  
  Add somewhere after the last place in which LDFLAGS is set (i.e. a line beginning `LDFLAGS +=`)

  ```
  LDFLAGS += -L/usr/local/lib
  ```

7. Go back to your top-level directory and build with:

  ```
  make MAKE_CFG=Optimize
  ```<commit_msg>Update build instructions for 6.7<commit_after>## Intro ##
This is a simple library to allow the Amira 3D visualisation software (http://www.vsg3d.com/amira/overview) to read data in the NRRD (Nearly Raw Raster Data) format (http://teem.sourceforge.net/nrrd/format.html).

For installation instructions, see below.

## Limitations ##
  * VERY LIMITED TESTING SO FAR!
  * Currently only reads 3D (scalar) and 4D (vector) fields
  * Only writes 3D data

## History ##
  * v0.2 - Mac OS X 10.9 (clang) compatible release
  * v0.1 - first release

## Installation ##
For installation on non-Mac-OS-X-10.9 systems (i.e. using gcc rather than clang), see INSTALL file.

### Installing built files ###
Copy the library files (``.dylib``) and the resource files (``.rc``) into:

  /Applications/Amira-XXX/lib/arch-MacX-Optimize
  /Applications/Amira-XXX/share/resources

respectively.

### Building from source ###
Although everything should work on Linux or Windows, my only experience is with Mac.

#### Mac Setup ####
  * MacOSX 10.12
  * AmiraDev (Tested with 6.7)
  * Apple's Xcode 9.2 (http://developer.apple.com/xcode/)
  * teem >= 1.11.0 (homebrew)

#### Build teem ####
1. `brew install teem`

#### Build hxNrrdIO ####
1. Make an Amira local directory using the Development Wizard.
2. Use git to clone the ``hxNrrdIO`` repository into the ``src`` subdirectory (or extract a tar ball).
3. Edit ``/Applications/Amira-6.7.0/share/devtools/helpers.tcl`` to change line
   ```
   defOption "macsdk" {10.11 10.12} \
   # to 
   defOption "macsdk" {10.11 10.12 10.13 10.14} \
   ```
4. Make the build files using the Development Wizard in Amira.
5. (Prob not required) Edit the file further to disable openmp when compiling using clang:
  Change:

  ```
  HX_OPENMP_FLAG = $(shell $(CXX) --help -v 2>&1 | grep -q fopenmp && echo "-fopenmp")
  ```

  to

  ```
  HX_OPENMP_FLAG = ""
  ```

6. Edit the file one more time to ensure that lib teem is found in /usr/local/lib
  
  Add somewhere after the last place in which LDFLAGS is set (i.e. a line beginning `LDFLAGS +=`)

  ```
  LDFLAGS += -L/usr/local/lib
  LDFLAGS += -Wl,-F$(HX_XCODE_DEVELOPER_ROOT)/../../../../SharedFrameworks
  ```

7. Go back to your top-level directory and build with:

  ```
  make MAKE_CFG=Optimize
  ```
{'fraction_non_alphanumeric': 0.13416536661466458, 'fraction_numerical': 0.02362380209494094, 'mean_word_length': 3.4216748768472907, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2902840', 'n_tokens_mistral': 1624, 'n_tokens_neox': 1518, 'n_words': 535}