# Summary of changes in STIR release 2.2 (dated 20 February 2012)

This update was prepared by Kris Thielemans (Algorithms and Software Consulting Ltd). SimSET scripts were updated with help from Robert Harrison (Univ Washington).

## Summary for end users (also to be read by developers)

### Important bug fixes

- The routines to handle SimSET data did not really work in previous releases, but should work now. This is all still preliminary. Check SimSET/README.txt for some information.

### New build system

- release of files for an alternative cross-platform build system CMake, based on example files provided by Robert Barnett (Westmead Hospital, Sydney) for STIR 2.1. The files distributed with version 2.2 are now complete and also include the tests.
  CMake is much better than the previous STIR make files for configuration and finding system dependencies. It also works on Windows for Visual Studio. Using CMake is recommended when using Visual Studio.

### Known problems

- This release is known to fail when both MPI and shared libraries are enabled. You will see linking errors in all non_MPI executables.
- The recon_test_pack routines fail with the MPI version. See the mailing list for a work-around.
- ECAT6 routines seem to have problems since STIR 2.0. ECAT6 is therefore no longer supported
- The interpolating back-projector can still give problems in the centre of the images on some architectures/compiler/optimisation settings. We recommend to use the ray-tracing matrix (with additional rays) instead.
- When using Visual Studio (Express) with the provided solution files, there is a linking problem for some utilities. It is recommended to use the new `CMake` files for building instead.
- When using `GRAPHICS=X` (i.e. on Unix/Linux/MacOSX) there window displaying the bitmaps is sometimes empty. This might depend on your X server settings. This affects `manip_image`, `manip_projdata` and `display_projdata`.

### New functionality

- `stir_math` has two additional switches `--parametric` and `--dynamic` to handle parametric or dynamic images (no sinograms yet. sorry). Note however that output data will not incomplete headers. In particular, timing information will be lost.
- `list_image_info` now also prints information about the edge of the voxels and the total sum in the image.
- `stir_write_pgm` is a new utility to make a PGM image for a single slice of an image.
- `list_projdata_info` now also optionally prints information about min, max and the total sum in the data (run without arguments to see a usage message).

### Functionality changes

- ECAT list-mode routines are now no longer included in the library when ECAT support is not enabled. (In STIR 2.1 they defaulted to use the ECAT 962 file format.)
- On Unix/Linux systems, `manip_image` and `manip_projdata` used to display a list of files in the current directory when asking for new input data. This is no longer implemented.

### Minor bug fixes

- This update contains updates for more recent compilers (Clang++ 2.9, gcc 4.6.1 and Visual C++ 2010 are now supported).
- No longer write confusing warnings about `ring difference does not belong in a segment` after calling SSRB, in FBP3DRP etc.
- Empty lines in .par files could create problems in previous versions. This should be fixed now.
- The command line processing of `create_tail_mask_from_ACFs` only worked if all options were given (i.e. if you attempted to use the defaults, the program crashed).

### Documentation changes

- The User's guide has been improved. Major changes are related to the scatter estimation, the use of a stored projection matrix, and the CMake build process.
- minor changes to doxygen documentation

### recon_test_pack changes

- minor changes to some scripts for Bourne shell compatibility (as opposed to bash only)

### Other changes to tests

None

## What's new for developers (aside from what should be obvious from the above):

### Major bugs fixed

None

### New functionality

- Pre-release of some very very preliminary code to use SWIG to make a Python interface to STIR. It isn't complete by far, nor documented. If you know SWIG, feel free to chip-in! (Let's discuss that on the stir-devel list).

### Other code changes

- `stir::shared_ptr` is now an alias for `boost::shared_ptr` from the Boost C++ library. This makes it much more robust and standard compliant. This means that you might have to change your code in a few places. For example:

       // no longer works
       shared_ptr<MyType> sptr = new MyType;
       sptr = new MyType;
       sptr = 0;

       // replace with
       shared_ptr<MyType> sptr(new MyType);
       sptr.reset(new MyType);
       sptr.reset();

- Introduced new input file format registries for `stir::DynamicDiscretisedDensity` and `ParametricDiscretisedDensity`, moving the relevant code from the class definition. See the `IO` group.
- Replaced most occurences of `ClassName::read_from_file` with `read_from_file<ClassName>`, for those classes which have an input file format registry (i.e. all except `ProjData`). These two versions are currently functionally identical (as the first version will call the second), but the first version is deprecated as it prevents us to separate the `IO` and `buildblock` libraries.
- Minor fixes to some utilities (bugs spotted by David Volgyes by using cppcheck.