Skip to content

Commit

Permalink
merge (#445)
Browse files Browse the repository at this point in the history
* Fix Interleaved RGB Image Handling. (#399)

* Fix Interleaved RGB Image Handling.

* Prettier.

* Defaults for photometricInterpretation

* Add test for Interleaved BitmapLayer (#400)

* Add test for BitmapLayer

* Add more stringent requirement for layer.

* Fix slicing bug.

* Fix tests better.

* Small fixes.

* ImageLayer too.

* 0.9.4 (#405)

* Fix type/docs for VivView(er) and Consumers. (#407)

* Fix type/docs for VivViewer and VivView (and upstream users)

* Use special jsdoc -> typescript syntax.

* Small Fixes

* Fix ImageLayer

* Try functional component

* Small fixes.

* Small fixes.

* Fix `ImageLayer` `loader` type. (#410)

* Improve emitted TS types for layers (#413)

* Create `Viv` utility type to refine emitted Layer constructor types.

* Do not export VivProps type.

* Fix Empty Loader Selection Bug. (#416)

* 0.9.5 (#417)

* Fix Bugs in `getChannelStats`. (#419)

* Fix Bugs in `getChannelStats`.

* Use > 0 instead of epsilon value.

* Check all properties in onHover to avoid crashes (#426)

* Bump url-parse from 1.4.7 to 1.5.1 in /avivator (#427)

Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.4.7 to 1.5.1.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](unshiftio/url-parse@1.4.7...1.5.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump hosted-git-info from 2.8.8 to 2.8.9 (#429)

Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](npm/hosted-git-info@v2.8.8...v2.8.9)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump lodash from 4.17.20 to 4.17.21 in /avivator (#431)

Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.17.20...4.17.21)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump postcss from 8.1.4 to 8.2.15 in /avivator (#432)

Bumps [postcss](https://github.com/postcss/postcss) from 8.1.4 to 8.2.15.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](postcss/postcss@8.1.4...8.2.15)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump lodash from 4.17.20 to 4.17.21 (#428)

Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.17.20...4.17.21)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Check for dependabot before running CHANGELOG checks (#433)

* New README Screenshots (#435)

* Add Screenshots for README

* Change width.

* Update URLs

* Allow for LINEAR/NEAREST Filtering Interpolation Choice (#437)

* Allow for LINEAR/NEAREST Filtering Interpolation Choice

* Change variable name

* Change filtering options.

* Bump browserslist from 4.16.1 to 4.16.6 (#441)

Bumps [browserslist](https://github.com/browserslist/browserslist) from 4.16.1 to 4.16.6.
- [Release notes](https://github.com/browserslist/browserslist/releases)
- [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md)
- [Commits](browserslist/browserslist@4.16.1...4.16.6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump browserslist from 4.14.6 to 4.16.6 in /avivator (#442)

Bumps [browserslist](https://github.com/browserslist/browserslist) from 4.14.6 to 4.16.6.
- [Release notes](https://github.com/browserslist/browserslist/releases)
- [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md)
- [Commits](browserslist/browserslist@4.14.6...4.16.6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Co-authored-by: Trevor Manz <trevor.j.manz@gmail.com>
Co-authored-by: Andreas Girgensohn <andreasg123@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
4 people authored May 26, 2021
1 parent 08e0f55 commit d3e5bff
Show file tree
Hide file tree
Showing 32 changed files with 530 additions and 380 deletions.
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,38 @@

### Added

- Add screenshots to README.md
- Allow users to choose `LINEAR` or `NEAREST` interpolation filtering for `XRLayer`.

### Changed

- Fix bug in `getChannelStats` where we only considered values over 1 for the sliders
- Fix bug in `getChannelStats` where array of zeros passed in causes undefined slider settings
- Check all properties in `onHover` to avoid crashes
- Check for dependabot before running CHANGELOG checks

## 0.9.5

### Added

### Changed

- Fix `VivViewer` and `VivView` types.
- Fix `ImageLayer` `loader` type.
- Refine `LayerProps` JSDoc annotations for more precise emitted types.
- Fix `Avivator` and `getImageLyaers` utility for `loaderSelection` that is empty array.

## 0.9.4

### Added

- Refactor JSDoc comments to properly annotate Layer classes with constructor signatures.
- `getChannelStats` in snippet to show how to use it.

### Changed

- Fix interleaved RGB image handling.
- Add test for interleaved RGB images.
- Upgrade geotiff.js to fix https://github.com/geotiffjs/geotiff.js/issues/214

## 0.9.3
Expand Down
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
A library for multiscale visualization of high-resolution multiplexed bioimaging data on the web. Directly renders Bio-Formats-compatible Zarr and OME-TIFF.
Written in JavaScript and built on Deck.gl with modern web technologies.

<img src="https://github.com/hms-dbmi/viv/raw/master/docs/3d-slicing.gif" alt="drawing" width="400"/> <img src="https://github.com/hms-dbmi/viv/raw/master/docs/glomerular-lens.png" alt="drawing" width="400"/>

## About

Viv is a JavaScript library providing utilities for rendering primary imaging data. Viv supports WebGL-based multi-channel rendering of both pyramidal and non-pyramidal images. The rendering components of Viv are provided as Deck.gl layers, making it easy to compose images with existing layers and efficiently update rendering properties within a reactive paradigm.
Expand All @@ -20,21 +22,25 @@ More details can be found in our preprint describing the Viv library and related
### Tools Built with Viv

#### Vitessce

- http://vitessce.io

#### OME-NGFF:

- https://blog.openmicroscopy.org/file-formats/community/2020/11/04/zarr-data/
- https://blog.openmicroscopy.org/file-formats/community/2020/12/01/zarr-hcs/
- https://blog.openmicroscopy.org/file-formats/community/2020/12/01/zarr-hcs/

#### ImJoy:
- https://imjoy.io/docs/#/i2k_tutorial?id=open-integration-with-imjoy

- https://imjoy.io/docs/#/i2k_tutorial?id=open-integration-with-imjoy

#### Galaxy:

- The Avivator image viewer will be included as the default visualization for OME-TIFF files: https://github.com/galaxyproject/galaxy/pull/10534

#### HuBMAP CCF EUI:
- https://github.com/hubmapconsortium/ccf-ui

- https://github.com/hubmapconsortium/ccf-ui

## Supported Data Formats

Expand Down
133 changes: 56 additions & 77 deletions avivator/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion avivator/src/Avivator.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ export default function Avivator(props) {
// Set new image to default selection for non-global selections (0)
// and use current global selection otherwise.
selection[field] = GLOBAL_SLIDER_DIMENSION_FIELDS.includes(field)
? selections[0][field]
? globalSelections[field]
: 0;
});
const { domain, slider } = await getSingleSelectionStats({
Expand Down
11 changes: 10 additions & 1 deletion avivator/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,22 @@ function getDefaultGlobalSelection({ labels, shape }) {
return selection;
}

/**
* @param {Array.<number>} shape loader shape
*/
export function isInterleaved(shape) {
const lastDimSize = shape[shape.length - 1];
return lastDimSize === 3 || lastDimSize === 4;
}

// Create a default selection using the midpoint of the available global dimensions,
// and then the first four available selections from the first selectable channel.
/**
*
* @param { import('../../src/types').PixelSource<['t', 'z', 'c']> } pixelSource
*/
export function buildDefaultSelection(pixelSource) {
const selection = [];
let selection = [];
const globalSelection = getDefaultGlobalSelection(pixelSource);
// First non-global dimension with some sort of selectable values.

Expand All @@ -163,6 +171,7 @@ export function buildDefaultSelection(pixelSource) {
});
}

selection = isInterleaved(pixelSource.shape) ? [{ ...selection[0], c: 0 }] : selection;
return selection;
}

Expand Down
Binary file added docs/3d-slicing.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/glomerular-lens.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit d3e5bff

Please sign in to comment.