johnperry / CTP

Clinical Trial Processor
http://mircwiki.rsna.org/index.php?title=CTP_Articles
65 stars 55 forks source link

Using the CTP DicomAnonymizer in a stand-alone Java program #13

Open tfpenn opened 7 years ago

tfpenn commented 7 years ago

Hi,

I'm looking for a way to really automate the anonymization process using the CTP dicom anonymizer as a stand-alone Java program without the gui. Is this possible? If so, can you recommend any examples?

Thank you.

dsbelden commented 7 years ago

I’m doing precisely that sort of thing at the University of Wisconsin–Madison Department of Radiology. The method I’ve been using is pretty cumbersome but it does work. I’d be very interested in discussing this further with anyone interested, particularly as I’m hoping to present what I’m doing at SIIM next year and I’d like to have a better method by then. What’s the preferred way to have those kinds of conversations?

johnperry commented 7 years ago

The best place to have discussions like this is in the CTP Google Group:

https://groups.google.com/forum/#!forum/rsnas-ctpmirc-user-group

As to your specific question, it is possible to write a stand-alone program to use the CTP DICOM Anonymizer. (For example, the DicomEditor program is such a stand-alone program, although since it has a GUI, it isn't what you want.)

Assuming you have read http://mircwiki.rsna.org/index.php?title=Setting_Up_a_MIRC_Development_Environment and you are familiar with the code, the class you want is:

org.rsna.ctp.stdstages.anonymizer.dicom.DICOMAnonymizer

You should look at:

    org.rsna.ctp.stdstages.DicomAnonymizer

to see how to call it.

Note that other CTP classes are used to encapsulate the anonymizer script, the lookup table, and the integer table. The last two are optional as long as the script doesn't reference them. You will have to include several libraries on the classpath (at least CTP.jar, util.jar, and dcm4che.jar) to get access to all the classes that you – and the anonymized – need.

If you look around line 153 in DicomAnonymizer, you'll see that the call to the DICOMAnonymizer class is very simple:

DAScript dascript = DAScript.getInstance(scriptFile); Properties script = dascript.toProperties(); Properties lookup = LookupTable.getProperties(lookupTableFile); AnonymizerStatus status = DICOMAnonymizer.anonymize(file, file, script, lookup, intTable, false, false);

JP

From: tfpenn Sent: Friday, October 28, 2016 4:01 PM To: johnperry/CTP Subject: [johnperry/CTP] Using the CTP DicomAnonymizer in a stand-alone Java program (#13)

Hi,

I'm looking for a way to really automate the anonymization process using the CTP dicom anonymizer as a stand-alone Java program without the gui. Is this possible? If so, can you recommend any examples?

Thank you.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

johnperry commented 7 years ago

I just sent this reply to the other fellow asking the same question I don't know if you can see that thread.

The best place to have discussions like this is in the CTP Google Group:

https://groups.google.com/forum/#!forum/rsnas-ctpmirc-user-group

As to your specific question, it is possible to write a stand-alone program to use the CTP DICOM Anonymizer. (For example, the DicomEditor program is such a stand-alone program, although since it has a GUI, it isn't what you want.)

Assuming you have read http://mircwiki.rsna.org/index.php?title=Setting_Up_a_MIRC_Development_Environment and you are familiar with the code, the class you want is:

org.rsna.ctp.stdstages.anonymizer.dicom.DICOMAnonymizer

You should look at:

    org.rsna.ctp.stdstages.DicomAnonymizer

to see how to call it.

Note that other CTP classes are used to encapsulate the anonymizer script, the lookup table, and the integer table. The last two are optional as long as the script doesn't reference them. You will have to include several libraries on the classpath (at least CTP.jar, util.jar, and dcm4che.jar) to get access to all the classes that you – and the anonymized – need.

If you look around line 153 in DicomAnonymizer, you'll see that the call to the DICOMAnonymizer class is very simple:

DAScript dascript = DAScript.getInstance(scriptFile); Properties script = dascript.toProperties(); Properties lookup = LookupTable.getProperties(lookupTableFile); AnonymizerStatus status = DICOMAnonymizer.anonymize(file, file, script, lookup, intTable, false, false);

JP

From: Daryn S. Belden Sent: Friday, October 28, 2016 4:11 PM To: johnperry/CTP Subject: Re: [johnperry/CTP] Using the CTP DicomAnonymizer in a stand-alone Java program (#13)

I’m doing precisely that sort of thing at the University of Wisconsin–Madison Department of Radiology. The method I’ve been using is pretty cumbersome but it does work. I’d be very interested in discussing this further with anyone interested, particularly as I’m hoping to present what I’m doing at SIIM next year and I’d like to have a better method by then. What’s the preferred way to have those kinds of conversations?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.