Significant changes to the divest package are laid out below for each release.

===============================================================================

VERSION 1.2.0

- `imageAttributes()`, and other functions for extracting and manipulating
  extended image attributes, have now been moved to the `RNifti` package. They
  are still exported by `divest` for convenience.
- If the `jsonlite` package is not available then `readDicom()` will not
  attempt to convert JSON to separate image attributes. Instead the `.bidsJson`
  attribute will be retained as a JSON string.
- Success in converting some DICOM files but not others now produces a warning
  rather than an error from `dcm2niix`. This allows the successfully converted
  images to be recovered.
- Some `bash`-specific syntax has been removed from the package's `configure`
  script.

===============================================================================

VERSION 1.1.1

- If an output directory is specified to `readDicom()` or `convertDicom()`, it
  will now be created if it doesn't already exist. (Previously `dcm2niix` would
  emit warnings about file permissions and nothing would be written.) The
  vector of files written will also be returned invisibly.
- The `miniz` library included with `dcm2niix` is no longer used except on
  Windows, as `zlib` should otherwise be available.
- The package configuration script will no longer try to interpret "none" as a
  path to `pkg-config`.
- Several small issues identified by compiler sanitisers and `valgrind` have
  been resolved.

===============================================================================

VERSION 1.1.0

- The new `divest.capabilities()` function reports on the package build's
  input/output capabilities, by analogy with `capabilities()` from base R.
- The package's configuration script now uses `pkg-config` (if available) to
  find the correct flags for the OpenJPEG library. This should improve the
  range of systems where it is properly detected.
- Upstream improvements to v1.0.20241001, including reductions to stack usage.

===============================================================================

VERSION 1.0.0

- It is now possible to use divest more analogously to dcm2niix, as a purely
  on-disk file-format converter, although the option to convert in memory is
  still available. The new convertDicom() function is a variant of readDicom()
  that defaults to this behaviour. In this case BIDS JSON sidecar files are
  written alongside the NIfTI image files.
- There is now less duplicated logic in divest's codepaths, relative to the
  mainline dcm2niix binary, improving consistency with dcm2niix's BIDS output.
- There are now helper functions to extract and replace extended image
  attributes, and for converting to and from BIDS JSON.
- The BIDS naming convention, rather than divest's own, can be used for image
  attributes by setting the "divest.bidsAttributes" option to TRUE.
- The "nested" argument to sortDicom() has been soft-deprecated in favour of
  the more flexible "output", which is also more consistent with readDicom().
- R version 3.5.0 or later is now explicitly required.

===============================================================================

VERSION 0.10.3

- Uses of the deprecated C function sprintf() have now been circumvented.

===============================================================================

VERSION 0.10.2

- Upstream improvements, to v1.0.20211006 and beyond.

===============================================================================

VERSION 0.10.1

- Fixes for new compiler warnings on certain platforms.

===============================================================================

VERSION 0.10.0

- Upstream improvements to v1.0.20210317, including support for Siemens XA20
  and XA30.
- Somewhat generalised OpenJPEG support.

===============================================================================

VERSION 0.9.0

- Upstream improvements have been integrated, including for diffusion-weighted
  series containing only b=0 volumes.
- Passing a data frame to readDicom() without specifying a "subset" argument
  should now convert all files as intended, rather than doing nothing.
- Test behaviour has been tweaked for full compatibility with RNifti v1.2.0.

===============================================================================

VERSION 0.8.2

- Fixes for minor compiler warnings.

===============================================================================

VERSION 0.8.1

- The C++ file sorting implementation has been revised to avoid the possibility
  of an infinite loop in which the same files are repeatedly resorted.
- Some tweaks have been made to the package tests.

===============================================================================

VERSION 0.8.0

- The output format used by sortDicom() is now more flexible, allowing multiple
  levels of subdirectories to be created (as requested in issue #3). Most of
  the work is now done in C++ code, and the "labelFormat" argument default has
  changed to reflect the full filename, not just the directory component. (This
  is now more consistent with dcm2niix.) The function's behaviour should be
  broadly the same as before, but there will be slight differences due to the
  quite different implementation.
- The three core R functions gain a "depth" argument, which controls the
  maximum subdirectory search depth when scanning for DICOM files.
- The QA battery tests have been moved into the package's main test set. These
  are (still) skipped in CRAN builds, however, due to the large sizes of the
  associated datasets.
- Failing to find any valid DICOM files now produces a simple message, rather
  than an error.
- Slice timing metadata should no longer include spurious zero values.
- Various upstream improvements have been merged, as usual.

===============================================================================

VERSION 0.7.2

- ASAN/UBSAN and Valgrind warnings have been resolved.

===============================================================================

VERSION 0.7.1

- There is no longer a failure if the user does not have write access to the
  DICOM directory being read from.
- R's temporary directory, rather than a hidden directory within the source
  folder, is now used for temporary copies of files when reading subsets.

===============================================================================

VERSION 0.7.0

- Additional attributes for series number and description, sequence name,
  protocol name, slice thickness and slice spacing are now captured from DICOM
  files during conversion.
- readDicom() now accepts a "subset" argument, even when a path is given rather
  than a data frame. In this case scanDicom() is called first, and then the
  requested subset is converted.
- The package is now compatible with an upcoming change in the RNifti package.
- Further upstream improvements.

===============================================================================

VERSION 0.6.1

- The C++ compiler configuration is now properly detected by the configure
  script.
- Warnings from GCC8 and Valgrind have been addressed.

===============================================================================

VERSION 0.6.0

- Upstream improvements, particularly for Philips data, have been integrated.
- The package's continuous integration tests now check it against the dcm_qa
  dataset (see https://github.com/neurolabusc/dcm_qa).
- A workaround has been added for certain undefined behaviour.

===============================================================================

VERSION 0.5.0

- The new sortDicom() function can be used to sort a directory of DICOM files
  into subdirectories corresponding to individual acquisitions.
- It is now possible to read and convert individual files to NIfTI-1 format.
  This will happen whenever an argument to readDicom() is a file rather than a
  directory.
- JPEG-encoded versions of the test files are now provided, to test the package
  more thoroughly.
- Additional attributes, such as inversion time, patient weight and slice
  timing, are now captured, while the calculations for some others have
  changed, to match the current version of dcm2niix. Echo train duration and
  the "EPI factor" have been removed (see
  https://github.com/rordenlab/dcm2niix/issues/127).
- The scanDicom() function now properly concatenates attributes when called
  with multiple paths.

===============================================================================

VERSION 0.4.1

- Fixes for Solaris and OpenJPEG compatibility.

===============================================================================

VERSION 0.4.0

- The data frame returned from scanDicom() can now be passed to readDicom(),
  and the latter gains a "subset" argument, which can be used to select a
  subset of the series to convert.
- The results of scanDicom() now also include the number of files associated
  with each series, and whether or not diffusion direction metadata is
  available.
- Additional attributes containing information about the acquisition are now
  extracted from the ASCII CSA header in Siemens EPI files.

===============================================================================

VERSION 0.3.0

- A configure script has been added to detect OpenJPEG or JasPer libraries. If
  either is available, the package will be able to read DICOM data encoded
  using the JPEG2000 codec.
- The readDicom() function gains a "labelFormat" option, which allows the
  format of image labels to be customised.
- A new "verbosity" level of -1 is now supported, which filters all but warning
  and error messages from dcm2niix's output.
- Spurious date and time information should no longer be returned.

===============================================================================

VERSION 0.2.0

- The readDicom() function is now interactive in suitable sessions, allowing
  the user to choose which DICOM series to convert.
- The new scanDicom() function allows the DICOM files in a directory to be
  scanned without performing any conversion. It returns a data frame
  containing information about the available scan series.
- Both functions now search the current working directory by default.
- Diffusion b-values and gradient vectors, and patient information, are now
  additionally stored as attributes in returned image objects.
- Image cropping and forced stacking options from dcm2niix are now exposed to
  the R interface.
- Gantry tilt correction is now applied to CT images where needed. (Reported
  by John Muschelli.)
- Phase encoding attributes are now handled more robustly.

===============================================================================

VERSION 0.1.2

- The package now behaves correctly on big-endian systems.

===============================================================================

VERSION 0.1.1

- A test has been made more robust.

===============================================================================

VERSION 0.1.0

- First public release.

===============================================================================
