Release Notes
1.0.0 [2025-10-07]
Enhancements:
- Added
fix-uidsconfiguration option to control whether the gear attempts to fix invalid UI VR tags; replaces the previous allow-list-based approach with a boolean toggle. - Introduced
GearArgsdataclass inparser.pyto consolidate gear run arguments into a single structured object. - Added separate QC fail tracking (
qc_fail) distinct from gear fail, allowing jobs to complete successfully while still reporting aFAILQC state when required tags have invalid values that cannot be removed. - Improved
pixel-data-checkto skip files that lack pixel data entirely, logging a message rather than attempting to parse absent data.
Fixes:
- Fixed QC result to correctly reflect
FAILwhen required DICOM tag values are invalid and cannot be removed, without causing the gear job itself to fail. - Fixed
pixel-data-checkto only attempt pixel array parsing when pixel data is actually present in the DICOM file. - Fixed events logging when required tag value cannot be removed.
Maintenance:
- Renamed config keys
standardize_transfer_syntaxandforce_decompresstostandardize-transfer-syntaxandforce-decompressfor consistency with kebab-case naming conventions. - Updated
fw-filedependency from>=4.1.3,<5to>=4.2.0,<5. - Updated
PYTHON_VERSIONfrom3.13.1to3.13.7in the build environment. - Unpinned
gitpackage version inDockerfileto use the latest available. - Refactored
parse_configreturn type from a tuple of individual values to a(GearArgs, bool)tuple. - Updated
run.pyand all tests to use theGearArgsdataclass interface.
Documentation:
- Updated
CONTRIBUTING.mdto replacepoetryinstructions withuvequivalents, including updated commands for dependency management and environment setup. - Updated
README.mdto document the newfix-uidsconfig option and the renamedforce-decompressandstandardize-transfer-syntaxconfig keys.
Breaking Changes:
- Renamed config key
standardize_transfer_syntaxtostandardize-transfer-syntax; existing gear configurations using the old key name will not be recognized. - Renamed config key
force_decompresstoforce-decompress; existing gear configurations using the old key name will not be recognized. - Changed UID fixing behavior: the previous allow-list approach for
fix_uidshas been replaced by thefix-uidsboolean config; tags not on the former allow list that had invalid values will now be handled differently depending on the new setting.
0.11.3 [2025-07-17]
Fixes:
- Updated
fw-fileto4.1.3to prevent the gear from attempting to set an OB VR with a non-bytes value
Maintenance:
- Migrated from
poetrytouv/hatchlingfor dependency management - Updated
fw-filedependency from>=4.1.0to>=4.1.3 - Applied security patches in
Dockerfileby upgrading base image packages and addingjq1.8.0-r0andgit2.50.1-r0
0.11.2 [2025-06-13]
Maintenance:
- Added
eolfixpre-commit hook to enforce end-of-line consistency, excludingfw_gear_dicom_fixer/standard/ - Fixed missing end-of-file newlines in
Dockerfile,.gitignore,README.md, andCONTRIBUTING.md
0.11.1 [2025-05-28]
Enhancements:
- Added
uidandgid(31337) configuration tomanifest.jsonand switched to running the container as theflywheeluser for improved security isolation
Fixes:
- Upgraded
setuptoolsto>=78.1.1inDockerfileto address security vulnerabilities
Maintenance:
- Updated
pytestfrom^6.1.2to^7.2.0 - Removed pinned
PYTHON_SETUPTOOLS_VERSION(65.5.1) frommanifest.jsonenvironment variables
0.11.0 [2025-04-04]
Enhancements:
- Added
rename-zip-membersconfiguration option to rename zip archive members with the pattern{SOPInstanceUID}.{Modality}.dcm(default:True) - Added automatic disabling of
pixel-data-checkforRTSTRUCTmodality inputs - Improved pixel data error logging to include the filename for easier debugging
Fixes:
- Fixed
PlanarConfigurationto0before JPEG decompression to prevent decompression errors - Fixed color space conversion to skip already-
RGBimages and raise aValueErrorfor unsupported bit depths greater than8 - Fixed
no_dataelem_fixescontext manager to correctly save and restoreraw_VR_fixersandraw_value_fixersinstead of the removedraw_elem_fixers - Fixed
decompresscall to useas_rgb=Trueand catchValueErrorin addition toRuntimeError
Maintenance:
- Upgraded
fw-filefrom^3.5.0to^4.1.0 - Updated
pydicomimport ofapply_color_lutandconvert_color_spacefrompydicom.pixel_data_handlerstopydicom.pixels - Removed deprecated
is_implicit_VRandis_little_endianassignments after decompression - Updated
pythonenvironment from3.13.0to3.13.1 - Added end-to-end JPEG decompression test suite using
matplotlibandscikit-imagewith SSIM image similarity validation - Added
matplotlibandscikit-imageas dev dependencies - Suppressed
pydicomlogger output introduced in3.0.0
0.10.6 [2024-12-05]
Fixes:
- Updated manifest.json env var
0.10.5 [2024-12-05]
Enhancements:
- Added
pixel-data-checkconfiguration option to verify that DICOM pixel data is parsable; when enabled and the check fails, the job is marked unsuccessful and file tagging is skipped to prevent downstream gear rules from triggering. - Updated
run()to return an exit code and callsys.exit()with the result, ensuring the gear process exits with a non-zero status on failure. - Updated events to be stored as list of dictionaries with
tagandeventkeys
Fixes:
- Fixed
convert_color_space_fixerto usenp.ptp()instead of the deprecatedndarray.ptp()method for pixel array normalization. - Fixed
removed_duplicatescondition to use explicit boolean comparison (len(to_del) > 0) andbool(uid_modifications)for accurate write criteria evaluation.
Maintenance:
- Updated
Dockerfileto use multi-stage build withflywheel/python-gdcm:ssebase image,uvfor package installation, and a separatedevstage. - Updated
.dockerignoreto includerequirements*.txtpattern to support multiple requirements files. - Updated
pythonfrom^3.8to^3.10andPYTHON_VERSIONto3.13.0in the runtime environment. - Updated
numpyfrom^1.22.2to^2.1. - Updated
fw-filefrom^3.3.4to^3.5.0. - Updated
pylibjpegfrom^1.4.0to^2.0. - Updated
psutilfrom^5.9.6to^6.0.0. - Removed
python-gdcmgit dependency frompyproject.toml. - Migrated CI configuration from
sse-qa-citoqa-cipipeline reference. - Updated pre-commit hooks to add
hadolint,jsonlint, andlinkcheck, and expandedrufflint selectors to includeD,F, andPLrules. - Replaced
pylintdisable comments withnoqadirectives throughout the codebase. - Normalized Unicode zero-width space characters (
\u200b) to their literal equivalents in DICOM standard JSON data files. - Added newline at end of DICOM standard JSON files.
- Reformatted
editions.jsonfrom a single-line array to a multi-line format. - Updated tests to use keyword arguments for
run()calls and adapted assertions to the new list-of-dictionaries event format.
Documentation:
- Added documentation for the new
pixel-data-checkconfiguration option toREADME.md, including supported transfer syntaxes and behavior on failure. - Added clarifying note to
standardize_transfer_syntaxdocumentation that the job will be marked as failed if the transfer syntax change fails. - Removed FAQ section reference from
README.md.
0.10.4 [2024-07-26]
Enhancements:
- Added detection and automatic repair of DICOM files missing sequence delimiters (
FFFE, E0DD), with a corresponding QC event logged as output. - Improved DICOM loading to use strict validation mode on first read attempt, falling back gracefully on
EOFErrorto capture and fix quietly-appliedpydicomcorrections.
Fixes:
- Fixed
standardize_transfer_syntaxto return a consistent tuple("", "")in the no-op code path, preventing unpacking errors in callers. - Removed false-positive decompression failure check that raised
RuntimeErrorwhen max pixel value was0. - Fixed misleading "Writing output because" log message that was previously constructed incorrectly due to operator precedence issues.
- Fixed
calculate_decompressed_sizeto handle read errors gracefully, returning0instead of raising an unhandled exception.
Maintenance:
- Added
libssl-dev,swig, andpatchelfsystem packages toDockerfile. - Switched
python-gdcmdependency from PyPI to a customflywheel-iogit repository source. - Updated tests to pass
configfixture and setreading_validation_mode = 2for accurate validation behavior. - Added test coverage for
EOFErrorand other exceptions duringDICOMCollectioninitialization inmain.py.
0.10.3 [2024-07-02]
Fixes:
- Fixed UID generation to include subject label as an entropy source, improving uniqueness of generated
SeriesInstanceUIDandStudyInstanceUIDvalues - Fixed handling of
Nonereturn value fromstandardize_transfer_syntaxto prevent unpacking errors
Maintenance:
- Disabled
DEBUGmode in CI by settingDEBUGto an empty string
0.10.2 [2024-06-25]
Enhancements:
- Added rescaling of
PALETTE COLORto RGB conversion from 16-bit to 8-bit for ultrasound (US) and intravascular ultrasound (IVUS) modalities to ensure valid DICOM output. convert_color_space_fixer()now returns the color space conversion description, enablingPhotometricInterpretationchange events to be tracked and reported in gear output.
Documentation:
- Updated
README.mdto document the 8-bit rescaling behavior forUSandIVUSmodalities withPALETTE COLORphotometric interpretation.
0.10.1 [2024-06-20]
Enhancements:
- Added
convert-palettegear config option to control whether palette color images are converted to RGB (defaults totrue).
Fixes:
- Made palette color conversion in
convert_color_space_fixeropt-in viaconvert_paletteparameter, with a warning logged whenBitsAllocatedmust be changed from 8-bit to 16-bit during conversion.
Maintenance:
- Updated
fw-filefrom^3.3.3to^3.3.4.
0.10.0 [2024-06-10]
Enhancements:
- Added
new-uids-neededconfig option to generate newSeriesInstanceUIDandStudyInstanceUIDbased on acquisition and session labels, producing deterministic UIDs unique across sessions.
Maintenance:
- Updated
manifest.jsonsource URL to point to the new repository location. - Added
get_unique_UIDhelper to consolidate UID retrieval logic inmetadata.py. - Expanded test coverage for new UID generation and config parsing.
0.9.7 [2024-04-15]
Enhancements:
- Added
output_configurationwithenforce_file_version_matchtomanifest.json
Fixes:
- Updated
fw-filefrom^3.3.2to^3.3.3
Maintenance:
- Added
gearcheckpre-commit hook withalways_run: true - Added
ruff_formatandruff_testspre-commit hooks - Removed
ruff--fixflag from linter configuration - Removed unused imports from test files and source modules
- Applied minor whitespace and code style cleanup across source files
0.9.6 [2024-04-02]
Enhancements:
- Updated
run()to return the output filename alongside the events dictionary, enabling callers to reference the output file directly. - Added automatic file type classification: output DICOM files are now tagged with
type="dicom"viacontext.metadata.update_file(). - Updated
manifest.jsonclassification metadata to includefunction,modality,organ,species, andtherapeutic_areafields. - Changed
api-keyinput permission from read-only to writable. - Updated manifest
sourceandurlfields to reflect the new repository location.
Maintenance:
- Updated tests to unpack the new
(out_name, events)return value fromrun(). - Added output filename assertions to test cases for
zip_singlebehavior.
0.9.5 [2024-02-09]
Fixes:
- Fixed frame count calculation in
calculate_decompressed_sizeto correctly handle single-DICOM files missingNumberOfFramesby catchingTypeErrorinstead ofAttributeErrorwhen accessingPerFrameFunctionalGroupsSequence
Maintenance:
- Added test coverage for
calculate_decompressed_sizewith single-DICOM input
0.9.4 [2024-01-12]
Fixes:
- Fixed
calculate_decompressed_size()to correctly handle DICOM collections with varying or missing tag values by using per-tag maximums instead of single values, preventingTypeErroron mixedNonevalues inRows,Columns,SamplesPerPixel, andBitsAllocatedtags
Maintenance:
- Updated
fw-filefrom^3.3.0to^3.3.2 - Added tests for
calculate_decompressed_size()with mixed and missing tag values
0.9.3 [2023-11-29]
Fixes:
- Fixed DICOM decoding for sequences of undefined length by explicitly setting
parent_datasetandparent_seqattributes, resolving apydicom2.4.1compatibility issue
Maintenance:
- Replaced
blackandisortpre-commit hooks withrufffor linting and formatting
0.9.2 [2023-11-21]
Breaking Changes:
- Changed the default value of
strict-validationfromFalsetoTrue, enabling strict DICOM validation by default
0.9.1 [2023-11-08]
Enhancements:
- Added
force_decompressconfig option to allow forcingstandardize_transfer_syntaxdecompression even when the file may be too large for available memory. - Added memory availability check before decompression, automatically disabling
standardize_transfer_syntaxif the estimated decompressed size exceeds available memory. - Added
calculate_decompressed_size()utility to estimate DICOM decompressed size before processing.
Fixes:
- Added
AttributeErrorhandling instandardize_transfer_syntaxto catch decompression failures caused by large file sizes. - Fixed gear result to return
FAILstate when decompression fails or file is too large for decompression. - Fixed docstring typo in
run()(trailinglin parameter description) and clarified return value documentation.
Maintenance:
- Updated
fw-filedependency from^3.0.0to^3.3.0. - Added
psutil^5.9.6andhumanize^4.8.0dependencies. - Added tests for
AttributeErrorhandling instandardize_transfer_syntaxandrun(). - Added tests for
force_decompressand memory-basedstandardize_transfer_syntaxswitching inparse_config. - Added
test_utils.pywith tests forcalculate_decompressed_size.
0.9.0 [2023-09-11]
Enhancements:
- Added color space conversion support after decompression, converting
YBR_FULL_422,YBR_FULL, andPALETTE COLORphotometric interpretations toRGBfor improved downstream compatibility.
Fixes:
- Improved DICOM decompression to use
GDCMas the default handler instead ofpylibjpeg, with added validation to detect silent decompression failures where pixel data is empty after conversion.
Maintenance:
- Added
python-gdcm^3.0.22dependency for DICOM decompression support. - Added
dicom-validator^0.3.0dependency.
Documentation:
- Updated
README.mdto document color space conversion support, including supportedPhotometricInterpretationvalues.
0.8.3 [2023-08-03]
Fixes:
- Fixed
fix_patient_sexto correctly handle emptyPatientSexvalues by treating them as valid rather than attempting a replacement
Maintenance:
- Updated
fw-filefrom^2.4.1to^3.0.0 - Added test cases for empty
PatientSexvalues intest_patient_sex_fixer
Documentation:
- Expanded
README.mdwith detailed gear classification, workflow diagrams, use case examples, config descriptions, prerequisites, and FAQ reference
0.8.1 [2023-07-28]
Maintenance:
- Updated
pythonfrom3.9.7to3.11.2 - Updated
fw-filefrom^2.4.0to^2.4.1 - Updated
PYTHON_PIP_VERSIONfrom21.2.4to22.3.1 - Fixed test assertion for
NonconformingDataElementValueto expectb"male"instead of"male"
0.8.0 [2023-07-25]
Enhancements:
- Added
dicom-standardconfiguration option to select between local and current DICOM standard edition. - Added
strict-validationconfiguration option to enforce strict DICOM validation or allow Python-parsable values that may not meet the DICOM standard. - Added
uniqueconfiguration option to enforce DICOM uniqueness bySOPInstanceUIDor file hash, removing duplicate DICOMs. - Added
zip-single-dicomconfiguration option to control whether a single DICOM is output as a.dcm.zipor.dcmfile. - Added
debugconfiguration option tomanifest.json. - Added
api-keyinput tomanifest.json.
Fixes:
- Improved DICOM decompression in
standardize_transfer_syntaxto usepylibjpeghandler explicitly with structured error logging on failure.
Maintenance:
- Updated base Docker image from
flywheel/python-gdcm:master.3a9476betoflywheel/python:main.fa0da4dd. - Added
build-essentialandrustupinstallation toDockerfile. - Updated
fw-filefrom^2.3.0to^2.4.0. - Added
pylibjpeg^1.4.0dependency with all extras. - Removed
isort,pylint, andmypydev dependencies. - Moved DICOM config initialization from
main.pytoparser.pyto respect gear configuration at runtime. - Updated tests to support
strict-validationanddicom-standardconfig options, including parameterized validation mode coverage.
0.7.5 [2023-06-29]
Fixes:
- Fixed
fix_patient_sexto properly match"other"as a validPatientSexvalue and map it to"O", rather than falling through to the default case - Fixed
fix_patient_sexto setPatientSexto an empty string instead of"O"when no close match is found for unrecognized values
Maintenance:
- Updated
fw-filefrom^2.1to^2.3.0 - Updated
config.standardattribute toconfig.standard_pathand addedconfig.standard_revset to"2023a" - Marked
test_update_from_tracker_conformingandtest_update_from_event_conformingtests asxfailpending fix in GEAR-4304
Documentation:
- Added supported transfer syntax table to
README.mdfor thestandardize_transfer_syntaxoption
0.7.4 [2023-03-01]
Enhancements:
- Improved
is_dcm()to validate DICOM files by checking for required file-meta tags (FILE_META_TAGS) instead of counting public tags, with fallback toSOPClassUIDpresence. - Added population of missing
SOPClassUIDfromMediaStorageSOPClassUIDwhen not present in DICOM files. add_missing_uid()now returns a detailed dict of modifications made (UIDs added and counts) instead of a boolean, and those modifications are included in output events.TransferSyntaxUIDchanges are now included in output events, improving traceability of transfer syntax conversions.- Added early exit with informational log when no valid DICOMs are found in a collection.
- Updated
standardize_transfer_syntax()to useis_compressedcheck anddcm.dataset.raw.decompress()without a handler name, improving compatibility with available decompression handlers.
Fixes:
- Fixed
standardize_transfer_syntax()to guard againstNonelocalpathwhen constructing log messages. - Fixed
is_dcm()to safely handleNonelocalpathin log messages.
Maintenance:
- Updated
pythonversion constraint from^3.8,<3.11to^3.8,<4. - Updated
pytestpre-commit hook and addedPYTEST_COV_FAIL_UNDER: "90"CI coverage threshold. - Simplified
test_standardize_transfer_syntaxto requiregdcmand assert correct results directly, removing the CSV failure-reporting fixture and deletingtests/test_file_failures.csv.
0.7.3 [2023-02-28]
Fixes:
- Fixed
standardize_transfer_syntaxconfig key not being read correctly inparser.py(was incorrectly readingtransfer_syntax) - Improved transfer syntax conversion logging to include filename and human-readable transfer syntax names instead of raw UIDs
Maintenance:
- Added DICOM standard 2023a
part03.xmlreference document
0.7.2 [2023-02-17]
Maintenance:
- Updated
fw-filefrom^1.4.0to^2.1
0.7.1 [2022-12-07]
Fixes:
- Fixed
update_modified_dicom_infoto gracefully skip events where the DICOM tag or VR cannot be resolved, logging a debug message instead of raising an error - Updated
add_modified_elemcalls to include theVRparameter, aligning with the updatedfw_fileAPI
Maintenance:
- Updated imports of
ReplaceEventandTrackedRawDataElementfromfw_file.dicom.fixertofw_file.dicom.reader - Refactored tests to use
dcm.read_context.dataelem_dictinstead of mockedtrackerobjects - Added test
test_update_from_event_nonexisting_tagto cover graceful handling of unknown DICOM tags in event processing
0.7.0 [2022-11-21]
Enhancements:
- Added DICOM signature detection priority over ZIP file detection to reduce false positives when processing files (GEAR-2841).
- Added DICOM standard
2022ddata bundled with the gear for offline validation support. - Added decoding support for file meta dataset in addition to the main dataset when walking DICOM elements.
- Added
vimto the Docker image for in-container editing.
Fixes:
- Fixed
update_modified_dicom_infoto accept and propagate fix events, ensuring modified element tracking is correctly recorded viadcm.read_context. - Replaced manual
OriginalAttributesSequencepopulation withdcm.update_orig_attrs()to use the canonicalfw_fileAPI. - Fixed DICOM collection loading to raise a clear
RuntimeErrorfor files that are neither a DICOM nor a ZIP archive.
Maintenance:
- Migrated Docker build from
poetrytopipwith arequirements.txtfile, removingpoetry runfrom the entrypoint. - Added
.dockerignoreto minimize build context. - Updated
ReplaceEventimport fromfw_file.dicom.fixertofw_file.dicom.reader. - Updated CI configuration to use
flywheel-io/scientific-solutions/etc/ sse-qa-ci. - Replaced internal tracker API (
dcm.tracker,raw_elem_tracker) withdcm.read_contextto align with updatedfw_fileinternals. - Removed manual DICOM metadata helper functions (
handle_tracker_event,handle_replace_event,add_non_conforming_element) in favor offw_filelibrary methods.
0.6.0 [2022-07-21]
Enhancements:
- Added QC result with
PASS/FAILstate to reflect whether fixes were successfully written;FAILis now reported when fixes were attempted but writing failed.
Fixes:
- Fixed
no_dataelem_fixescontext manager (renamed fromempty_pydicom_callback) to also disablereplace_un_with_known_vrandconvert_wrong_length_to_UNduring write validation, preventing unintended VR inference. - Added error handling in
run()so that a write failure logs the exception, removes any partial output, and returnsNoneinstead of raising.
Maintenance:
- Removed unused dev dependencies
black,coverage,pycodestyle, andpydocstylefrompyproject.toml. - Added
[tool.coverage.run]and[tool.pytest.ini_options]configuration topyproject.toml. - Added tests for write-error handling and expanded
no_dataelem_fixescontext manager test coverage.
Documentation:
- Added
Outputsection toREADME.mddescribing file output behavior and QC result states (PASS/FAIL).
0.5.4 [2022-07-15]
Enhancements:
- Updated file metadata reporting to use
add_qc_result()with a structuredPASS/FAILstate instead ofadd_gear_info(), improving QC result tracking for processed DICOM files.
0.5.3 [2022-06-27]
Enhancements:
- Added
zip-single-dicomconfig option (match,yes,no) to control whether a single DICOM output is saved as a.ziparchive or a bare.dcmfile. - Changed event aggregation to collect unique fix events per DICOM tag across the entire collection rather than per file, reducing noise in reported results.
- Added processing progress logging showing file count and percentage completion.
- Added
trim_eventsto cap per-tag event lists at10entries, summarizing overflow with a count of remaining items.
Fixes:
- Fixed duplicate-removal log message to correctly report when no duplicates are found instead of silently skipping.
- Fixed output write criteria to correctly detect filename changes as a reason to write output.
Maintenance:
- Updated
flywheel-gear-toolkitdependency from^0.5.9to^0.6. - Replaced
add_qc_info/update_file_metadatacalls inrun.pywithcontext.metadata.add_gear_infoandcontext.metadata.add_file_tags. - Added
get_output_filenamehelper to centralize output path logic. - Expanded and refactored test suite for
run,get_output_filename, andparse_config.
Documentation:
- Rewrote
README.mdFixers section to document all applied fixes fromfw-fileand custom fixers, replacing the old Callbacks section.
0.5.1 [2022-06-06]
Enhancements:
- Added
uniqueconfiguration option to detect and remove duplicate DICOM files based onSOPInstanceUIDor file hash.
Fixes:
- Fixed output file naming to strip
.zipsuffix before determining the correct output format when writing processed files.
0.5.0 [2022-04-01]
Enhancements:
- Added
fix_patient_sexfixer to correct invalidPatientSexvalues using fuzzy matching, defaulting toO(other) when no match is found - Added
fix_invalid_modalityfixer to correct invalidModalityvalues using fuzzy matching against known DICOM modalities, defaulting toOT - Added
apply_fixersfunction to apply all post-decoding fixers to a DICOM file - Added
handle_warningsto aggregate and log repeated warnings across an archive with occurrence counts - Added support for
NonconformingModifiedAttributesSequenceinOriginalAttributesSequenceto track non-conforming original values - Added
api-keyinput to gear manifest for read-only API access - Changed
run()return type from list to dict, keyed by filename for per-file event tracking
Fixes:
- Fixed
fix_incorrect_units(formerlyhandle_incorrect_unit) to operate as a post-decoding fixer rather than a pydicom callback, improving reliability - Fixed
update_modified_dicom_infoto correctly handle both tracker events andReplaceEventobjects, including non-conforming values - Fixed
empty_pydicom_callbackto usefw_fileconfigraw_elem_fixersinstead of deprecatedpydicom_configcallback mechanism - Fixed
OriginalAttributesSequencepopulation to includeSourceOfPreviousValuesandNonconformingModifiedAttributesSequence - Fixed DICOM loading to set
pydicom_config.settings.reading_validation_modetoIGNOREto avoid spurious read errors
Maintenance:
- Replaced
callbacks.pymodule withfixers.py, refactoring callback-based fixes into standalone fixer functions usingfw_fileReplaceEvent - Updated
fw-filefrom^0.7to^1.3 - Updated
numpyfrom^1.21.3to^1.22.2 - Updated
flywheel-gear-toolkitfrom^0.2.1to^0.5.9withflywheelextras - Added
flywheel-sdk^16.0.0dependency - Removed
tzlocal,pydicomdirect dependencies (now provided transitively) - Replaced
fw-gear-testingdev dependency withflywheel-sdk^16.0.0 - Updated
Dockerfileto cache dependency installation layer separately from source copy for faster rebuilds - Enabled
pylintpre-commit hook - Updated test fixtures to use
flywheel_gear_toolkit.testinginstead offw_gear_testing - Replaced
test_callbacks.pywithtest_fixers.pyto cover new fixer module
0.4.1 [2022-03-16]
Enhancements:
- Improved
standardize_transfer_syntaxto decompress compressed DICOM pixel data usinggdcmbefore converting transfer syntax, ensuring correct handling of compressed files. - Output is now written when only the transfer syntax was updated, even if no other DICOM elements were modified.
Maintenance:
- Added
GPG_KEYenvironment variable tomanifest.json.
0.4.0 [2021-10-29]
Enhancements:
- Added
standardize_transfer_syntaxconfiguration option (boolean, defaultTrue) to decompress DICOM files and setTransferSyntaxUIDtoExplicitVRLittleEndian. - Added automatic decompression of compressed DICOM
PixelDatausinggdcmwhen compressedTransferSyntaxUIDis detected. - Added
standardize_transfer_syntaxcallback to setTransferSyntaxUIDtoExplicitVRLittleEndian. - Added
numpy^1.21.3dependency.
Fixes:
- Fixed encoding handling in
handle_incorrect_unitto correctly usedefault_encodingwhen no encodings are provided or when a string is passed instead of a list. - Fixed
parse_configto return a resolvedPathobject viaget_input_pathinstead of a raw input dict. - Fixed redundant
context.get_input("dicom")call inrun.pyby reusing the already-fetchedfile_variable when updating tags.
Maintenance:
- Updated
Dockerfilebase image toflywheel/python-gdcm:master.3a9476be. - Updated CI configuration to use
flywheel-io/tools/etc/qa-cipipeline templates. - Updated
pythonversion constraint to^3.8,<3.11. - Updated
runfunction signature to acceptdicom_pathas aPathandtransfer_syntaxas a boolean directly. - Removed
tests/Dockerfilein favor of updated CI tooling. - Improved test reliability for
test_setup_callbacksandtest_empty_pydicom_callbackusingtry/finallyblocks.
Documentation:
- Updated
README.mdto document the newstandardize_transfer_syntaxconfig option andstandardize_transfer_syntaxcallback. - Updated
README.mdto note that the gear decompresses compressedTransferSyntaxUIDs.
0.3.7 [2021-09-27]
Fixes:
- Fixed
is_dcmto handleAttributeErrorandTypeErrorexceptions when processing DICOM tags with unknown keywords
Maintenance:
- Added test coverage for
is_dcmwith unknown/repeater DICOM tags
0.3.6 [2021-06-02]
Fixes:
- Improved
is_dcmcallback to require at least 2 public DICOM tags outside the file meta group (0x0000and0x0002) for more reliable DICOM file detection.
Documentation:
- Updated
README.mdto reflect the revisedis_dcmdefinition for what constitutes a valid DICOM file.
0.3.5 [2021-06-01]
Enhancements:
- Added
is_dcmcallback that filters non-DICOM files (e.g., Mac OSX.DS_Storefiles) from collections before processing.
Fixes:
- Improved error reporting for multiple
SeriesInstanceUIDvalues by logging a count of each detected UID before exiting. - Changed multiple
SeriesInstanceUIDerror handling to callsys.exit(1)instead of raisingValueError.
Maintenance:
- Updated
fw-filedependency from^0.5to^0.7.
0.3.4 [2021-06-01]
Fixes:
- Added
force=Trueparameter toDICOMCollection.from_zipandDICOMCollectioncalls to improve handling of non-conformant DICOM files
0.3.3 [2021-05-28]
Fixes:
- Fixed callback state not being properly restored when errors occur during DICOM processing by wrapping callback setup/teardown in context managers
- Fixed potential interference between
pydicomcallbacks when writing original DICOM attributes by usingempty_pydicom_callbackcontext manager inupdate_modified_dicom_info
Maintenance:
- Moved
setup_callbacksfrommain.pytocallbacks.pyfor better modularity - Added
empty_pydicom_callbackcontext manager tocallbacks.py - Improved test coverage for
setup_callbacksandempty_pydicom_callbackintest_callbacks.py
0.3.2 [2021-05-27]
Fixes:
- Fixed
update_modified_dicom_infoto skip writing DICOM data elements with invalid or unsupported VRs instead of raising aNotImplementedError
Maintenance:
- Updated test fixtures to support passing additional keyword arguments to
raw_data_elemgenerator - Added test coverage for invalid VR handling in
update_modified_dicom_info
0.3.1 [2021-05-26]
Fixes:
- Removed redundant
modalityargument fromcontext.update_file_metadata()call
Maintenance:
- Updated protected branch reference from
mastertomainin pre-commit configuration
0.3.0 [2021-05-26]
Enhancements:
- Added
tagconfiguration option to apply a custom tag to the input file upon run completion (default:dicom-fixer).
Documentation:
- Reorganized
README.mdto improve structure, moving Usage and Configuration sections to the top and correcting a typo inhandle_incorrect_unitdescription.
0.2.1 [2021-05-05]
Documentation:
- Updated
README.mdwith full gear description, callback documentation, and corrected usage instructions fordicom-fixer - Added docstrings to
handle_incorrect_unitanddecode_dcmincallbacks.py - Updated
manifest.jsonURL to point toREADME.md
0.2.0 [2021-05-05]
Enhancements:
- Added
decode_dcmcallback to handle DICOM decoding while skippingOriginalAttributesSequence, preventing corruption of original attributes.
Fixes:
- Fixed
update_modified_dicom_infoto only populateOriginalAttributesSequencewhen attributes were actually modified. - Fixed
add_implementationto only updateImplementationClassUIDandImplementationVersionNamewhen values differ from expected. - Fixed empty events list edge case in output condition that caused incorrect write behavior when no DICOM files had events.
- Fixed
exc_infologging call inhandle_incorrect_unitto use keyword argumentexc_info=True.
Maintenance:
- Updated tests for
add_implementationandupdate_modified_dicom_infoto use proper fixture andFileDatasetsetup.
0.1.1 [2021-05-03]
Maintenance:
- Enabled
PYPIandDOCKER_HUBpublishing in CI configuration.
0.1.0 [2021-05-03]
Enhancements:
- Added
fw_gear_dicom_fixermodule with DICOM file fixing capabilities, including VR mismatch correction andMagneticFieldStrengthunit normalization viahandle_incorrect_unitcallback. - Added
add_missing_uidto detect and populate missingSeriesInstanceUIDandSOPInstanceUIDfields in DICOM collections. - Added
update_modified_dicom_infoto recordOriginalAttributesSequenceand implementation metadata on modified DICOM files. - Added support for processing both ZIP archives and single DICOM files in
run(). - Added QC info reporting via
add_qc_infoand file metadata updates usingcontext.update_file_metadatainrun.py. - Updated gear manifest to accept
dicomfile input instead oftext-input, with DICOM type enforcement.
Fixes:
- Fixed typo in
CONTRIBUTING.md: "udpate" corrected to "update".
Maintenance:
- Updated
flywheel-gear-toolkitfrom^0.1.3to^0.2.1. - Added
pydicom ^2.1.2,fw-file ^0.5, andtzlocal ^2.1as dependencies. - Added
fw-gear-testing ^0.2as a dev dependency. - Optimized
Dockerfilelayer caching by separating dependency installation from project source copy. - Added
.idea/to.gitignore. - Added
tests/conftest.pywith shared fixtures for DICOM collection and raw data element generation. - Added
tests/test_callbacks.py,tests/test_metadata.py, and expandedtests/test_main.pywith comprehensive DICOM fixer test coverage. - Updated
tests/test_parser.pyto reflect newparse_configreturn value.
Documentation:
- Rewrote
README.mdto describe the DICOM fixer gear and added a Contributing section linking toCONTRIBUTING.md.
0.0.1 [2021-03-01]
Maintenance:
- Set up project structure with
poetryfor dependency management usingpython^3.8. - Added
flywheel-gear-toolkit^0.1.3as core dependency. - Configured CI pipeline with
.gitlab-ci.ymlandpre-commithooks includingisort,black,pytest, and JSON validators. - Added
Dockerfilebased onpython:3.8-slimfor gear containerization. - Added test suite with
pytest,pytest-cov, andpytest-mock.
Documentation:
- Added
README.mddescribing gear usage, inputs, and configuration options. - Added
CONTRIBUTING.mdwith setup instructions forpoetryandpre-commit.