You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-305Lines changed: 9 additions & 305 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,313 +25,17 @@ Dicom fields are separated into different groups. Each groups will be anonymized
25
25
26
26
`dicom-anonymizer` is designed to retain date information within DICOM files, and will anonymize them rather than removing them entirely. This approach is taken to prevent potential crashes in certain applications that rely on these dates to work. This behavior complies with the DICOM standard, as mentioned in section [E.3.6](https://dicom.nema.org/medical/dicom/current/output/html/part15.html#sect_E.3.6).
27
27
28
-
#How to install it?
28
+
## Documentation
29
29
30
-
Installation can be done via pip `pip install dicom-anonymizer` or conda `conda install -c conda-forge dicom-anonymizer`.
30
+
-[Installation](./doc/Setup_build_test.md)
31
+
-[Usage](./doc/Usage)
31
32
33
+
## State of the library
32
34
33
-
# Local Development Setup
35
+
At this present time, Kitware has no plan to implement new features in dicom-anonymizer.
36
+
If you have funding to further develop this tool, feel free to reach out to Kitware.
37
+
Whenever possible, Kitware will try to fix bugs that affect the use of the project and merge requests from the community will be considered, feel free to [open an issue](https://github.com/KitwareMedical/dicom-anonymizer/issues?q=is%3Aissue%20state%3Aopen%20label%3Aenhancement) to suggest new features.
34
38
35
-
To get started with local development, follow these steps:
39
+
## Financing
36
40
37
-
1. Create a Virtual Environment:
38
-
- On Windows:
39
-
```sh
40
-
virtualenv env
41
-
.\env\Scripts\activate.bat
42
-
```
43
-
- On MacOS/Linux:
44
-
```sh
45
-
python -m venv env
46
-
source env/bin/activate
47
-
```
48
-
49
-
2. Install Dependencies:
50
-
- Install an editable version of the package and the development requirements:
51
-
```sh
52
-
pip install -e .[dev]
53
-
```
54
-
55
-
3. Set Up Pre-Commit Hooks:
56
-
- Install the pre-commit hooks to ensure code quality:
57
-
```sh
58
-
pre-commit install
59
-
```
60
-
61
-
62
-
## How to test it?
63
-
64
-
To run the unit tests, use the following command:
65
-
66
-
```sh
67
-
pytest
68
-
```
69
-
70
-
71
-
# How to build it?
72
-
These instructions rely on wheel build-package format. Install it if you have not done it already using:
73
-
`pip install wheel`
74
-
75
-
The sources files can be packaged by using:
76
-
`python ./setup.py bdist_wheel`
77
-
78
-
This command will generate a wheel package in`dist` folder which can be then installed as a python package using
`'./dist/dicom_anonymizer-1.0.13-1-py2.py3-none-any.whl' looks like a filename, but the file does not exist`,
83
-
this could be due to pip not being able to handle relative path (See issue https://github.com/pypa/pip/issues/10808). As a work-around, change directory to `dist` and then install it using
This will apply the `ActionName` to the tag `'(0x0001, 0x0001)'` and `ActionName2` to `'(0x0001, 0x0005)'`
130
-
131
-
**Note**: ActionName has to be defined in [actions list](#actions-list)
132
-
133
-
Example 1: The default behavior of the patient's ID is to be replaced by an empty or null value. If you want to keep this value, then you'll have to run :
> DICOMDIR anonymization is not specified. It is therefore discouraged and it is recommended to regenerate new DICOMDIR files after anonymizing the original DICOM files.
152
-
153
-
DICOMDIR files can have a `(0x0004, 0x1220) Directory Record Sequence` tag that can contain patient information.
154
-
However, this tag is not part of the standard tag to anonymize set. If you still want dicom-anonymizer to anonymize it, you have to instruct it explicitly:
See the full application in the `examples` folder.
296
-
297
-
For more information about the pydicom's Dataset, please refer [here](https://pydicom.github.io/pydicom/stable/reference/generated/pydicom.dataset.Dataset.html).
298
-
299
-
You can also add `extra_anonymization_rules` as above:
| empty | Replace with a zero length value, or a non-zero length value that may be a dummy value and consistent with the VR** |
309
-
| delete | Completely remove the tag |
310
-
| keep | Do nothing on the tag |
311
-
| replace_UID | Replace all UID's number with a random one in order to keep consistent. Same UID will have the same replaced value |
312
-
| empty_or_replace | Replace with a non-zero length value that may be a dummy value and consistent with the VR**|
313
-
| delete_or_empty | Replace with a zero length value, or a non-zero length value that may be a dummy value and consistent with the VR**|
314
-
| delete_or_replace | Replace with a non-zero length value that may be a dummy value and consistent with the VR**|
315
-
| deleteOrEmptyOrReplace | Replace with a non-zero length value that may be a dummy value and consistent with the VR**|
316
-
| delete_or_empty_or_replace_UID | If it's a UID, then all numbers are randomly replaced. Else, replace with a zero length value, or a non-zero length value that may be a dummy value and consistent with the VR** |
317
-
|regexp| Find a value in the tag using a regexp and replace it with an arbitrary value. See the examples in this file to learn how to use.|
318
-
|replace_with_value| Replace the tag value with an arbitrary value. See the examples in this file to learn how to use.
319
-
320
-
321
-
** VR: Value Representation
322
-
323
-
Work originally done by Edern Haumont
324
-
325
-
# Change the DICOM anonymization standard
326
-
327
-
You can customize the DICOM standard that will be used to anonymize the dataset by giving an argument `base_rules_gen` to the function `anonymize_dicom_file` or `anonymize_dataset`.
328
-
The value should be a function returning a dict of anonymization rules. Use the function `initialize_actions` to create such dict from a anonymization database from the folder `dicomanonymizer/dicom_anonymization_databases`.
329
-
330
-
Example:
331
-
```python
332
-
from dicomanonymizer.simpledicomanonymizer import anonymize_dataset, initialize_actions
`'./dist/dicom_anonymizer-1.0.13-1-py2.py3-none-any.whl' looks like a filename, but the file does not exist`,
59
+
this could be due to pip not being able to handle relative path (See issue https://github.com/pypa/pip/issues/10808). As a work-around, change directory to `dist` and then install it using
0 commit comments