Skip to content

Conversation

@pgroves
Copy link
Contributor

@pgroves pgroves commented Jun 11, 2021

Description

Adds an MRI previewer that is being used on the PigBrainMRI project with Dilger's lab. See the README.md in the previewer directory for details.

Review Time Estimate

  • Immediately
  • [x ] Within one week
  • When possible

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • [ x] New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the CHANGELOG.md.
  • I have signed the CLA
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@pgroves
Copy link
Contributor Author

pgroves commented Jun 11, 2021

There is a problem ... since I moved the previewer from custom/public/ into public/ the gzipped versions of the images don't work (the previewer doesn't load at all). On my deployment where the previewer is in custom/, a file with extension .nii.gz loads the previewer as expected, but nothing happens on the deployment I'm testing this PR with. I don't know how to debug such a thing... the javascript console doesn't show any errors.

@lmarini
Copy link
Member

lmarini commented Jun 11, 2021

There is a problem ... since I moved the previewer from custom/public/ into public/ the gzipped versions of the images don't work (the previewer doesn't load at all). On my deployment where the previewer is in custom/, a file with extension .nii.gz loads the previewer as expected, but nothing happens on the deployment I'm testing this PR with. I don't know how to debug such a thing... the javascript console doesn't show any errors.

I have the same problem. I manually unzipped them and it worked fine. What do you have in your custom mimetypes.conf on your deployment? In this pr you have only included mimetype.nii=image/nii. I tried adding mimetype.nii.gz=image/nii but it doesn't like it because of the extra fragments.

@pgroves
Copy link
Contributor Author

pgroves commented Jun 11, 2021

There is a problem ... since I moved the previewer from custom/public/ into public/ the gzipped versions of the images don't work (the previewer doesn't load at all). On my deployment where the previewer is in custom/, a file with extension .nii.gz loads the previewer as expected, but nothing happens on the deployment I'm testing this PR with. I don't know how to debug such a thing... the javascript console doesn't show any errors.

I have the same problem. I manually unzipped them and it worked fine. What do you have in your custom mimetypes.conf on your deployment? In this pr you have only included mimetype.nii=image/nii. I tried adding mimetype.nii.gz=image/nii but it doesn't like it because of the extra fragments.

I don't see anything else with mimetypes in the working version in custom. You can see it all here:
https://github.com/ncsa/clowder-dilger-ops/tree/main/custom

The only other thing I can think of is that the working version is using the official docker images but I rebuilt the clowder image to test this (from whatever was on master yesterday).

FYI here is what it looks like in the working version, the mimetype is just application/gzip. Reading a little about mimetypes this seems ok b/c gzip is the encoding, not really the mimetype, and the mimetype ecosystem seems to treat zips as a special case. But obviously it all depends on the library you're using.
gzipped_nii_working

@lmarini lmarini self-requested a review July 6, 2021 15:49
@CLAassistant
Copy link

CLAassistant commented Feb 15, 2022

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ lmarini
❌ pgroves
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Member

@lmarini lmarini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added application/gzip to the file types it triggers on and everything worked well with my test example. Also added changelog and your name to contributing. Thank you!

@lmarini lmarini merged commit 6f860d5 into clowder-framework:develop Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants