-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dicom-anonymiser Generic Wrapper Microservice #1679
Conversation
This commit introduces a new class, DicomAnonymiser, which implements the IDicomAnonymiser interface. This class is responsible for anonymising DICOM files, a common format for medical imaging data. The DicomAnonymiser class uses a configuration file to set up paths for various resources. It then uses these paths to create a process that runs a shell script for anonymising the DICOM files. The class also includes error handling to ensure that any issues during the anonymisation process are logged and appropriately handled.
…eter This commit modifies the Anonymise method in the IDicomAnonymiser interface to include an additional ExtractFileMessage parameter. This change allows the method to use the message's modality when anonymising the specified source file to the destination file.
This commit adds the DicomAnonymiser value to the AnonymiserType enum. This value represents the DICOM file anonymiser and is assigned the integer value of 1. This allows for clear and type-safe references to the DICOM anonymiser throughout the codebase.
This commit updates the AnonymiserFactory to create a new instance of DicomAnonymiser when the DicomAnonymiser type is specified. This allows the factory to produce the correct anonymiser based on the provided AnonymiserType.
This commit updates the DicomAnonymiserConsumer class to use the DicomAnonymiser for anonymising files. The Anonymise method is called with the message, source file, and destination file as parameters. This change integrates the DicomAnonymiser into the consumer's workflow.
This commit adds a new configuration file, DicomAnonymiserConfigs.json. This file contains paths for the virtual environment, shell script, DICOM pixel anonymiser, and SMI services. These paths are used by the DicomAnonymiser class to set up the necessary resources for anonymising DICOM files.
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still a little early in development for a full review, but I've left one comment in the meantime. Happy to discuss working in the GlobalOptions class and working through some of the TODOs!
src/microservices/Microservices.DicomAnonymiser/Anonymisers/AnonymiserType.cs
Outdated
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1679 +/- ##
==========================================
- Coverage 59.82% 59.19% -0.63%
==========================================
Files 176 177 +1
Lines 6312 6391 +79
Branches 861 877 +16
==========================================
+ Hits 3776 3783 +7
- Misses 2294 2363 +69
- Partials 242 245 +3 ☔ View full report in Codecov by Sentry. |
…rors whilst executing cohort extractor Merge tag 'tags/v5.6.1' into feature/dicom-anonymiser
for more information, see https://pre-commit.ci
Proposed Changes
This pull request is initiated to review development progress against gitlab issue #137 which is to design a C# generic wrapper microservice that can call external scripts to anonymise DICOM files.
Proposed Changes (06-02-2024):
As a reusable component, this microservice takes a message, performs CTP anonymisation followed by SR anonymisation or DICOM anonymisation on the dicom file based on the image modality. It creates a new anonymised file, and finally generates a message containing the new filename. Additionally, the microservice is able to handle the failure of the script.
DicomAnonymiser
toDefaultAnonymiser
that implements theIDicomAnonymiser
interface responsible for anonymising DICOM files.Anonymise
method across 3 different anonymisation methods (CreateCTPProcess
,CreateDICOMProcess
,CreateSRProcess
) which creates the required process based on different configs.CreateDICOMToTextProcess
responsible for converting dicom files to text required byCreateSRProcess
.DicomAnonymiserConfigs.json
with additional paths required for setting up CTP and SR anonymisation process.DicomAnonymiserConsumer
class to include aDicomFile
object using the FellowOakDicom package to extract message modality.GlobalOptions.cs
class with the required dicom anonymiser configurations and removedDicomAnonymiserConfigs.json
altogether.Proposed Changes (22-11-2023):
As a reusable component, this microservice takes a message, performs pixel data anonymisation on the dicom file, creates a new anonymised file, and finally generates a message containing the new filename. Additionally, the microservice is able to handle the failure of the script.
DicomAnonymiser
that implements theIDicomAnonymiser
interface responsible for anonymising DICOM files.Anonymise
method in theIDicomAnonymiser
interface to include an additionalExtractFileMessage
parameter.DicomAnonymiser
value to theAnonymiserType
enum to represent the DICOM file anonymiser.AnonymiserFactory
to create a new instance ofDicomAnonymiser
when theDicomAnonymiser
type is specified.DicomAnonymiserConfigs.json
which contains paths setting up the anonymisation process.DicomAnonymiserConsumer
class to use theDicomAnonymiser
for anonymising files.Service Documentation:
DRAFT-Dicom-Anonymiser Generic Wrapper Microservice-221123
Types of changes
What types of changes does your code introduce? Tick all that apply.
[skip ci]
Checklist
By opening this PR, I confirm that I have:
Issues
If relevant, tag any issues that are expected to be resolved with this PR. E.g.: