larmorx-nc
Copyright 2026 Karel Lopez Vilaret

larmorx-nc holds bit-exact replicas of FSL tools: Rust translations of FSL's source code. They
are derived works of FSL and are distributed under the FSL Licence (see LICENSE): solely for
non-commercial use, without financial return, with the licence's conditions imposed on every
receiver, and with all original and amended source code included. The amended source is the
Rust code of this directory (crates larmorx-nc-*); FSL's original source of the replicated
parts is in fsl-source/ (with MANIFEST.tsv). Both are in every copy of this directory and in
the larmorx-nc wheel. It comes with no warranty (LICENSE). Its source code is published at
https://github.com/karellopez/larmorx (directory crates-nc/). Each translated file names its
licence in an SPDX header and its origin in a comment; each crate's PROVENANCE.md lists the
upstream files it was translated from and the changes made.

The program is a separate work from larmorx (Apache-2.0), which runs it as a separate process
when it is installed. It does not present itself as FSL or as any other upstream tool, and it
is not endorsed by the University of Oxford. For commercial use of FSL, contact Oxford
University Innovation (fsl@innovation.ox.ac.uk, Reference Project 9564, FSL).


Translated works
================

FSL 6.0.7.23 (FMRIB Software Library), The University of Oxford - the FSL Licence (LICENSE)
  Translated: the mcflirt program (fsl-mcflirt 2111.0); bet, bet2 and betsurf (fsl-bet2
  2111.9); flirt, convert_xfm and FLIRT's other programs and scripts (fsl-flirt 2111.4); fast
  (fsl-fast4 2111.3); topup and applytopup (fsl-topup 2203.5); fslmaths, fslstats and fslroi
  (fsl-avwutils 2209.6); prelude (fsl-fugue 2603.0); and the parts of fsl-newimage 2601.0,
  fsl-miscmaths 2412.6, fsl-newnifti 5.0.0, fsl-znzlib 2511.3, fsl-meshclass 2111.0, fsl-utils
  2412.6, fsl-basisfield 2203.4, fsl-warpfns 2501.0 and fsl-cprob 2111.0 they use (mcflirt's
  and BET's first translated from FSL 6.0.7.17's packages)
  (crates larmorx-nc-mcflirt, larmorx-nc-bet, larmorx-nc-flirt, larmorx-nc-fast,
  larmorx-nc-topup, larmorx-nc-avwutils, larmorx-nc-fugue and larmorx-nc-core).
  PRELUDE: "Mark Jenkinson, FMRIB Image Analysis Group; Copyright (C) 2000/2001 University of
  Oxford". fsl-cprob is FSL's C++ wrapper of Stephen L. Moshier's Cephes Math Library
  ("Copyright 1984, 1987, 1989, 2000 by Stephen L. Moshier"), distributed by FSL with its
  packages under the FSL Licence.
  BET: "BETv1 Steve Smith; BETv2 Mickael Pechaud, Mark Jenkinson, Steve Smith; FMRIB Image
  Analysis Group; Copyright (C) 1999-2003 University of Oxford". bet2's head-CT conversion is,
  as FSL's code says, "adapted from: https://github.com/neurolabusc/Clinical/blob/master/
  clinical_h2c.m which is licensed under the BSD-2-clause license" (Chris Rorden).
  FSL is Copyright (C) 1999-2023 University of Oxford. The NIfTI-1 header definitions, znzlib
  and the code of nifti1_io.c that fsl-newnifti includes were released to the public domain by
  their authors (Robert W. Cox, Mark Jenkinson, Rick Reynolds).
  The translation is modified from the originals; the crates' PROVENANCE.md lists the changes.

Armadillo 14.2.1, as bundled by fsl-armawrap 0.7.0, and Armadillo 10.5.1, as bundled by
fsl-armawrap 0.6.0 - Apache License, Version 2.0
  Copyright 2008-2021 Conrad Sanderson (http://conradsanderson.id.au)
  Copyright 2008-2016 National ICT Australia (NICTA)
  Copyright 2017-2020 Arroyo Consortium
  Copyright 2017-2021 Data61 / CSIRO
  (Armadillo's NOTICE as fsl-armawrap 0.7.0 ships it: "This product includes software developed
  by Conrad Sanderson (http://conradsanderson.id.au); This product includes software developed
  at National ICT Australia (NICTA); This product includes software developed at Arroyo
  Consortium; This product includes software developed at Data61 / CSIRO".)
  The evaluation rules of the small matrix products, inverses, determinants and solves that
  FSL's code runs through armawrap (larmorx-nc-core/src/arma.rs): Armadillo 14.2.1's (FSL
  6.0.7.23), with Armadillo 10.5.1's (FSL 6.0.7.17) kept beside them. fsl-armawrap is Copyright
  2016-2020 University of Oxford, licensed under the Apache License, Version 2.0. The licence
  text is LICENSES/Apache-2.0.txt.

Kiss FFT, as Armadillo 14.2.1 includes it (fft_engine_kissfft.hpp; the FFT of fslmaths' large
kernels, larmorx-nc-core/src/kissfft.rs) - BSD 3-Clause License
  Copyright (c) 2003-2010 Mark Borgerding
  All rights reserved.

  Redistribution and use in source and binary forms, with or without modification,
  are permitted provided that the following conditions are met:

  * Redistributions of source code must retain the above copyright notice,
    this list of conditions and the following disclaimer.

  * Redistributions in binary form must reproduce the above copyright notice,
    this list of conditions and the following disclaimer in the documentation
    and/or other materials provided with the distribution.

  * Neither the author nor the names of any contributors may be used to
    endorse or promote products derived from this software without specific
    prior written permission.

  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

OpenBLAS 0.3.33 (the operation order of its LAPACK routines and Haswell kernels for matrices up
to 4 x 4, as FSL 6.0.7.23's liblapack.so.3 computes them) - BSD 3-Clause License
  Copyright (c) 2011-2014, The OpenBLAS Project
  All rights reserved.

  Redistribution and use in source and binary forms, with or without modification, are
  permitted provided that the following conditions are met:
     1. Redistributions of source code must retain the above copyright notice, this list of
        conditions and the following disclaimer.
     2. Redistributions in binary form must reproduce the above copyright notice, this list of
        conditions and the following disclaimer in the documentation and/or other materials
        provided with the distribution.
     3. Neither the name of the OpenBLAS project nor the names of its contributors may be used
        to endorse or promote products derived from this software without specific prior
        written permission.

  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  POSSIBILITY OF SUCH DAMAGE.
  Translated in larmorx-nc-core/src/lapack.rs, modified from the originals.

LAPACK 3.12.0 (reference LAPACK, as OpenBLAS 0.3.33 bundles it: DGETRI) - modified BSD License
  Copyright (c) 1992-2023 The University of Tennessee and The University of Tennessee Research
                          Foundation. All rights reserved.
  Copyright (c) 2000-2023 The University of California Berkeley. All rights reserved.
  Copyright (c) 2006-2023 The University of Colorado Denver. All rights reserved.

  Redistribution and use in source and binary forms, with or without modification, are
  permitted provided that the following conditions are met:
  - Redistributions of source code must retain the above copyright notice, this list of
    conditions and the following disclaimer.
  - Redistributions in binary form must reproduce the above copyright notice, this list of
    conditions and the following disclaimer listed in this license in the documentation and/or
    other materials provided with the distribution.
  - Neither the name of the copyright holders nor the names of its contributors may be used to
    endorse or promote products derived from this software without specific prior written
    permission.

  The copyright holders provide no reassurances that the source code provided does not infringe
  any patent, copyright, or any other intellectual property rights of third parties. The
  copyright holders disclaim any liability to any recipient for claims brought against
  recipient by any third party for infringement of that parties intellectual property rights.

  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  POSSIBILITY OF SUCH DAMAGE.
  Translated in larmorx-nc-core/src/lapack.rs, modified from the originals.

fslpy 3.27.0 (the file-name rules of imtest, remove_ext and imglob, which FSL's bet script
runs, and imcp and immv, which FSL's standard_space_roi and bet scripts run) - Apache License,
Version 2.0
  Copyright 2016-2024 University of Oxford, Oxford, UK (Paul McCarthy).
  Translated in larmorx-nc-core/src/avwutils.rs and fslpy.rs, modified from the originals. The licence text
  is LICENSES/Apache-2.0.txt.

fdlibm, as the GNU C Library 2.35 ships its float functions (atan2f, atanf) and tanh and expm1
  "Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. Developed at SunPro, a
  Sun Microsystems, Inc. business. Permission to use, copy, modify, and distribute this
  software is freely granted, provided that this notice is preserved."
  Translated in larmorx-nc-core/src/fdlibm.rs (tanh, expm1) and, since 2026-11-04, in the
  Apache-2.0 crate larmorx-core (../crates/larmorx-core/src/math/atanf_glibc.rs: atan2f, atanf,
  which larmorx-nc-core/src/fdlibm.rs re-exports), modified from the originals.

Arm Optimized Routines v19.11 (sinf, cosf, sincosf, logf, expf, powf, pow, exp, log; the
functions the GNU C Library 2.35 took from them) - MIT License
  Copyright (c) 2017-2019, Arm Limited.
  Translated, since 2026-11-04, in the Apache-2.0 crate larmorx-core
  (../crates/larmorx-core/src/math/*_glibc.rs), which larmorx-nc-core/src/glibc_float.rs and
  glibc_double.rs re-export (until then translated in those two files), modified from the
  originals. The licence text is LICENSES/MIT-arm-optimized-routines.txt.

The SGI STL (std::sort's introsort and std::nth_element's introselect, as libstdc++ keeps them)
  Copyright (c) 1994 Hewlett-Packard Company

  Permission to use, copy, modify, distribute and sell this software and its documentation for
  any purpose is hereby granted without fee, provided that the above copyright notice appear in
  all copies and that both that copyright notice and this permission notice appear in
  supporting documentation. Hewlett-Packard Company makes no representations about the
  suitability of this software for any purpose. It is provided "as is" without express or
  implied warranty.

  Copyright (c) 1996 Silicon Graphics Computer Systems, Inc.

  Permission to use, copy, modify, distribute and sell this software and its documentation for
  any purpose is hereby granted without fee, provided that the above copyright notice appear in
  all copies and that both that copyright notice and this permission notice appear in
  supporting documentation. Silicon Graphics makes no representations about the suitability of
  this software for any purpose. It is provided "as is" without express or implied warranty.

  The algorithms are written in larmorx-nc-core/src/stdsort.rs from their description,
  modified: the pivot step as libstdc++ refines it (the median of the second, middle and last
  elements moved to the first place, the rest partitioned), and every index checked against the
  vector's ends (std::sort of floats that may be NaN, FSL-22).


Data included
=============

FSL 6.0.7.23's standard images (fsl-data_standard 2208.0), The University of Oxford - the FSL
Licence (LICENSE)
  MNI152_T1_2mm, MNI152_T1_2mm_brain_mask_dil and MNI152_T1_2mm_eye_mask (.nii.gz), unchanged:
  the images FSL's bet script (-S, -B, -A, -A2) and standard_space_roi read
  (wheel-data/data/share/larmorx-nc/fsl-data/, installed at <prefix>/share/larmorx-nc/fsl-data;
  its NOTICE, LICENSE and MANIFEST.tsv with each file's size and SHA-256). MNI152_T1_2mm is
  FSL's MNI152 (the MNI ICBM 152 non-linear 6th generation average, made for FSL by Andrew
  Janke) and carries the McConnell Brain Imaging Centre's notice:

    Copyright (C) 1993-2009 Louis Collins, McConnell Brain Imaging Centre, Montreal
    Neurological Institute, McGill University. Permission to use, copy, modify, and
    distribute this software and its documentation for any purpose and without fee is
    hereby granted, provided that the above copyright notice appear in all copies. The
    authors and McGill University make no representations about the suitability of this
    software for any purpose. It is provided "as is" without express or implied warranty.
    The authors are not responsible for any data loss, equipment damage, property loss, or
    injury to subjects or patients resulting from the use or misuse of this software
    package.

FSL 6.0.7.23's topup settings files (fsl-topup 2203.5), The University of Oxford - the FSL
Licence (LICENSE)
  etc/flirtsch/b02b0.cnf, b02b0_1.cnf, b02b0_2.cnf, b02b0_4.cnf, b02b0_7T.cnf and test_acqp.cnf,
  unchanged (the user's decision of 2026-11-09): the settings topup --config=<name> reads, which
  larmorx-nc's topup looks for there after FSL's own places, and the three sdcflows 2.17.1
  chooses among for a PEPOLAR estimate (wheel-data/data/share/larmorx-nc/fsl-data/etc/flirtsch/,
  installed at <prefix>/share/larmorx-nc/fsl-data/etc/flirtsch; listed with their sizes and
  SHA-256s in the same MANIFEST.tsv; from FSL's conda package fsl-topup-2203.5-ha905fa9_6.conda,
  SHA-256 24381a8ab0d7410bc86c440a57666a9c166aef3a48fcf0fb1080a81a60d8909f).


Apache-2.0 code included
========================

The program includes the crate larmorx-core of larmorx, Copyright 2026 Karel Lopez Vilaret,
licensed under the Apache License, Version 2.0 (LICENSES/Apache-2.0.txt). Its NOTICE, with the
notices of the works it was translated from (CORE-MATH, VXL, ...), is
LICENSES/NOTICE-larmorx.txt.
