open-index/open-npm huggingface dataset:
npm package: @herisetiawan/ohif-extension-cornerstone-dicom-pmap
Description: DICOM Parametric Map read workflow
Author: OHIF
Latest version: 3.12.0-beta.8

# dicom-pmap
## Description

DICOM PMAP read workflow. This extension will allow you to load a DICOM Parametric
Map image and display it on OHIF.

## Author

OHIF

## License
MIT
npm package: @herisetiawan/ohif-extension-cornerstone-dicom-rt
Description: DICOM RT read workflow
Author: OHIF
Latest version: 3.12.0-beta.8

# dicom-rt
## Description

DICOM RT read workflow. This extension will allow you to load a DICOM RTSS image
and display it in OHIF.


## Author

OHIF

## License
MIT
npm package: @herisetiawan/ohif-extension-cornerstone-dicom-seg
Description: DICOM SEG read workflow
Author: OHIF
Latest version: 3.12.0-beta.8

# dicom-seg
## Description

DICOM SEG read workflow. This extension will allow you to load a DICOM SEG image
and display it on OHIF. Currently Segmentations are loaded as a volumetric labelmap
and displayed as a 3D volume.

This extension provides a SEG viewport, which enables rendering and reviewing
of the DICOM SEG images. However, in order to fully load all the segments
you will need to click on the SEG Pill button on the viewport action bar
to fully load the segments.

## Author

OHIF

## License
MIT
npm package: @heritage-type/brotli
Description: A port of the Brotli compression algorithm as used in WOFF2
Author: Devon Govett
Latest version: 1.3.2

# Brotli.js

Brotli.js is port of the [Brotli](http://tools.ietf.org/html/draft-alakuijala-brotli-01) compression algorithm (as used in the [WOFF2](http://www.w3.org/TR/WOFF2/) font format) to JavaScript. The decompressor is hand ported, and the compressor is ported
with Emscripten.  The original C++ source code can be found [here](http://github.com/google/brotli).

## Installation and usage

Install using npm.

    npm install brotli

If you want to use brotli in the browser, you should use [Browserify](http://browserify.org/) to build it.

In node, or in browserify, you can load brotli in the standard way:

```javascript
var brotli = require('brotli');
```

You can also require just the `decompress` function or just the `compress` function, which is useful for browserify builds.
For example, here's how you'd require just the `decompress` function.

```javascript
var decompress = require('brotli/decompress');
```

## API

### brotli.decompress(buffer, [outSize])

Decompresses the given buffer to produce the original input to the compressor.
The `outSize` parameter is optional, and will be computed by the decompressor
if not provided. Inside a WOFF2 file, this can be computed from the WOFF2 directory.

```javascript
// decode a buffer where the output size is known
brotli.decompress(compressedData, uncompressedLength);

// decode a buffer where the output size is not known
brotli.decompress(fs.readFileSync('compressed.bin'));
```

### brotli.compress(buffer, isText = false)

Compresses the given buffer. Pass optional parameters as the second argument.

```javascript
// encode a buffer of binary data
brotli.compress(fs.readFileSync('myfile.bin'));

// encode some data with options (default options shown)
brotli.compress(fs.readFileSync('myfile.bin'), {
  mode: 0, // 0 = generic, 1 = text, 2 = font (WOFF2)
  quality: 11, // 0 - 11
  lgwin: 22 // window size
});
```

## License

MIT
npm package: @herja/core
Description: A home assistant library for nodeJS
Author: Tim Simon
Latest version: 1.4.0

# Homeassistant-node
A library to create automation for Home Assistant in nodeJS using the WebSocket API.

## How to use
### Initialize the connexion
```typescript
const connection = await configure({
  url: process.env.API_URL,
  access_token: process.env.API_TOKEN,
});
```
Where `API_URL` is `ws://${host:port}/api/websocket` and your `access_token` can be generated from your account.

### Listen for changes on an entity
```typescript
listenForEntity("sun.sun", (entity) => {
    if(entity.new_state.state === 'below_horizon')
        callService('light', 'turn_on', undefined, 'light.living_room')
})
```


### Describe a set of state and give it a callback
```typescript
onEntitiesState([{entity_id: 'binary_sensor.garden_door_contact', state: 'on'}, {entity_id: 'light.living_room_light', state: 'on'}],
    () => callService('light', 'turn_on', undefined, {entity_id: 'light.garden'})
)
```

### Manually subscribe to an event
```typescript
connection.subscribeEvents( (event) => {
  if(event.data.entity_id === "binary_sensor.garden_door_contact" && event.data.new_state === 'on'){
    callService('light', 'turn_on', undefined, {entity_id: 'light.garden'})
  }
})
```

## Thanks
- [Anymaniax's beer temple](https://github.com/anymaniax/beer-temple)
- [Home Assistant official WebSocket library](https://github.com/home-assistant/home-assistant-js-websocket)