Skip to content

Release Notes

1.3.2 [2025-12-15]

Fixes:

  • Fixed label index reference in DICOM and NIfTI creators to use label_object.index instead of incorrect dictionary lookup

Maintenance:

  • Updated base Docker image from flywheel/python-gdcm:sse to flywheel/python:3.12-wolfi-build
  • Removed obsolete build dependencies (cargo, g++) and version pins for jq and git

1.3.1 [2025-07-14]

Maintenance:

  • Migrated from poetry to uv for dependency management
  • Updated dcm2niix from v1.0.20241211 to v1.0.20250506
  • Added jq (1.8.0-r0) and git (2.50.1-r0) as build dependencies
  • Upgraded setuptools to >=78.1.1

1.3.0 [2025-05-19]

Enhancements:

  • Added requirements-dev.txt to Docker build context for better separation of development dependencies

Fixes:

  • Fixed raw string regex pattern in roi_tools.py to prevent invalid escape sequence warnings
  • Fixed DICOM decompression check to properly use TransferSyntaxUID.is_compressed

Maintenance:

  • Migrated from flywheel-gear-toolkit to fw-gear library
  • Updated dcm2niix to v1.0.20241211
  • Upgraded python from 3.12.6 to 3.13.1
  • Updated flywheel-sdk to ^20.1.4
  • Updated nibabel to ^5.3.2
  • Updated pynrrd to ^1.1.3
  • Updated scikit-image to ^0.25.2
  • Updated fw-client to ^2.1.1
  • Updated fw-file to ^4.1.2
  • Updated pytest to 8.3.5
  • Updated pre-commit to ^4.2.0
  • Updated isort to ^6.0.1
  • Updated pytest-cov to ^6.1.1
  • Added VALIDATE_CLASSIFICATION: "true" configuration to CI pipeline
  • Restructured Dockerfile with multi-stage build for production and development environments
  • Added uv package manager for faster dependency installation
  • Replaced pydicom.read_file() with pydicom.dcmread() (updated API usage)
  • Replaced deprecated log.warn() calls with log.warning()
  • Added noqa comments for functions exceeding complexity limits
  • Improved conditional logic structure in multiple modules for better readability
  • Changed fw_client timeout parameter from read_timeout to timeout

1.2.3 [2024-10-01]

Maintenance:

  • Updated CI configuration to use flywheel-io/tools/etc/qa-ci project
  • Upgraded python from 3.11 to 3.12
  • Updated .pre-commit-config.yaml hooks and linting configuration
  • Migrated base Docker image from flywheel/python:main.0481c74f to flywheel/python-gdcm:sse
  • Switched from Debian to Alpine Linux in container
  • Removed MY_DEBUG_GE flag from dcm2niix build configuration
  • Updated flywheel-gear-toolkit to ^0.6.18
  • Updated flywheel-sdk to ^16.19.0
  • Updated scikit-image to ^0.24.0
  • Updated fw-client to ^0.8.6
  • Updated fw-file to ^3.4.0
  • Removed obsolete dependencies including python-gdcm, certifi, idna, and virtualenv
  • Removed tests/Dockerfile in favor of CI-based testing

Fixes:

  • Replaced direct subprocess.Popen calls with exec_command from flywheel-gear-toolkit for better error handling
  • Fixed regex pattern in Creators.py by adding raw string literal prefix
  • Corrected test assertion to use isinstance() instead of type() comparison

Documentation:

  • Removed FAQ and Contributing sections from README.md
  • Formatted test data JSON files for improved readability

1.2.2 [2024-06-04]

Fixes:

  • Fixed a bug where annotations with color rgba values where alpha equals 1 caused the gear to fail
  • Added exception handling to log when annotation collection times out and inform users of the read-timeout config option

Documentation:

  • Added warning to read-timeout configuration documenting that this setting only affects Flywheel API timeouts and cannot control external timeouts
  • Added repository source URL to manifest.json

1.2.1 [2024-04-08]

Enhancements:

  • Added support for ContourRoi type annotations in DICOM and NIfTI files
  • Added read-timeout configuration option to allow longer API response wait times (default and minimum 60 seconds)

Maintenance:

  • Migrated from black and isort to ruff for code formatting and linting
  • Updated code formatting throughout the codebase to comply with ruff standards
  • Added Flywheel classification metadata to gear manifest

Documentation:

  • Updated README to document ContourRoi support and new read-timeout configuration option

1.2.0 [2023-12-11]

Enhancements:

  • Added support for multiframe DICOM files with single-file inputs
  • Improved detection of ImageOrientationPatient tag by checking SharedFunctionalGroupsSequence and PerFrameFunctionalGroupsSequence
  • Enhanced pixel spacing and slice thickness detection from DICOM functional group sequences

Fixes:

  • Fixed affine matrix calculation to properly detect spacing values from functional group sequences
  • Corrected output DICOM format for mask overlays by setting PhotometricInterpretation to MONOCHROME2 and SamplesPerPixel to 1

Maintenance:

  • Added markdownlint pre-commit hook

Documentation:

  • Reformatted README.md to comply with line length requirements and markdown linting rules
  • Added new use case for multiframe DICOM support
  • Added note about orientation reversal when overlaying NIfTI masks on DICOM in OHIF viewer
  • Fixed table of contents marker from [[_TOC_]] to [[*TOC*]]

1.1.4 [2023-10-30]

Enhancements:

  • Added all-file-versions configuration option to export ROIs from all file versions instead of only the latest version

Maintenance:

  • Updated libopenblas-dev from 0.3.13+ds-3 to 0.3.13+ds-3+deb11u1
  • Updated liblapack-dev from 3.9.0-3 to 3.9.0-3+deb11u1

Documentation:

  • Added documentation for all-file-versions configuration parameter
  • Added Use Case 5 describing ROI export from multiple file versions

1.1.3 [2023-10-05]

Enhancements:

  • Added completed-task-only configuration option to control whether annotations from incomplete read tasks are included in exports (defaults to true)

Fixes:

  • Fixed issue where annotations attached to deleted or invalid read tasks were being exported by adding validation checks for all read tasks connected to found annotations

1.1.2 [2023-10-03]

Fixes:

  • Fixed save-binary-masks config option to operate as expected

Documentation:

  • Added use case for integrating mask-exporter with pyradiomics gear, noting requirement to set save-binary-masks to True for binary masks
  • Updated known limitations section to address behavior when input DICOM contains localizers, including workarounds using dcm2niix and DICOM splitter gears

1.1.1 [2023-09-25]

Enhancements:

  • Added support for Circle ROI annotations in addition to Rectangle, Ellipse, and Freehand
  • Added support for NIfTI input files in addition to DICOM files

Fixes:

  • Fixed slice orientation handling for NIfTI files by adding transpose check using brhc viewport data
  • Fixed flip direction logic for Sagittal plane with L orientation in NIfTI processing

Maintenance:

  • Refactored fill_roi_nifti_slice to operate on individual slices rather than full data array
  • Extracted slice identification and flip calculation logic into identify_slice_and_flips helper method
  • Added brhc_transpose_check helper method to validate slice orientation against viewer interpretation

Documentation:

  • Updated README to reflect Circle ROI and NIfTI input support
  • Added known limitation about DICOM files missing ImageOrientationPatient tag (0020,0037)
  • Added known limitation about Circle ROI center/edge point offset issue and workaround
  • Clarified that additional-arguments config option applies to DICOM input only

1.1.0 [2023-09-13]

Enhancements:

  • Added support for NIfTI input files with ROI annotations
  • Changed save-combined-output config option from boolean to string with three modes: individual, combined, or both to allow more flexible output options
  • Added compression (-z y) to NIfTI output files from dcm2niix conversion
  • Added security scanning configuration to CI pipeline (SECURITY_SCANS_DISABLED, DEPENDENCY_SCANNING_DISABLED, LICENSE_MANAGEMENT_DISABLED, SAST_DISABLED, SECRET_DETECTION_DISABLED)

Maintenance:

  • Enabled debug mode (DEBUG=3) in CI configuration
  • Updated CI reference from 2590a98 to aed10c0
  • Updated pre-commit hook reference from a43c299 to c36806c

Documentation:

  • Added known limitation documentation for DICOMs missing ImageOrientationPatient tag (0020,0037) - masks cannot be overlaid on original DICOM in Flywheel viewer but work correctly when DICOM is converted to NIfTI
  • Updated save-combined-output config description to reflect new string-based options (individual, combined, both)

1.0.4 [2023-06-09]

Enhancements:

  • Migrated to Flywheel API for collecting ROI annotations directly from /api/annotations endpoint
  • Added ROI organization by task_id to distinguish task-related annotations (24 char BSON) from non-task annotations
  • Added annotations-scope configuration to filter ROIs by task, non-task, or both
  • Added additional-arguments configuration for passing expert options to converter
  • Updated to use flywheel-gear-toolkit 0.6.10 and fw-client 0.5.0 for API operations

Fixes:

  • Fixed output filename generation to include task_id for better organization
  • Corrected affine calculation for DICOM volumes to properly handle SpacingBetweenSlices

Maintenance:

  • Updated python from 3.8 to 3.11
  • Updated flywheel-sdk from 15.8.0 to 16.19.0
  • Updated numpy from 1.23.1 to 1.24.3
  • Updated scikit-image from 0.18.1 to 0.20.0
  • Updated pydicom from 2.3.0 to 2.3.1
  • Updated fw-file from 1.3.3 to 2.2.0
  • Updated dcm2niix from commit 003f0d1 to fe2f260 (version 1.0.20230411)
  • Migrated from Ubuntu Focal base image to flywheel/python:main.0481c74f
  • Removed poetry in favor of pip for dependency management
  • Updated GitLab CI configuration to reference sse-qa-ci pipeline
  • Simplified Dockerfile to reduce image size and build time with multi-stage approach
  • Removed Slicer, Plastimatch, and dicom2nifti conversion methods (only dcm2niix supported)
  • Refactored worker classes into four-stage pipeline: Preppers, Collectors, Creators, Converters
  • Added comprehensive unit tests using pytest-mock and fw-http-testserver
  • Removed save-slicer-color-table configuration option

Documentation:

  • Completely rewrote README with detailed usage instructions, workflow diagrams, and use cases
  • Added comprehensive gear manifest documentation including input/config/output specifications
  • Documented support for Rectangle, Ellipse, and Freehand ROI types

1.0.3 [2022-11-23]

Fixes:

  • Fixed crash when 2D slices are taken from larger set of DICOMs (as in volumetric image) and included on their own by using SOPInstanceUID index instead of InstanceNumber

Maintenance:

  • Removed build-essential package from Dockerfile
  • Added environment variables SLICER_URL, DCMCOMMIT, and OJ_VERSION to manifest.json
  • Removed docker-image field from manifest.json custom configuration

1.0.2 [2022-10-07]

Fixes:

  • Fixed handling of DICOM files missing PixelSpacing by falling back to ImagerPixelSpacing
  • Fixed DICOM pixel data corruption by setting BitsAllocated, BitsStored, and HighBit after decompression instead of before
  • Fixed single DICOM file input handling when file signature is missing

Maintenance:

  • Split Slicer installation into separate steps in Dockerfile for better build caching
  • Updated poetry installation command formatting in Dockerfile
  • Removed virtualenvs.create false configuration from poetry setup
  • Added explicit dependencies: certifi, urllib3, charset-normalizer, idna, virtualenv
  • Changed print() statement to log.info() in dcm2niix converter
  • Added debug logging for label processing and output filenames
  • Updated test runner script to use poetry run pytest tests/unit_tests
  • Removed test for unzipped DICOM directory handling
  • Added empty tests/__init__.py file

1.0.1 [2022-08-16]

Maintenance:

  • Updated python from 3.8 to 3.8-3.11 range
  • Updated numpy from 1.22.1 to 1.23.1
  • Updated scipy from 1.7.3 to 1.9.0
  • Updated flywheel-gear-toolkit to 0.3.1
  • Added pre-commit, isort, and pytest-cov dev dependencies
  • Added CI/CD pipeline configuration with .gitlab-ci.yml and .pre-commit-config.yaml
  • Added Hadolint configuration for Dockerfile linting
  • Added .env file with PYTEST_COV_FAIL_UNDER=30 for test coverage threshold
  • Added merge request template with checklist for release notes, changelog, and tests
  • Removed .gitignore file

Fixes:

  • Fixed DICOM decompression error handling to prevent writing uncompressed data to compressed DICOM files
  • Fixed SpacingBetweenSlices fallback to handle 2D DICOM datasets
  • Fixed URLs in comments from https to http for compatibility

Documentation:

  • Reformatted README with improved line wrapping for better readability
  • Added comprehensive docstrings throughout codebase following Python standards
  • Updated source URL from GitHub to GitLab in manifest.json

1.0.0 [2022-05-09]

Enhancements:

  • Added configurable conversion methods with support for dcm2niix, slicer-dcmtk, slicer-gdcm, slicer-arch, plastimatch, and dicom2nifti
  • Added support for NRRD output format via save_NRRD configuration option
  • Added save_slicer_color_table configuration option to export 3D Slicer color tables
  • Added comprehensive integration and unit test suite with pytest
  • Added CI test infrastructure with Docker-based test execution
  • Added support for parsing RGBA color values from ROI metadata

Maintenance:

  • Migrated from requirements.txt to poetry for dependency management
  • Updated python runtime from 3.8 to support ~3.8 constraint
  • Updated flywheel-sdk to 15.8.0
  • Updated flywheel-gear-toolkit to 0.3.1
  • Updated nibabel to 3.2.1
  • Updated numpy to 1.22.1
  • Updated scikit-image to 0.18.1
  • Updated pydicom to 2.3.0
  • Updated scipy to 1.7.3
  • Added python-gdcm ^3.0.10 dependency
  • Added pylibjpeg 1.4.0 and pylibjpeg-libjpeg 1.3.0 dependencies
  • Added dicom2nifti ~2.3.0 dependency
  • Added fw-file ^1.3.3 with all extras
  • Added dcmpi 0.0.2.8 and pynrrd 0.4.2 dependencies
  • Installed system packages cmake, make, git, wget, unzip, dcmtk, plastimatch, qt5-default, xvfb, and X11 libraries
  • Installed 3D Slicer 4.11 for headless DICOM processing
  • Installed dcm2niix with openjpeg 2.4.0 support
  • Cloned dcmheat repository for supporting conversion scripts
  • Refactored codebase into modular architecture with Preppers, Collectors, Creators, and Converters worker classes
  • Restructured code organization with dedicated utils/objects/ and utils/workers/ modules
  • Updated manifest command to use poetry run python3
  • Added environment variable configuration for converter paths and runtime directories

Documentation:

  • Added test data files and metadata fixtures for integration testing
  • Added setup utilities in tests/setup_data.py for test data management

Breaking Changes:

  • Removed combined_output_size configuration option
  • Changed manifest command execution to require poetry

0.3.4 [2022-01-25]

Fixes:

  • Improved output filename handling for DICOM and ZIP input files to ensure proper .nii.gz extension
  • Fixed filename extension check to use endswith() method for more robust string comparison

0.3.3 [2022-01-14]

Fixes:

  • Fixed slice direction handling for z-axis perpendicular orientations by flipping the z-component of the adjustment matrix

0.3.2 [2021-03-02]

Maintenance:

  • Added newline at end of manifest.json for proper file formatting

0.3.0 [2021-02-25]

Enhancements:

  • Added support for DICOM files as input (in addition to NIfTI files)
  • Added support for RectangleRoi and EllipticalRoi annotation types from OHIF viewer
  • Added automatic conversion of DICOM series to NIfTI format with output saved as converted_dicom.nii.gz
  • Added libgdcm-tools system package for DICOM handling

Fixes:

  • Fixed typo in README: "Flwwheel" corrected to "Flywheel"
  • Fixed ROI volume calculation description to clarify voxel volume is computed from affine determinant
  • Fixed coordinate system handling for DICOM files with axis orientation adjustments
  • Fixed package manager command from pip to pip3 for consistency

Maintenance:

  • Upgraded base Docker image from ubuntu:xenial to ubuntu:focal
  • Added python3-setuptools system package
  • Migrated from flywheel SDK to flywheel-gear-toolkit library with GearToolkitContext
  • Added dicom2nifti, pydicom, and requests package dependencies

Documentation:

  • Updated README to reflect DICOM input support and clarify ROI volume calculation

0.2.4 [2020-09-08]

Fixes:

  • Fixed handling of ROIs without labels to prevent crashes when accessing missing location or label fields
  • Added warning message when ROIs lack labels, instructing users to attach labels for inclusion in output

0.2.3 [2020-09-03]

Fixes:

  • Fixed coordinate system transformations for ROI annotations to correctly handle oblique orientations
  • Fixed ROI extraction from OHIF viewer to prevent duplicate labels
  • Fixed axis flipping logic for proper orientation handling across different viewing planes
  • Corrected file metadata access to use dictionary keys instead of object attributes

Maintenance:

  • Updated .gitignore to exclude Python 3.7 cache files
  • Applied code formatting changes throughout run.py and utils.py (string quotes, whitespace, line breaks)
  • Added import re for filename sanitization
  • Removed unused fw client variable from main() function
  • Improved code structure and readability with consistent formatting

Enhancements:

  • Added inverse affine matrix calculation for accurate coordinate transformations in oblique image orientations
  • Added filename sanitization to replace non-alphanumeric characters in ROI labels with underscores
  • Enhanced get_points() function with coordinate system transformation support and axis flip detection
  • Updated label2data() function signature to accept inverse affine matrix parameter

0.2.0 [2020-06-30]

Enhancements:

  • Added support for OHIF REACT viewer ROI measurements in FreehandRoi format
  • Added logging to display the number of ROI labels found during processing
  • Added logging to display each ROI label name as it is being processed

Fixes:

  • Fixed ROI count validation to occur before attempting to process ROIs
  • Improved error handling when no ROI labels are found in the input file

Maintenance:

  • Refactored polygon-to-mask conversion logic into get_points() function for better code reusability

0.1.1 [2020-04-16]

Enhancements:

  • Added combined_output_size configuration parameter to control bit depth of combined ROI bitmasked file (int8, int16, int32, or int64)
  • Added automatic compression for uncompressed NIfTI output files

Fixes:

  • Fixed ROI count limit to respect selected integer bit depth instead of hardcoded 63-bit limit

Documentation:

  • Capitalized section headers "Inputs" and "Parameters" in README
  • Added note explaining voxel value behavior in overlapping ROIs within combined output file

0.1.0 [2020-03-23]

Enhancements:

  • Added gear to convert ROIs created in Flywheel's OHIF viewer to NIfTI files
  • Added support for exporting individual ROI labels as separate NIfTI files
  • Added support for exporting all ROIs combined into a single bitmasked NIfTI file
  • Added CSV output with ROI properties including label, index, voxel count, and volume in cubic millimeters
  • Added 3D Slicer colortable file generation for integration with 3D Slicer
  • Added configuration option to save ROIs as binary masks or bitmasked values
  • Added support for freehand polygon ROIs drawn in axial, sagittal, and coronal orientations