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
@@ -21,314 +21,21 @@ Dicom fields are separated into different groups. Each groups will be anonymized
21
21
| X_Z_U_STAR_TAGS | 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**|
22
22
| ALL_TAGS | | Contains all previous defined tags
23
23
24
+
## Quirks
24
25
25
-
# How to install it?
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).
26
27
27
-
Installation can be done via pip `pip install dicom-anonymizer` or conda `conda install -c conda-forge dicom-anonymizer`.
28
+
## Documentation
28
29
30
+
-[Installation](./doc/Setup_build_test.md)
31
+
-[Usage](./doc/Usage)
29
32
30
-
#Local Development Setup
33
+
## State of the library
31
34
32
-
To get started with local development, follow these steps:
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.
33
38
34
-
1. Create a Virtual Environment:
35
-
- On Windows:
36
-
```sh
37
-
virtualenv env
38
-
.\env\Scripts\activate.bat
39
-
```
40
-
- On MacOS/Linux:
41
-
```sh
42
-
python -m venv env
43
-
source env/bin/activate
44
-
```
39
+
## Financing
45
40
46
-
2. Install Dependencies:
47
-
- Install an editable version of the package and the development requirements:
48
-
```sh
49
-
pip install -e .[dev]
50
-
```
51
-
52
-
3. Set Up Pre-Commit Hooks:
53
-
- Install the pre-commit hooks to ensure code quality:
54
-
```sh
55
-
pre-commit install
56
-
```
57
-
58
-
59
-
## How to test it?
60
-
61
-
To run the unit tests, use the following command:
62
-
63
-
```sh
64
-
pytest
65
-
```
66
-
67
-
68
-
# How to build it?
69
-
These instructions rely on wheel build-package format. Install it if you have not done it already using:
70
-
`pip install wheel`
71
-
72
-
The sources files can be packaged by using:
73
-
`python ./setup.py bdist_wheel`
74
-
75
-
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`,
80
-
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)'`
127
-
128
-
**Note**: ActionName has to be defined in [actions list](#actions-list)
129
-
130
-
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.
149
-
150
-
DICOMDIR files can have a `(0x0004, 0x1220) Directory Record Sequence` tag that can contain patient information.
151
-
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.
293
-
294
-
For more information about the pydicom's Dataset, please refer [here](https://pydicom.github.io/pydicom/stable/reference/generated/pydicom.dataset.Dataset.html).
295
-
296
-
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** |
306
-
| delete | Completely remove the tag |
307
-
| keep | Do nothing on the tag |
308
-
| replace_UID | Replace all UID's number with a random one in order to keep consistent. Same UID will have the same replaced value |
309
-
| empty_or_replace | Replace with a non-zero length value that may be a dummy value and consistent with the VR**|
310
-
| 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**|
311
-
| delete_or_replace | Replace with a non-zero length value that may be a dummy value and consistent with the VR**|
312
-
| deleteOrEmptyOrReplace | Replace with a non-zero length value that may be a dummy value and consistent with the VR**|
313
-
| 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** |
314
-
|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.|
315
-
|replace_with_value| Replace the tag value with an arbitrary value. See the examples in this file to learn how to use.
316
-
317
-
318
-
** VR: Value Representation
319
-
320
-
Work originally done by Edern Haumont
321
-
322
-
# Change the DICOM anonymization standard
323
-
324
-
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`.
325
-
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`.
326
-
327
-
Example:
328
-
```python
329
-
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