{"action":"created","comment":{"url":"https://api.github.com/repos/openmicroscopy/bioformats/pulls/comments/35360489","id":35360489,"diff_hunk":"@@ -763,24 +763,22 @@ else if (isJPEG || isJP2K) {\n \n         // all physical sizes were stored in mm, so must be converted to um\n         if (pixelSizeX != null) {\n-          Double sizeX = new Double(pixelSizeX);\n-          sizeX *= 1000;\n-          Length x = FormatTools.getPhysicalSizeX(sizeX);\n+          Double physicalSizeX = new Double(pixelSizeX);\n+          Length x = FormatTools.getPhysicalSizeX(physicalSizeX, \"mm\");\n           if (x != null) {\n             store.setPixelsPhysicalSizeX(x, i);\n           }\n         }\n         if (pixelSizeY != null) {\n-          Double sizeY = new Double(pixelSizeY);\n-          sizeY *= 1000;\n-          Length y = FormatTools.getPhysicalSizeY(sizeY);\n+          Double physicalSizeY = new Double(pixelSizeY);\n+          Length y = FormatTools.getPhysicalSizeY(physicalSizeY, \"mm\");","path":"components/formats-bsd/src/loci/formats/in/DicomReader.java","position":18,"original_position":18,"commit_id":"b1cf8cd42bb7bd8bcc3aae8b2af02b49fb031755","original_commit_id":"b1cf8cd42bb7bd8bcc3aae8b2af02b49fb031755","user":{"login":"joshmoore","id":88113,"avatar_url":"https://avatars.githubusercontent.com/u/88113?v=3","gravatar_id":"","url":"https://api.github.com/users/joshmoore","html_url":"https://github.com/joshmoore","followers_url":"https://api.github.com/users/joshmoore/followers","following_url":"https://api.github.com/users/joshmoore/following{/other_user}","gists_url":"https://api.github.com/users/joshmoore/gists{/gist_id}","starred_url":"https://api.github.com/users/joshmoore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshmoore/subscriptions","organizations_url":"https://api.github.com/users/joshmoore/orgs","repos_url":"https://api.github.com/users/joshmoore/repos","events_url":"https://api.github.com/users/joshmoore/events{/privacy}","received_events_url":"https://api.github.com/users/joshmoore/received_events","type":"User","site_admin":false},"body":"Using the enums throughout the code (rather than string representations like `\"mm\"`) will make later searching/refactoring easier if it doesn't make the code too unwieldy now.","created_at":"2015-07-23T19:19:48Z","updated_at":"2015-07-23T19:19:48Z","html_url":"https://github.com/openmicroscopy/bioformats/pull/1895#discussion_r35360489","pull_request_url":"https://api.github.com/repos/openmicroscopy/bioformats/pulls/1895","_links":{"self":{"href":"https://api.github.com/repos/openmicroscopy/bioformats/pulls/comments/35360489"},"html":{"href":"https://github.com/openmicroscopy/bioformats/pull/1895#discussion_r35360489"},"pull_request":{"href":"https://api.github.com/repos/openmicroscopy/bioformats/pulls/1895"}}},"pull_request":{"url":"https://api.github.com/repos/openmicroscopy/bioformats/pulls/1895","id":40680688,"html_url":"https://github.com/openmicroscopy/bioformats/pull/1895","diff_url":"https://github.com/openmicroscopy/bioformats/pull/1895.diff","patch_url":"https://github.com/openmicroscopy/bioformats/pull/1895.patch","issue_url":"https://api.github.com/repos/openmicroscopy/bioformats/issues/1895","number":1895,"state":"open","locked":false,"title":"DicomReader/OBFReader: use native units for storing the physical size","user":{"login":"sbesson","id":1355463,"avatar_url":"https://avatars.githubusercontent.com/u/1355463?v=3","gravatar_id":"","url":"https://api.github.com/users/sbesson","html_url":"https://github.com/sbesson","followers_url":"https://api.github.com/users/sbesson/followers","following_url":"https://api.github.com/users/sbesson/following{/other_user}","gists_url":"https://api.github.com/users/sbesson/gists{/gist_id}","starred_url":"https://api.github.com/users/sbesson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbesson/subscriptions","organizations_url":"https://api.github.com/users/sbesson/orgs","repos_url":"https://api.github.com/users/sbesson/repos","events_url":"https://api.github.com/users/sbesson/events{/privacy}","received_events_url":"https://api.github.com/users/sbesson/received_events","type":"User","site_admin":false},"body":"See https://trello.com/c/nO35TKXK/4-units-and-readers\r\n\r\nThis PR:\r\n- modifies the `DICOMReader` and `OBFReader` to use the native units while storing the physical size\r\n- implements `FormatTools.getPhysicalSizeZ(Double, String)` to restore symmetry\r\n- fixes the automated tests to account for rounding errors during unit conversions\r\n\r\n/cc @bjoernthiel ","created_at":"2015-07-23T14:54:06Z","updated_at":"2015-07-23T19:19:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"289d709560fd8efa565ce5380bd509b72189f7c3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openmicroscopy/bioformats/pulls/1895/commits","review_comments_url":"https://api.github.com/repos/openmicroscopy/bioformats/pulls/1895/comments","review_comment_url":"https://api.github.com/repos/openmicroscopy/bioformats/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openmicroscopy/bioformats/issues/1895/comments","statuses_url":"https://api.github.com/repos/openmicroscopy/bioformats/statuses/b1cf8cd42bb7bd8bcc3aae8b2af02b49fb031755","head":{"label":"sbesson:units_dicomreader","ref":"units_dicomreader","sha":"b1cf8cd42bb7bd8bcc3aae8b2af02b49fb031755","user":{"login":"sbesson","id":1355463,"avatar_url":"https://avatars.githubusercontent.com/u/1355463?v=3","gravatar_id":"","url":"https://api.github.com/users/sbesson","html_url":"https://github.com/sbesson","followers_url":"https://api.github.com/users/sbesson/followers","following_url":"https://api.github.com/users/sbesson/following{/other_user}","gists_url":"https://api.github.com/users/sbesson/gists{/gist_id}","starred_url":"https://api.github.com/users/sbesson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbesson/subscriptions","organizations_url":"https://api.github.com/users/sbesson/orgs","repos_url":"https://api.github.com/users/sbesson/repos","events_url":"https://api.github.com/users/sbesson/events{/privacy}","received_events_url":"https://api.github.com/users/sbesson/received_events","type":"User","site_admin":false},"repo":{"id":3541327,"name":"bioformats","full_name":"sbesson/bioformats","owner":{"login":"sbesson","id":1355463,"avatar_url":"https://avatars.githubusercontent.com/u/1355463?v=3","gravatar_id":"","url":"https://api.github.com/users/sbesson","html_url":"https://github.com/sbesson","followers_url":"https://api.github.com/users/sbesson/followers","following_url":"https://api.github.com/users/sbesson/following{/other_user}","gists_url":"https://api.github.com/users/sbesson/gists{/gist_id}","starred_url":"https://api.github.com/users/sbesson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbesson/subscriptions","organizations_url":"https://api.github.com/users/sbesson/orgs","repos_url":"https://api.github.com/users/sbesson/repos","events_url":"https://api.github.com/users/sbesson/events{/privacy}","received_events_url":"https://api.github.com/users/sbesson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sbesson/bioformats","description":"Bio-Formats is a Java library for reading and writing data in life sciences image file formats. It is developed by the  Open Microscopy Environment (particularly  UW-Madison LOCI and  Glencoe Software). Bio-Formats is released under the  GNU General Public License (GPL); commercial licenses are available from  Glencoe Software. ","fork":true,"url":"https://api.github.com/repos/sbesson/bioformats","forks_url":"https://api.github.com/repos/sbesson/bioformats/forks","keys_url":"https://api.github.com/repos/sbesson/bioformats/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sbesson/bioformats/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sbesson/bioformats/teams","hooks_url":"https://api.github.com/repos/sbesson/bioformats/hooks","issue_events_url":"https://api.github.com/repos/sbesson/bioformats/issues/events{/number}","events_url":"https://api.github.com/repos/sbesson/bioformats/events","assignees_url":"https://api.github.com/repos/sbesson/bioformats/assignees{/user}","branches_url":"https://api.github.com/repos/sbesson/bioformats/branches{/branch}","tags_url":"https://api.github.com/repos/sbesson/bioformats/tags","blobs_url":"https://api.github.com/repos/sbesson/bioformats/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sbesson/bioformats/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sbesson/bioformats/git/refs{/sha}","trees_url":"https://api.github.com/repos/sbesson/bioformats/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sbesson/bioformats/statuses/{sha}","languages_url":"https://api.github.com/repos/sbesson/bioformats/languages","stargazers_url":"https://api.github.com/repos/sbesson/bioformats/stargazers","contributors_url":"https://api.github.com/repos/sbesson/bioformats/contributors","subscribers_url":"https://api.github.com/repos/sbesson/bioformats/subscribers","subscription_url":"https://api.github.com/repos/sbesson/bioformats/subscription","commits_url":"https://api.github.com/repos/sbesson/bioformats/commits{/sha}","git_commits_url":"https://api.github.com/repos/sbesson/bioformats/git/commits{/sha}","comments_url":"https://api.github.com/repos/sbesson/bioformats/comments{/number}","issue_comment_url":"https://api.github.com/repos/sbesson/bioformats/issues/comments{/number}","contents_url":"https://api.github.com/repos/sbesson/bioformats/contents/{+path}","compare_url":"https://api.github.com/repos/sbesson/bioformats/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sbesson/bioformats/merges","archive_url":"https://api.github.com/repos/sbesson/bioformats/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sbesson/bioformats/downloads","issues_url":"https://api.github.com/repos/sbesson/bioformats/issues{/number}","pulls_url":"https://api.github.com/repos/sbesson/bioformats/pulls{/number}","milestones_url":"https://api.github.com/repos/sbesson/bioformats/milestones{/number}","notifications_url":"https://api.github.com/repos/sbesson/bioformats/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sbesson/bioformats/labels{/name}","releases_url":"https://api.github.com/repos/sbesson/bioformats/releases{/id}","created_at":"2012-02-25T00:50:54Z","updated_at":"2015-05-07T13:40:01Z","pushed_at":"2015-07-23T15:25:07Z","git_url":"git://github.com/sbesson/bioformats.git","ssh_url":"git@github.com:sbesson/bioformats.git","clone_url":"https://github.com/sbesson/bioformats.git","svn_url":"https://github.com/sbesson/bioformats","homepage":"http://trac.openmicroscopy.org.uk/ome/wiki/BioFormats","size":257159,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":2,"default_branch":"develop"}},"base":{"label":"openmicroscopy:develop","ref":"develop","sha":"bb22c9c22669efbd7b6db57393e2e2e32e318f3d","user":{"login":"openmicroscopy","id":975861,"avatar_url":"https://avatars.githubusercontent.com/u/975861?v=3","gravatar_id":"","url":"https://api.github.com/users/openmicroscopy","html_url":"https://github.com/openmicroscopy","followers_url":"https://api.github.com/users/openmicroscopy/followers","following_url":"https://api.github.com/users/openmicroscopy/following{/other_user}","gists_url":"https://api.github.com/users/openmicroscopy/gists{/gist_id}","starred_url":"https://api.github.com/users/openmicroscopy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openmicroscopy/subscriptions","organizations_url":"https://api.github.com/users/openmicroscopy/orgs","repos_url":"https://api.github.com/users/openmicroscopy/repos","events_url":"https://api.github.com/users/openmicroscopy/events{/privacy}","received_events_url":"https://api.github.com/users/openmicroscopy/received_events","type":"Organization","site_admin":false},"repo":{"id":2510503,"name":"bioformats","full_name":"openmicroscopy/bioformats","owner":{"login":"openmicroscopy","id":975861,"avatar_url":"https://avatars.githubusercontent.com/u/975861?v=3","gravatar_id":"","url":"https://api.github.com/users/openmicroscopy","html_url":"https://github.com/openmicroscopy","followers_url":"https://api.github.com/users/openmicroscopy/followers","following_url":"https://api.github.com/users/openmicroscopy/following{/other_user}","gists_url":"https://api.github.com/users/openmicroscopy/gists{/gist_id}","starred_url":"https://api.github.com/users/openmicroscopy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openmicroscopy/subscriptions","organizations_url":"https://api.github.com/users/openmicroscopy/orgs","repos_url":"https://api.github.com/users/openmicroscopy/repos","events_url":"https://api.github.com/users/openmicroscopy/events{/privacy}","received_events_url":"https://api.github.com/users/openmicroscopy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openmicroscopy/bioformats","description":"Bio-Formats is a Java library for reading and writing data in life sciences image file formats. It is developed by the  Open Microscopy Environment (particularly  UW-Madison LOCI and  Glencoe Software). Bio-Formats is released under the  GNU General Public License (GPL); commercial licenses are available from  Glencoe Software. ","fork":false,"url":"https://api.github.com/repos/openmicroscopy/bioformats","forks_url":"https://api.github.com/repos/openmicroscopy/bioformats/forks","keys_url":"https://api.github.com/repos/openmicroscopy/bioformats/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openmicroscopy/bioformats/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openmicroscopy/bioformats/teams","hooks_url":"https://api.github.com/repos/openmicroscopy/bioformats/hooks","issue_events_url":"https://api.github.com/repos/openmicroscopy/bioformats/issues/events{/number}","events_url":"https://api.github.com/repos/openmicroscopy/bioformats/events","assignees_url":"https://api.github.com/repos/openmicroscopy/bioformats/assignees{/user}","branches_url":"https://api.github.com/repos/openmicroscopy/bioformats/branches{/branch}","tags_url":"https://api.github.com/repos/openmicroscopy/bioformats/tags","blobs_url":"https://api.github.com/repos/openmicroscopy/bioformats/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openmicroscopy/bioformats/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openmicroscopy/bioformats/git/refs{/sha}","trees_url":"https://api.github.com/repos/openmicroscopy/bioformats/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openmicroscopy/bioformats/statuses/{sha}","languages_url":"https://api.github.com/repos/openmicroscopy/bioformats/languages","stargazers_url":"https://api.github.com/repos/openmicroscopy/bioformats/stargazers","contributors_url":"https://api.github.com/repos/openmicroscopy/bioformats/contributors","subscribers_url":"https://api.github.com/repos/openmicroscopy/bioformats/subscribers","subscription_url":"https://api.github.com/repos/openmicroscopy/bioformats/subscription","commits_url":"https://api.github.com/repos/openmicroscopy/bioformats/commits{/sha}","git_commits_url":"https://api.github.com/repos/openmicroscopy/bioformats/git/commits{/sha}","comments_url":"https://api.github.com/repos/openmicroscopy/bioformats/comments{/number}","issue_comment_url":"https://api.github.com/repos/openmicroscopy/bioformats/issues/comments{/number}","contents_url":"https://api.github.com/repos/openmicroscopy/bioformats/contents/{+path}","compare_url":"https://api.github.com/repos/openmicroscopy/bioformats/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openmicroscopy/bioformats/merges","archive_url":"https://api.github.com/repos/openmicroscopy/bioformats/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openmicroscopy/bioformats/downloads","issues_url":"https://api.github.com/repos/openmicroscopy/bioformats/issues{/number}","pulls_url":"https://api.github.com/repos/openmicroscopy/bioformats/pulls{/number}","milestones_url":"https://api.github.com/repos/openmicroscopy/bioformats/milestones{/number}","notifications_url":"https://api.github.com/repos/openmicroscopy/bioformats/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openmicroscopy/bioformats/labels{/name}","releases_url":"https://api.github.com/repos/openmicroscopy/bioformats/releases{/id}","created_at":"2011-10-04T08:06:14Z","updated_at":"2015-07-10T18:07:12Z","pushed_at":"2015-07-23T19:16:27Z","git_url":"git://github.com/openmicroscopy/bioformats.git","ssh_url":"git@github.com:openmicroscopy/bioformats.git","clone_url":"https://github.com/openmicroscopy/bioformats.git","svn_url":"https://github.com/openmicroscopy/bioformats","homepage":"http://www.openmicroscopy.org/site/products/bio-formats","size":283287,"stargazers_count":86,"watchers_count":86,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":107,"mirror_url":null,"open_issues_count":16,"forks":107,"open_issues":16,"watchers":86,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/openmicroscopy/bioformats/pulls/1895"},"html":{"href":"https://github.com/openmicroscopy/bioformats/pull/1895"},"issue":{"href":"https://api.github.com/repos/openmicroscopy/bioformats/issues/1895"},"comments":{"href":"https://api.github.com/repos/openmicroscopy/bioformats/issues/1895/comments"},"review_comments":{"href":"https://api.github.com/repos/openmicroscopy/bioformats/pulls/1895/comments"},"review_comment":{"href":"https://api.github.com/repos/openmicroscopy/bioformats/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openmicroscopy/bioformats/pulls/1895/commits"},"statuses":{"href":"https://api.github.com/repos/openmicroscopy/bioformats/statuses/b1cf8cd42bb7bd8bcc3aae8b2af02b49fb031755"}}}}