Giter VIP home page Giter VIP logo

dicat's Introduction

DICAT (DICOM Anonymization Tool)

DICAT is a simple graphical tool that facilitates DICOM (Digital Imaging and Communications in Medicine) de-identification directly on a local workstation. It was designed to work on all major operating systems (Windows, Linux and OSX) and is very light in terms of dependencies (Python). Binaries (with no dependencies) have been compiled for all operating systems and made available with each release of DICAT.

With the increasing use of web-based database systems, such as LORIS (Das et al., 2011, Das et al., 2016), for large scale imaging studies, de-identification of DICOM datasets becomes a requirement before they can be uploaded in such databases.

Flow Chart

Typical Flow Chart of DICOM de-identification.

Before DICOM datasets can be uploaded into a web-based database, identifying information stored in the DICOM header (such as patient name, date of birth) should be removed.

DICAT produces two archival outputs: a back-up of the original DICOM files, and a de-identified DICOM dataset that can then be uploaded or transferred to other systems.

DICAT also features an ID key log that can be used to keep a record of the original candidate name (participant/patient) linked to their anonymized study identifier, for reference by study coordinators.

DICAT was first developed during the 2014 and 2015 brainhacks held at the Organization of Human Brain Mapping (OHBM) conferences.

How to install and run DICAT

Installation instructions vary depending on the operating system used. See below for detailed information.

Running DICAT will open a window with three different tabs:

  • A simple "Welcome to DICAT" tab giving a short description of the tool
  • A "DICOM de-identifier" tab, in which DICOM de-identification will take place
  • An "ID Key" tab, containing the key between candidates' name and their IDs

Welcome page

Welcome page of DICAT.

Using DICAT executables/applications

Executables of DICAT have been created for most systems and can be found with each release of DICAT in the Github repository. Download the executable relevant to your system and move it to any folder of your choice.

To open DICAT, simply double click on the executable.

Please note that for some obscure reason, DICAT is extremely slow to run on Windows OS.

From the source code

Requirements

Before running DICAT, make sure your system contains a Python 3 compiler with the TkInter library (usually, TkInter comes by default with most Python installations).

For Ubuntu distributions, TkInter can be installed via apt-get: sudo apt-get install python-tk

The PyDICOM package is also required by DICAT.

For most platform, PyDICOM can be installed via pip: pip install pydicom

DICAT installation

To install DICAT source code on a computer, download and save the content of the current Github repository into a workstation.

DICAT can be started by executing DICAT.py script with a Python compiler. On UNIX computers (Linux and Mac OS X), open a terminal, go to the main directory of DICAT source code (dicat directory) and run the following: python DICAT.py

How to use the DICOM de-identifier of DICAT?

DICOM deidentifier 1

DICOM de-identification with the DICAT GUI

In the "DICOM de-identifier" tab (1), use the select button (2) to choose a directory containing DICOM files to de-identify.

Once a directory containing DICOM files have been selected (as described in the above section), the DICOM fields can be viewed when clicking on the “View DICOM fields” button (3).

The DICOM identifiable fields will be displayed in a table with editable fields (4).

Users can choose to delete all identifiable fields using the “Clear All Fields” button (5).

Users can also directly edit the fields (6) in the table and all values present in the table will be inserted into the corresponding DICOM fields in the imaging files.

Note that the PatientName field is required (7) and will need to be filled with new IDs in order to label the scan for that session.

Finally, once the user has finalized the edits, clicking on the “De-identify” button (8) will run the de-identification tool on the DICOM dataset.

Mass DICOM de-identification using mass_deidentify.py

The script mass_deidentify.py in the dicat directory allows a user to mass de-identify a series of DICOM studies. Running mass_deidentify.py -h will display the following information on how to run the script:

Mass_deidentify_help

How to use the ID Key of DICAT

The ID Key feature of DICAT allows storage of the key between identifiable candidates's information (Real Name and Date of Birth) and its study’s identifier. This information will be stored locally on the workstation within an XML file (candidate.xml) in DICAT's directory. See the following figure for detailed information on how to use this feature.

ID Key

ID key feature of DICAT.

This feature (1) allows storage of the mapping information between candidates’s information and study IDs. This information will be stored in an XML file that can be either created (2) or opened (3). Changes will be automatically saved.

A candidate (participant/patient) can be looked up using the “Search candidate” button (5) after having entered either the “Identifier” or the “Real Name” text fields available in (4).

The “Clear fields” button (6) allows clearing the text in those text fields.

A new candidate can be registered using the “Add candidate” button (7) after having entered the “Identifier”, “Real Name” and “Date of birth” information in the text fields of (4).

Clicking on a subject row (8) of the table displayed at the bottom of the application will automatically populate the text fields (4) with the information of the candidate.

The “Real Name” or “Date of birth” of that candidate can be edited if needed by altering the field and clicking on the “Edit candidate” button (9).

Finally, the data table of candidate is sortable by clicking on any of the column headers (10).

Authors

Ayan Sengupta [email protected] - Concept, Pydicom implementation

Cecile Madjar [email protected] - GUI implementation, PyDICOM implementation, python integration of DICOM-toolkit, ID key

Dave MacFarlane [email protected] - ID Key

Samir Das [email protected] - Concept and guidance

Daniel Krötz [email protected] - Documentation, testing on Windows

Christine Rogers [email protected] - Documentation

Leigh Evans [email protected] - Video tutorial

Derek Lo [email protected] - Logo design

dicat's People

Contributors

ayansengupta avatar cmadjar avatar driusan avatar gluneau avatar jkat avatar karolinamara avatar maltheism avatar maximemulder avatar olgatsib avatar regisoc avatar samirdas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dicat's Issues

Scheduler - Change the way the scheduler data is stored to XML

  • Main page of the scheduler is now reading the XML file. (done)
  • Modify ID Mapper to be able to read the new XML structure and IDs. (done)
  • Write to the XML file. (done)
  • Implement opening of an existing XML file. (done)
  • Implement creation of an new XML database file based on a template.
  • Get rid of pickle dependency. (done)

Scheduler - Implement possibility to edit a visit content using the edit button

  • Instead of having the visit displayed as labels in the Calendar section of the data window, have them displayed as Entries/Dropdowns and disable the edit by default
  • Clicking on the Edit button next to the row should enable the fields of that row to be edited and saved.
  • Replace edit button by save button when in edition mode
  • Add cancel/delete buttons next to the edit/save button. When in edition mode, save and cancel buttons will be on top. When in readonly mode, Edit and Delete button will be on top.
  • Implement delete button action (display message are you sure? If yes, delete the visit from XML file and data tables)
  • Implement cancel button action (display a message are you sure? If yes, refresh the visit row with old values, if not, stay in edit mode.
  • Implement save button action (grep new values from the row, save them in the XML file and update the data tables)

Scheduler - Calendar functionality

  • Have a pop up calendar a bit like google calendar where you are able to enter subject directly into the calendar
  • Automatically open to today's date

DICAT - Language selection

  • Make language selection dynamic
  • Extend the language selection to other tabs that just the scheduler
  • In datatable.py, around line 173: change for non-language parameter for visit status active & tentative that are hard-coded.

Add license

Hey this should have a license! Maybe GPLv3 like LORIS?

PatientName should not be empty, application will stall forever

This error will occur if PatientName left blank and clicking De-identify

python DicAT_application.py
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1413, in __call__
    return self.func(*args)
  File "/home/gluneau/DICAT/dicat/dicom_anonymizer_frame.py", line 245, in collect_edited_data
    self.dirname, self.field_dict)
  File "/home/gluneau/DICAT/dicat/lib/dicom_anonymizer_methods.py", line 244, in dicom_zapping
    subdirs_list)
  File "/home/gluneau/DICAT/dicat/lib/dicom_anonymizer_methods.py", line 420, in create_directories
    os.mkdir(original_dir, 0755)
OSError: [Errno 17] File exists: '/home/gluneau/aaa/bbb/CCC6029_902717_V24_RES/'

See pull request #81

[DICOM deidentifier] remove white space from fields to zap

Using the mass_deidentify.py, white space can be introduced in edited fields which might cause some failure when submitting the DICOM studies to LORIS-MRI.

Solution: remove the white leading and trailing spaces from the edited fields.

Datafield not deleted

Hi,
I am trying to additionally delete a data field. I have added it to the XML:

XML

But after running it’s still there:
Datafileld still there

Scheduler - implement creation of new visits

  • Create the new visit button
  • Call check_visit_data with options (self.candidate, 'new') (in visit.py)
  • Modify save_visit_data function in datamanagement.py to save new visits for a given candidate

Scheduler - Scripts clean up

Check that the following scripts are not used anywhere. If not used, remove it.

  • newcandidatewindow.py script (removed)
  • create_alldata.py script (removed)
  • remove *kwargs option from scheduler_candidate.py

Comment and clean up the code of the following scripts:

  • lib/init.py
  • lib/config.py
  • lib/datamanagement.py
  • lib/dicom_anonymizer_methods.py
  • lib/multilanguage.py
  • lib/resource_path_methods.py
  • lib/utilities.py
  • ui/init.py
  • ui/datatable.py
  • ui/datawindow.py (#50)
  • ui/dialogbox.py
  • ui/menubar.py
  • ui/projectpane.py
  • DICAT_application.py
  • dicom_anonymizer_frame.py
  • IDMapper.py
  • scheduler_application.py
  • scheduler_candidate.py
  • scheduler_visit.py
  • welcome_frame.py

Cursor only shows progress if hovering over "Dicom Field" column

In the DICOM de-identifier tab, after clicking "De-identify" the only way to tell that it's currently working is by hovering the mouse over the "Dicom Field" column of the table and seeing that the cursor changes to a spinning wheel.

If you hover anywhere else, the cursor goes back to normal and it looks like the progress is done but nothing has happened.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.