Socket
Socket
Sign inDemoInstall

nrrd-js

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nrrd-js - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

4

nrrd.js

@@ -264,2 +264,6 @@ "use strict";

buf8 = new Uint8Array(buffer);
// A work-around for incompatibilities between Node's Buffer and ArrayBuffer.
if (buf8.buffer !== buffer) buffer = buf8.buffer;
// First find the separation between the header and the data (if there is one)

@@ -266,0 +270,0 @@ // Note that we need to deal with with LF and CRLF as possible line endings.

2

package.json
{
"name": "nrrd-js",
"version": "0.1.0",
"version": "0.1.1",
"description": "Handling NRRD files in Javascript.",

@@ -5,0 +5,0 @@ "main": "nrrd.js",

@@ -11,3 +11,5 @@ NRRD support for Javascript

var array = ndarray(nrrdfile.data, nrrdfile.sizes.slice().reverse());
var minimalNrrdfileArrayBuffer = nrrd.serialize({data: array.data, sizes: array.shape.slice().reverse()}); // If array.data is something other than a typed array, you should specify the 'type'.
var arrayBuffer = nrrd.serialize({data: array.data, sizes: array.shape.slice().reverse()});
// If array.data is something other than a typed array, you should specify the 'type'.
```
Note that the above serialization only works if the ndarray uses the default stride(s), if not, then you essentially need to copy the ndarray into a new one that does (or at least a new typed array).
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc