Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weasis 3.0.2 not exporting MPR reformats #33

Closed
nroduit opened this issue Oct 27, 2018 · 0 comments
Closed

Weasis 3.0.2 not exporting MPR reformats #33

nroduit opened this issue Oct 27, 2018 · 0 comments

Comments

@nroduit
Copy link
Owner

nroduit commented Oct 27, 2018

From this post

Thanks for a very nice DICOM viewer and tool, Weasis is easy to use yet has powerful features.

I was unable to save reformats generated by Weasis for further analysis in another tool. I can save .png, .jpg but no DICOM. To reproduce the issue, this is what I did:

  1. Start Weasis-portable (I used both linux and windows), version 3.0.2
  2. Load a suitable DICOM data-set
  3. Click the MPR button
  4. Click Export DICOM, select the newly created MPR series
  5. Export to DICOM file to a directory on my hard-drive

This only generates the DICOM dir file (and if you selected any DICOM files belonging to your original data, these are exported as well) but no MPR DICOM files!

Being a tinkerer at heart, and Weasis being open source (thank you again;) I went in and fixed it, not sure if this breaks anything else, but I figured Id share the fix with you guys so that you may at least consider it.

Its simple, in the file RawImageIO.java (under weasis-dicom-viewer2d/src/main/java/org/weasis/dicom/viewer2d/mpr) near line 94:

Change This

BulkData bdl = new BulkData(file.toURI().toString(), FileRawImage.HEADER_LENGTH, (int) file.length(), false);

To that

BulkData bdl = new BulkData(file.toURI().toString(), FileRawImage.HEADER_LENGTH, (int) file.length() - FileRawImage.HEADER_LENGTH, false);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant