Skip to content

Commit

Permalink
Merge pull request #202 from pydicom/add/new-ctp-rules
Browse files Browse the repository at this point in the history
updating or adding new ctp rules
  • Loading branch information
vsoch authored Mar 23, 2022
2 parents a0c630e + d0fcfc7 commit 2718b7e
Show file tree
Hide file tree
Showing 44 changed files with 135 additions and 60 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
name: Codespell
name: Check for Typos

on:
push:
Expand All @@ -15,3 +14,6 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: codespell-project/actions-codespell@de089481bd65b71b4d02e34ffb3566b6d189333e
uses: crate-ci/typos@592b36d23c62cb378f6097a292bc902ee73f93ef # version 1.0.4
with:
files: ./deid ./docs/_docs ./docs/README.md ./docs/pages ./examples
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ and **Merged pull requests**. Critical items to know are:
Referenced versions in headers are tagged on Github, in parentheses are for pypi.

## [vxx](https://github.com/pydicom/deid/tree/master) (master)
- various LGTM alert fixes [#186](https://github.com/pydicom/deid/pull/186)
- update CTP deid.dicom up until [this commit](https://github.com/johnperry/CTP/commit/345b05b157c046532e8791a63ababbf6d0dba59b) (0.2.29)
- various LGTM alert fixes [#186](https://github.com/pydicom/deid/pull/186) (0.0.28)
- bug fix for exception when attempting to jitter DA/DT which cannot be jittered (space) [#189] (https://github.com/pydicom/deid/issues/189) (0.2.27)
- adding support to manipulate file meta [#183](https://github.com/pydicom/deid/issues/183) (0.2.26)
- updated pydicom dependency from 1.3.0 to 2.1.1 [#171](https://github.com/pydicom/deid/issues/171) (0.2.25)
Expand Down
4 changes: 1 addition & 3 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
MIT License

Copyright (c) 2017-2021 Vanessa Sochat
Copyright (c) 2017-2022 Vanessa Sochat

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 1 addition & 3 deletions deid/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
DeidRecipe
Copyright (c) 2017-2021 Vanessa Sochat
Copyright (c) 2017-2022 Vanessa Sochat
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -32,8 +32,6 @@
from deid.config.standards import actions, sections, formats

from deid.logger import bot
import os
import re


class DeidRecipe:
Expand Down
2 changes: 1 addition & 1 deletion deid/config/standards.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
Copyright (c) 2017-2021 Vanessa Sochat
Copyright (c) 2017-2022 Vanessa Sochat
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion deid/config/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
Copyright (c) 2017-2021 Vanessa Sochat
Copyright (c) 2017-2022 Vanessa Sochat
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion deid/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from deid.data import get_dataset
Copyright (c) 2017-2021 Vanessa Sochat
Copyright (c) 2017-2022 Vanessa Sochat
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
92 changes: 84 additions & 8 deletions deid/data/deid.dicom
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,36 @@ LABEL Overlay # (CTP)
+ contains OverlayDescription Siemens MedCom Object Graphics
coordinates 0,0,512,90


LABEL Philips PT # (CTP)
contains Modality PT
+ contains Manufacturer Philips
+ contains ManufacturerModelName GEMINI
+ equals Rows 446
+ equals Columns 245
coordinates 0,0,125,50

LABEL Philips PT # (CTP)
contains Modality PT
+ contains Manufacturer Philips
+ contains ManufacturerModelName GEMINI
+ equals Rows 445
+ equals Columns 493
coordinates 0,0,140,55

LABEL Philips PT # (CTP)
contains Modality PT
+ contains Manufacturer Philips
+ contains ManufacturerModelName GEMINI
+ equals Rows 373
+ equals Columns 492
coordinates 0,0,100,25

LABEL MINDRAY # (CTP)
contains Modality US
+ contains ImplementationVersionName MINDRAY
coordinates 0,0,1229,69

LABEL Logiq US (LOGIQ9) # (CTP)
contains Modality US
+ contains Manufacturer GE
Expand Down Expand Up @@ -227,14 +257,14 @@ LABEL EPIQ 7G # (CTP)
+ contains Manufacturer Philips
+ equals Rows 600
+ contains ManufacturerModelName EPIQ
coordinates 0,0,800,59
coordinates 0,0,1024,49

LABEL EPIQ 7G # (CTP)
contains Modality US
+ contains Manufacturer Philips
+ equals Rows 768
+ contains ManufacturerModelName EPIQ
coordinates 0,0,800,59
coordinates 0,0,1024,49

LABEL EPIQ 7G # (FFUR)
contains Modality US
Expand All @@ -249,6 +279,11 @@ LABEL CX50 # (CTP)
+ contains ManufacturerModelName CX50
coordinates 0,0,800,59

LABEL EPIQ_7G (CTP)
+ contains Manufacturer EPIQ
+ equals Rows 600|768
coordinates 0,0,800,59

LABEL Z_ONE # (CTP)
contains Modality US
+ contains Manufacturer Zonare
Expand Down Expand Up @@ -352,7 +387,7 @@ LABEL Acuson Sequoia # (CTP)
+ contains ManufacturerModelName SEQUOIA
coordinates 0,0,640,30

LABEL Aplio 400 or 500 # (CTP)
LABEL Toshiba Aplio 400 or 500 # (CTP)
contains Modality US
+ contains Manufacturer TOSHIBA
+ equals Rows 720
Expand Down Expand Up @@ -396,6 +431,20 @@ LABEL Supersonic Imagine 5A # (CTP)
+ contains ManufacturerModelName Aixplorer
coordinates 0,0,1400,89

LABEL SENO # (CTP)
contains Modality US
+ contains Manufacturer SENO
+ equals Rows 1058
+ equals Columns 1920
coordinates 161,0,1632,50

LABEL SENO Cine # (CTP)
contains Modality US
+ contains Manufacturer SENO
+ equals Rows 1056
+ equals Columns 1920
coordinates 161,0,1632,50

LABEL Canon CR/DR # (CTP)
contains Modality MRI
+ contains Manufacturer Canon
Expand All @@ -410,17 +459,44 @@ LABEL Siemens NM # (CTP)
+ equals Rows 860
+ contains ManufacturerModelName CXD1
+ contains ImageType SECONDARY
coordinates 0,0,1132,82
coordinates 0,0,1132,90
coordinates 0,780,1132,80

LABEL Siemens NM # (CTP)
contains Modality NM
+ contains Manufacturer Siemens
+ equals Rows 860
+ contains ImageType SECONDARY
coordinates 0,0,1132,90
coordinates 0,780,1132,80

LABEL Siemens NM # (CTP)
contains Modality NM
+ contains Manufacturer Siemens
+ equals Rows 865
+ contains ImageType SECONDARY
coordinates 0,0,1132,35

LABEL Siemens NM # (CTP)
contains Modality NM
+ contains Manufacturer Siemens
+ equals Rows 882
+ contains ImageType SECONDARY
coordinates 0,0,1132,65

LABEL ADAC # (CTP)
equals Rows 832
+ equals Columns 1024
+ contains Manfacturer ADAC
coordinates 0,0,1024,80
coordinates 0,762,1024,80

LABEL ADAC # (CTP)
contains Modality Other
+ contains Manufacturer ADAC
+ equals Rows 832
equals Rows 832
+ equals Columns 1024
+ contains Manfacturer ADAC
coordinates 0,0,1024,60
+ contains ProtocolName DUAL DETEC
coordinates 0,0,1024,130
coordinates 0,762,1024,80

LABEL MEDRAD Injection Profile # (CTP)
Expand Down
2 changes: 1 addition & 1 deletion deid/dicom/actions.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
Copyright (c) 2017-2021 Vanessa Sochat
Copyright (c) 2017-2022 Vanessa Sochat
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion deid/dicom/fields.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
Copyright (c) 2017-2021 Vanessa Sochat
Copyright (c) 2017-2022 Vanessa Sochat
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion deid/dicom/filter.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
Copyright (c) 2017-2021 Vanessa Sochat
Copyright (c) 2017-2022 Vanessa Sochat
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion deid/dicom/groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
groups: functions to derive groups of fields or values
Copyright (c) 2020-2021 Vanessa Sochat
Copyright (c) 2020-2022 Vanessa Sochat
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion deid/dicom/header.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
header.py: functions to extract identifiers from dicom headers
Copyright (c) 2017-2021 Vanessa Sochat
Copyright (c) 2017-2022 Vanessa Sochat
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions deid/dicom/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
parser.py: class that supports dicom extraction and replacement of fields.
Copyright (c) 2017-2021 Vanessa Sochat
Copyright (c) 2017-2022 Vanessa Sochat
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -344,7 +344,7 @@ def perform_action(self, field, value, action, filemeta=False):
values = self.lookup.get(re.sub("^values:", "", field), [])
fields = self.find_by_values(values=values)

# A fields list is used vertabim
# A fields list is used vertbatim
# In expand_field_expression below, the stripped_tag is being passed in to field. At this point,
# expanders for %fields lists have already been processed and each of the contenders is an
# identified, unique field. It is important to use stripped_tag at this point instead of
Expand Down
4 changes: 2 additions & 2 deletions deid/dicom/pixels/clean.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
clean.py: functions for pixel scrubbing
Copyright (c) 2017-2021 Vanessa Sochat
Copyright (c) 2017-2022 Vanessa Sochat
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -322,7 +322,7 @@ def save_animation(self, output_folder=None, image_type="cleaned", title=None):
enough frames, then save_png should be used instead.
"""
if hasattr(self, image_type):
from matplotlib import animation, rc
from matplotlib import animation

animation.rcParams["animation.writer"] = "ffmpeg"

Expand Down
2 changes: 1 addition & 1 deletion deid/dicom/pixels/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
detect.py: functions for pixel scrubbing
Copyright (c) 2017-2021 Vanessa Sochat
Copyright (c) 2017-2022 Vanessa Sochat
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion deid/dicom/tags.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
Copyright (c) 2017-2021 Vanessa Sochat
Copyright (c) 2017-2022 Vanessa Sochat
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion deid/dicom/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
Copyright (c) 2017-2021 Vanessa Sochat
Copyright (c) 2017-2022 Vanessa Sochat
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion deid/dicom/validate.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
Copyright (c) 2017-2021 Vanessa Sochat
Copyright (c) 2017-2022 Vanessa Sochat
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion deid/logger/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
logger/message.py: Python logger base
Copyright (c) 2016-2021 Vanessa Sochat
Copyright (c) 2016-2022 Vanessa Sochat
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion deid/main/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

"""
Copyright (c) 2017-2021 Vanessa Sochat
Copyright (c) 2017-2022 Vanessa Sochat
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion deid/main/identifiers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

"""
Copyright (c) 2017-2021 Vanessa Sochat
Copyright (c) 2017-2022 Vanessa Sochat
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion deid/main/inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

"""
Copyright (c) 2017-2021 Vanessa Sochat
Copyright (c) 2017-2022 Vanessa Sochat
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion deid/tests/Xtest_dicom_header.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
The MIT License (MIT)
Copyright (c) 2016-2021 Vanessa Sochat
Copyright (c) 2016-2022 Vanessa Sochat
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion deid/tests/common.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python

"""
Copyright (c) 2016-2021 Vanessa Sochat
Copyright (c) 2016-2022 Vanessa Sochat
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion deid/tests/test_clean.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
Test DICOM Cleaner
Copyright (c) 2016-2021 Vanessa Sochat
Copyright (c) 2016-2022 Vanessa Sochat
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading

0 comments on commit 2718b7e

Please sign in to comment.