conflux-viewer

Conflux Viewer : A react viewer for whole slide images

Live Demo

Conflux Viewer is a light-weight, and easy to use React component that supports opening and viewing whole slide images directly in the browser. The viewer is built on top of our webassembly port of OpenSlide. Currently only Aperio SVS format is supported, more formats will be released in the future.

image

Getting Started

You can use yarn or npm to install the components and peer dependency

yarn add @conflux-xyz/openslide-wasm
yarn add @conflux-xyz/conflux-viewer
yarn install

Sample usage:

import {
  SlideMiniView,
  SlideMPPScale,
  SlideViewer,
  SlideZoom,
} from "conflux-viewer";
import { OpenSlideContextProvider } from "conflux-viewer";
import "conflux-viewer/dist/style.css";

function App() {
  return (
    <OpenSlideContextProvider>
      <div style=>
        <SlideViewer
          style=
          fileOrUrl="https://github.conflux.xyz/conflux-viewer/images/JP2K-33003-1.svs"
        >
          <SlideMPPScale />
          <SlideMiniView />
          <SlideZoom />
        </SlideViewer>
      </div>
    </OpenSlideContextProvider>
  );
}

export default App;