This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This URL works when logged in as an admin: | |
http://172.16.92.142/api/3/action/package_search?include_private=True&include_drafts=True | |
This Python script does not work: | |
#!/usr/bin/env python2 | |
import urllib2 | |
import json | |
api_key = '1417c21c-7d04-48df-8f1b-8878edbd6153' | |
url='http://172.16.92.142/api/3/action/package_search?include_private=True&include_drafts=True' | |
request = urllib2.Request(url) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Redact a DICOM image to deidentify it: | |
# * can remove the overlay planes stored in the high bits of the image data | |
# * can redact rectangles from any of the image frames or overlay frames | |
# TODO: change all errors to raise exceptions | |
# NOTE: | |
# overlays may be smaller than their images. Rectangle coordinates | |
# are within the overlay, not relative to the original image, so | |
# if you want to use image coordinates you'll need to subtract |