question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unsupported gzip encoding for NRRD reader

See original GitHub issue

I would like to open a volume and slice it with vedo using code example provided by Marco:

from vedo import load, show
from vedo.applications import Slicer

file_path = './average_template_100.nrrd'
vol = load(file_path)

plt = Slicer(vol, bg='white', bg2='lightblue', useSlider3D=False)
plt.show()

but the code fails with this error:

2020-12-01 22:41:59.342 (   1.042s) [          905B63]      vtkNrrdReader.cxx:395    ERR| vtkNrrdReader (0x7fb2b8469d40): Unsupported encoding: gzip
2020-12-01 22:41:59.342 (   1.043s) [          905B63]       vtkExecutive.cxx:753    ERR| vtkCompositeDataPipeline (0x7fb2b8445e70): Algorithm vtkNrrdReader(0x7fb2b8469d40) returned failure for request: vtkInformation (0x7fb2b55e4960)
  Debug: Off
  Modified Time: 159
  Reference Count: 1
  Registered Events: (none)
  Request: REQUEST_INFORMATION
  ALGORITHM_AFTER_FORWARD: 1
  FORWARD_DIRECTION: 0


Slicer tool
2020-12-01 22:42:00.220 (   1.920s) [          905B63]vtkSmartVolumeMapper.cx:271    ERR| vtkSmartVolumeMapper (0x7fb2b8469fa0): Could not find the requested vtkDataArray! 0, 0, -1,
2020-12-01 22:42:00.249 (   1.949s) [          905B63]vtkSmartVolumeMapper.cx:271    ERR| vtkSmartVolumeMapper (0x7fb2b8469fa0): Could not find the requested vtkDataArray! 0, 0, -1,

I have loaded the same volume within Paraview (VTK) all fine. Is it because of an older VTK version or because of how vtkNrrdReader is called? Or something else?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
nantillecommented, Dec 2, 2020

Thanks, worth checking in this case I suppose. Note that there’s a typo in your import (brainio instead of branio).

1reaction
FedeClaudicommented, Dec 2, 2020

@nantille you might try using brainio from Adam Tyson:

from branio import branio

volume = branio.load_any('path to file') # gives a 3D numpy array with volume data

this has worked for me in the past

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot open NRRD files with gzip encoding - GitLab
When trying to open NRRD files where the data is gzip encoded, Paraview 5.0.0 throws an error message instead:.
Read more >
Cannot open gzip-encoded nrrd files · Issue #397 - GitHub
A nrrd file with the header below throws an ... UnsupportedCompressionException: Unsupported encoding: gzip at ... NRRDFormat$Reader.
Read more >
Include nrrd reader in project - Development - Image.sc Forum
What do I have to do to have the nrrd reader available in my project? ... UnsupportedCompressionException: Unsupported encoding: gzip at ...
Read more >
nrrd.reader — pynrrd 1.0.0 documentation - Read the Docs
Example: Reading a NRRD file with duplicated header field 'space' with field ... -dtype.itemsize * total_data_points # If a compression encoding is used, ......
Read more >
Definition of NRRD File Format - Teem - SourceForge
The content, labels, key/value pairs, and comment fields (described below) allow for arbitrarily long strings. ASCII encoding is assumed for the NRRD header....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found