{"action":"created","comment":{"url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/pulls/comments/134157822","pull_request_review_id":57416079,"id":134157822,"diff_hunk":"@@ -0,0 +1,50 @@\n+import os\n+\n+from .load_dicom import read_dicom_files\n+\n+\n+def crop_dicom(path_to_dicom, begin, end, output=None):\n+    \"\"\"\n+    This function crops a dicom series in the x-, y- and z-dimension. If an output path is provided, it will save the\n+    new series at that location.\n+\n+    Examples for how to specify cropping mask using the begin- and end-parameter:\n+\n+        The given DICOM series contains images with the resolution of 512x512 pixels and 133 images\n+        starting at a depth of -10 mm to a depth of -340 mm. Using begin = [0, 0, -10] and end = [512, 512, -340] would\n+        give you back the full series. Using begin = [100, 200, [0, 0, -160] and end = [120, 220, -170] would give you a","path":"prediction/src/preprocess/crop_dicom.py","position":15,"original_position":15,"commit_id":"6eedab93ab4f824198287fbdf7f6f35796a66053","original_commit_id":"6eedab93ab4f824198287fbdf7f6f35796a66053","user":{"login":"reubano","id":157864,"avatar_url":"https://avatars1.githubusercontent.com/u/157864?v=4","gravatar_id":"","url":"https://api.github.com/users/reubano","html_url":"https://github.com/reubano","followers_url":"https://api.github.com/users/reubano/followers","following_url":"https://api.github.com/users/reubano/following{/other_user}","gists_url":"https://api.github.com/users/reubano/gists{/gist_id}","starred_url":"https://api.github.com/users/reubano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reubano/subscriptions","organizations_url":"https://api.github.com/users/reubano/orgs","repos_url":"https://api.github.com/users/reubano/repos","events_url":"https://api.github.com/users/reubano/events{/privacy}","received_events_url":"https://api.github.com/users/reubano/received_events","type":"User","site_admin":false},"body":"`[100, 200, [0, 0, -160]` is this a typo?","created_at":"2017-08-21T07:07:18Z","updated_at":"2017-08-21T07:07:18Z","html_url":"https://github.com/concept-to-clinic/concept-to-clinic/pull/57#discussion_r134157822","pull_request_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/pulls/57","_links":{"self":{"href":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/pulls/comments/134157822"},"html":{"href":"https://github.com/concept-to-clinic/concept-to-clinic/pull/57#discussion_r134157822"},"pull_request":{"href":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/pulls/57"}}},"pull_request":{"url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/pulls/57","id":136206676,"html_url":"https://github.com/concept-to-clinic/concept-to-clinic/pull/57","diff_url":"https://github.com/concept-to-clinic/concept-to-clinic/pull/57.diff","patch_url":"https://github.com/concept-to-clinic/concept-to-clinic/pull/57.patch","issue_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/issues/57","number":57,"state":"open","locked":false,"title":"Reducing test set size and adding a script to crop dicom images.","user":{"login":"tdraebing","id":15434759,"avatar_url":"https://avatars0.githubusercontent.com/u/15434759?v=4","gravatar_id":"","url":"https://api.github.com/users/tdraebing","html_url":"https://github.com/tdraebing","followers_url":"https://api.github.com/users/tdraebing/followers","following_url":"https://api.github.com/users/tdraebing/following{/other_user}","gists_url":"https://api.github.com/users/tdraebing/gists{/gist_id}","starred_url":"https://api.github.com/users/tdraebing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdraebing/subscriptions","organizations_url":"https://api.github.com/users/tdraebing/orgs","repos_url":"https://api.github.com/users/tdraebing/repos","events_url":"https://api.github.com/users/tdraebing/events{/privacy}","received_events_url":"https://api.github.com/users/tdraebing/received_events","type":"User","site_admin":false},"body":"Replaced large test images with smaller ones to decrease repo size.\r\n\r\n<!--- Provide a general summary of your changes in the Title above -->\r\n\r\n## Description\r\n<!--- Describe your changes in detail -->\r\nI decreased the size of all three data sets by reducing the number of images (cropping in z-dimension). For the data sets LIDC-IDRI-0001 and LIDC-IDRI-0003 I chose the regions that contain a big mass inside the lung, which are probably tumors. LIDC-IDRI-0002 does not contain such a mass. Thus I chose a range of slices that contained nodules as stated by the *.xml file. (Disclaimer: I am not a medical professional. As a biologist I only have very limited knowledge about diagnosing lung cancer on CT-images). The *.xml files were removed from the data set for now. The data sets are in the same location as the original data sets. The names changed to be more declarative and now represent the depth of the slices in mm instead of a non-consecutive id.\r\nAdditionally a script was added to `prediction/src/preprocess/crop_dicom.py` that allows to crop dicom series in x-, y- and z-dimensions for future use.\r\nExisting tests were updated accordingly.\r\n\r\n## Reference to official issue\r\n<!--- If fixing a bug, there should be an existing issue describing it with steps to reproduce -->\r\n<!--- Please link to the issue here: -->\r\nIssue #38 \r\n\r\n## Motivation and Context\r\n<!--- Why is this change required? What problem does it solve? -->\r\n<!--- If adding a new feature or making improvements not already reflected in an official issue, please reference the relevant sections of the design doc -->\r\nThe datasets were quite large. Smaller datasets would substentially decrease the repo size. The created script might be useful for preprocessing in prediction tasks.\r\n\r\n## How Has This Been Tested?\r\n<!--- Please describe in detail how you tested your changes. -->\r\n<!--- Include details of your testing environment, and the tests you ran to -->\r\n<!--- see how your change affects other areas of the code, etc. -->\r\nUnit tests for the new script were created to test whether the expected output is created. Existing tests were updated to appropriately deal with the smaller test sets (One test relied on a *.xml-file being in the folder). The other tests resulted in no errors. Smaller datasets can be opened using an external DICOM-Viewer (RadiAnt).\r\n\r\n## Screenshots (if appropriate):\r\n\r\n\r\n## CLA\r\n- [x] I have signed the CLA; if other committers are in the commit history, they have signed the CLA as well","created_at":"2017-08-17T09:06:21Z","updated_at":"2017-08-21T07:07:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"48d29c538df722f6b295648a3ba62690297a4f13","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/pulls/57/commits","review_comments_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/pulls/57/comments","review_comment_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/pulls/comments{/number}","comments_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/issues/57/comments","statuses_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/statuses/6eedab93ab4f824198287fbdf7f6f35796a66053","head":{"label":"tdraebing:issue-38-smaller-test-sets","ref":"issue-38-smaller-test-sets","sha":"6eedab93ab4f824198287fbdf7f6f35796a66053","user":{"login":"tdraebing","id":15434759,"avatar_url":"https://avatars0.githubusercontent.com/u/15434759?v=4","gravatar_id":"","url":"https://api.github.com/users/tdraebing","html_url":"https://github.com/tdraebing","followers_url":"https://api.github.com/users/tdraebing/followers","following_url":"https://api.github.com/users/tdraebing/following{/other_user}","gists_url":"https://api.github.com/users/tdraebing/gists{/gist_id}","starred_url":"https://api.github.com/users/tdraebing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdraebing/subscriptions","organizations_url":"https://api.github.com/users/tdraebing/orgs","repos_url":"https://api.github.com/users/tdraebing/repos","events_url":"https://api.github.com/users/tdraebing/events{/privacy}","received_events_url":"https://api.github.com/users/tdraebing/received_events","type":"User","site_admin":false},"repo":{"id":99380496,"name":"concept-to-clinic","full_name":"tdraebing/concept-to-clinic","owner":{"login":"tdraebing","id":15434759,"avatar_url":"https://avatars0.githubusercontent.com/u/15434759?v=4","gravatar_id":"","url":"https://api.github.com/users/tdraebing","html_url":"https://github.com/tdraebing","followers_url":"https://api.github.com/users/tdraebing/followers","following_url":"https://api.github.com/users/tdraebing/following{/other_user}","gists_url":"https://api.github.com/users/tdraebing/gists{/gist_id}","starred_url":"https://api.github.com/users/tdraebing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdraebing/subscriptions","organizations_url":"https://api.github.com/users/tdraebing/orgs","repos_url":"https://api.github.com/users/tdraebing/repos","events_url":"https://api.github.com/users/tdraebing/events{/privacy}","received_events_url":"https://api.github.com/users/tdraebing/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tdraebing/concept-to-clinic","description":"ALCF Concept to Clinic Challenge","fork":true,"url":"https://api.github.com/repos/tdraebing/concept-to-clinic","forks_url":"https://api.github.com/repos/tdraebing/concept-to-clinic/forks","keys_url":"https://api.github.com/repos/tdraebing/concept-to-clinic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tdraebing/concept-to-clinic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tdraebing/concept-to-clinic/teams","hooks_url":"https://api.github.com/repos/tdraebing/concept-to-clinic/hooks","issue_events_url":"https://api.github.com/repos/tdraebing/concept-to-clinic/issues/events{/number}","events_url":"https://api.github.com/repos/tdraebing/concept-to-clinic/events","assignees_url":"https://api.github.com/repos/tdraebing/concept-to-clinic/assignees{/user}","branches_url":"https://api.github.com/repos/tdraebing/concept-to-clinic/branches{/branch}","tags_url":"https://api.github.com/repos/tdraebing/concept-to-clinic/tags","blobs_url":"https://api.github.com/repos/tdraebing/concept-to-clinic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tdraebing/concept-to-clinic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tdraebing/concept-to-clinic/git/refs{/sha}","trees_url":"https://api.github.com/repos/tdraebing/concept-to-clinic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tdraebing/concept-to-clinic/statuses/{sha}","languages_url":"https://api.github.com/repos/tdraebing/concept-to-clinic/languages","stargazers_url":"https://api.github.com/repos/tdraebing/concept-to-clinic/stargazers","contributors_url":"https://api.github.com/repos/tdraebing/concept-to-clinic/contributors","subscribers_url":"https://api.github.com/repos/tdraebing/concept-to-clinic/subscribers","subscription_url":"https://api.github.com/repos/tdraebing/concept-to-clinic/subscription","commits_url":"https://api.github.com/repos/tdraebing/concept-to-clinic/commits{/sha}","git_commits_url":"https://api.github.com/repos/tdraebing/concept-to-clinic/git/commits{/sha}","comments_url":"https://api.github.com/repos/tdraebing/concept-to-clinic/comments{/number}","issue_comment_url":"https://api.github.com/repos/tdraebing/concept-to-clinic/issues/comments{/number}","contents_url":"https://api.github.com/repos/tdraebing/concept-to-clinic/contents/{+path}","compare_url":"https://api.github.com/repos/tdraebing/concept-to-clinic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tdraebing/concept-to-clinic/merges","archive_url":"https://api.github.com/repos/tdraebing/concept-to-clinic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tdraebing/concept-to-clinic/downloads","issues_url":"https://api.github.com/repos/tdraebing/concept-to-clinic/issues{/number}","pulls_url":"https://api.github.com/repos/tdraebing/concept-to-clinic/pulls{/number}","milestones_url":"https://api.github.com/repos/tdraebing/concept-to-clinic/milestones{/number}","notifications_url":"https://api.github.com/repos/tdraebing/concept-to-clinic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tdraebing/concept-to-clinic/labels{/name}","releases_url":"https://api.github.com/repos/tdraebing/concept-to-clinic/releases{/id}","deployments_url":"https://api.github.com/repos/tdraebing/concept-to-clinic/deployments","created_at":"2017-08-04T21:22:03Z","updated_at":"2017-08-04T21:22:07Z","pushed_at":"2017-08-17T19:13:27Z","git_url":"git://github.com/tdraebing/concept-to-clinic.git","ssh_url":"git@github.com:tdraebing/concept-to-clinic.git","clone_url":"https://github.com/tdraebing/concept-to-clinic.git","svn_url":"https://github.com/tdraebing/concept-to-clinic","homepage":"https://concepttoclinic.drivendata.org/","size":135257,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"concept-to-clinic:master","ref":"master","sha":"c484acf1af419235ee98889332c1c890a35a140c","user":{"login":"concept-to-clinic","id":29073492,"avatar_url":"https://avatars3.githubusercontent.com/u/29073492?v=4","gravatar_id":"","url":"https://api.github.com/users/concept-to-clinic","html_url":"https://github.com/concept-to-clinic","followers_url":"https://api.github.com/users/concept-to-clinic/followers","following_url":"https://api.github.com/users/concept-to-clinic/following{/other_user}","gists_url":"https://api.github.com/users/concept-to-clinic/gists{/gist_id}","starred_url":"https://api.github.com/users/concept-to-clinic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/concept-to-clinic/subscriptions","organizations_url":"https://api.github.com/users/concept-to-clinic/orgs","repos_url":"https://api.github.com/users/concept-to-clinic/repos","events_url":"https://api.github.com/users/concept-to-clinic/events{/privacy}","received_events_url":"https://api.github.com/users/concept-to-clinic/received_events","type":"Organization","site_admin":false},"repo":{"id":98559363,"name":"concept-to-clinic","full_name":"concept-to-clinic/concept-to-clinic","owner":{"login":"concept-to-clinic","id":29073492,"avatar_url":"https://avatars3.githubusercontent.com/u/29073492?v=4","gravatar_id":"","url":"https://api.github.com/users/concept-to-clinic","html_url":"https://github.com/concept-to-clinic","followers_url":"https://api.github.com/users/concept-to-clinic/followers","following_url":"https://api.github.com/users/concept-to-clinic/following{/other_user}","gists_url":"https://api.github.com/users/concept-to-clinic/gists{/gist_id}","starred_url":"https://api.github.com/users/concept-to-clinic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/concept-to-clinic/subscriptions","organizations_url":"https://api.github.com/users/concept-to-clinic/orgs","repos_url":"https://api.github.com/users/concept-to-clinic/repos","events_url":"https://api.github.com/users/concept-to-clinic/events{/privacy}","received_events_url":"https://api.github.com/users/concept-to-clinic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/concept-to-clinic/concept-to-clinic","description":"ALCF Concept to Clinic Challenge","fork":false,"url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic","forks_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/forks","keys_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/teams","hooks_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/hooks","issue_events_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/issues/events{/number}","events_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/events","assignees_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/assignees{/user}","branches_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/branches{/branch}","tags_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/tags","blobs_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/git/refs{/sha}","trees_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/statuses/{sha}","languages_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/languages","stargazers_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/stargazers","contributors_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/contributors","subscribers_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/subscribers","subscription_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/subscription","commits_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/commits{/sha}","git_commits_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/git/commits{/sha}","comments_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/comments{/number}","issue_comment_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/issues/comments{/number}","contents_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/contents/{+path}","compare_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/merges","archive_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/downloads","issues_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/issues{/number}","pulls_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/pulls{/number}","milestones_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/milestones{/number}","notifications_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/labels{/name}","releases_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/releases{/id}","deployments_url":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/deployments","created_at":"2017-07-27T16:37:37Z","updated_at":"2017-08-20T17:26:58Z","pushed_at":"2017-08-18T19:23:18Z","git_url":"git://github.com/concept-to-clinic/concept-to-clinic.git","ssh_url":"git@github.com:concept-to-clinic/concept-to-clinic.git","clone_url":"https://github.com/concept-to-clinic/concept-to-clinic.git","svn_url":"https://github.com/concept-to-clinic/concept-to-clinic","homepage":"https://concepttoclinic.drivendata.org/","size":135271,"stargazers_count":67,"watchers_count":67,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":41,"mirror_url":null,"open_issues_count":44,"forks":41,"open_issues":44,"watchers":67,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/pulls/57"},"html":{"href":"https://github.com/concept-to-clinic/concept-to-clinic/pull/57"},"issue":{"href":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/issues/57"},"comments":{"href":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/issues/57/comments"},"review_comments":{"href":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/pulls/57/comments"},"review_comment":{"href":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/pulls/57/commits"},"statuses":{"href":"https://api.github.com/repos/concept-to-clinic/concept-to-clinic/statuses/6eedab93ab4f824198287fbdf7f6f35796a66053"}}}}
{"actor":{"display_login":"reubano"}}