Skip to content

Instantly share code, notes, and snippets.

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)
#!/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