Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
142 commits
Select commit Hold shift + click to select a range
addf39c
feat: working react 18 upgrades (non-strict)
floryst Sep 21, 2022
e4a2f3e
feat(ts): working PolyDataWithData example
floryst Oct 26, 2022
0bd1637
fix(Algorithm): update viewer on algo update
floryst Oct 26, 2022
a601550
chore(usage): update vite and react plugin
floryst Oct 27, 2022
ab47f69
fix: do not bundle vtk.js
floryst Oct 27, 2022
7ff0eaa
refactor(View): split for readability
floryst Oct 27, 2022
ccf7552
feat(ts/View): add camera props
floryst Oct 27, 2022
e2c0f04
feat(ts/View): add interactor style
floryst Oct 27, 2022
a373b8f
fix(ts/View): set camera props in correct order
floryst Oct 27, 2022
73ca10c
fix(ts): add default props to previous props
floryst Oct 27, 2022
b111a3a
refactor: create reusable modules
floryst Nov 11, 2022
bca7d71
style: import order
floryst Nov 11, 2022
4fb11dd
fix(InteractorStyle): setStyle must be memoized
floryst Nov 15, 2022
1fde03c
feat(ShareDataSet): initial implementation
floryst Nov 15, 2022
d2a4bb2
refactor: move View modules to modules dir
floryst Nov 15, 2022
cdabc9d
fix(useProp): skip warning
floryst Nov 15, 2022
fa0d605
refactor(PolyData): remove id and re-sort deps
floryst Nov 15, 2022
673354f
refactor: make IDownstream an object
floryst Nov 15, 2022
71e4cea
fix(DataArray): register array before model update
floryst Nov 15, 2022
c22805f
feat(View): autoCenterOfRotation
floryst Nov 15, 2022
9a91034
feat: add ImageData and SliceRepresentation
floryst Nov 15, 2022
d570bb6
feat: add Geometry2DRepresentation
floryst Nov 15, 2022
6afe6bb
refactor: use deletion registry for obj tracking
floryst Nov 16, 2022
676d273
fix(Renderer): call correct resetCamera
floryst Nov 21, 2022
e37255c
feat: expose fine-grained components
floryst Nov 21, 2022
8175cf4
feat: remove interactor style if the same
floryst Jan 4, 2023
23aee9d
style: move contexts to same file
floryst Nov 22, 2022
3b31f20
fix(RenderWindow): remove setDraw calls for now
floryst Jan 5, 2023
405b5a4
feat(MultiViewRoot): initial implementation
floryst Jan 18, 2023
c673123
fix(Renderer): no need to call setDraw
floryst Jan 18, 2023
4108827
fix(PolyData): recompute bounds
floryst Jan 20, 2023
3adb234
fix(View): avoid always-null api
floryst Jan 20, 2023
be2b0a9
fix: update IView and move types to file
floryst Jan 20, 2023
a7806fd
refactor: delete old core files
floryst Jan 20, 2023
2df6b75
style(View): clarify SingleView and ParentedView
floryst Jan 20, 2023
ee76d85
feat(View): move interactor style up to View
floryst Jan 31, 2023
9735f16
feat(View): View handles center of rotation
floryst Jan 31, 2023
af7462a
feat(ParentedView): handle custom interactor style
floryst Jan 31, 2023
fb15fa0
refactor(View): split out Parented and Single View
floryst Jan 31, 2023
b5d9e8c
feat(View): expose container on API
floryst Feb 1, 2023
277ed9d
refactor: remove unused files
floryst Feb 1, 2023
3f1034e
fix(View): add getViewContainer to view API
floryst Feb 1, 2023
26f1139
feat: add more vtk.js types
floryst Feb 1, 2023
02f6d7b
feat(Picking): add Picking implementation
floryst Feb 1, 2023
e887c9d
fix(Picking): remove onSelect and split pick func
floryst Feb 1, 2023
6ae9b98
refactor: strip -ts folder suffix
floryst Feb 1, 2023
7825ddd
feat(FieldData): add component
floryst Feb 1, 2023
20d92b8
feat(CellData): add component
floryst Feb 1, 2023
7ac39a9
docs: update exampleship
floryst Feb 1, 2023
9204b18
refactor(usage/App): easier modifying example list
floryst Feb 1, 2023
501e6ec
fix(RenderWindow): setState race conditions
floryst Feb 1, 2023
dabebc6
fix(Picking): getCanvas fix
floryst Feb 1, 2023
913f80b
chore: update vtk.js
floryst Feb 1, 2023
e54e0b8
style: remove unused comments
floryst Feb 1, 2023
65fdbdf
chore: initial typescript types gen
floryst Feb 1, 2023
29c44c3
feat(Reader): port over this component
floryst Feb 14, 2023
4fcc192
docs(usage): update Reader examples
floryst Feb 14, 2023
f4b4d69
fix(useInteractorStyle): set style immediately
floryst Feb 14, 2023
169c5e4
fix(useCamera): filter out any null props
floryst Feb 14, 2023
598be45
fix(SliceRepresentation): copy-paste error
floryst Feb 14, 2023
596456e
feat(IRepresentation): expose actor and mapper
floryst Feb 14, 2023
8020f1f
fix(RenderWindow): queue a render after resize
floryst Feb 14, 2023
aa9d4dc
refactor(Picking): lowercase ID -> Id
floryst Feb 14, 2023
9ba919f
fix(useInteractorStyle): improve registration
floryst Feb 14, 2023
9241287
docs: Add BREAKING_CHANGES doc
floryst Feb 21, 2023
3af670b
chore: add missing plugin and update packages
floryst Feb 21, 2023
3f08176
Merge pull request #98 from Kitware/react-18
floryst Feb 22, 2023
dafe67d
chore: update vtk.js and types
floryst Feb 22, 2023
c00ffdc
Merge pull request #101 from Kitware/update-vtkjs
floryst Feb 22, 2023
4b92139
chore(github): update publish env
floryst Feb 22, 2023
f9d68ab
Merge pull request #102 from Kitware/update-github-publish-workflow
floryst Feb 22, 2023
29d65bf
chore: update rollup and other packages
floryst Feb 22, 2023
8498487
Merge pull request #103 from Kitware/update-packages
floryst Feb 22, 2023
5647188
feat(types): export types
floryst Mar 14, 2023
0cc3878
Merge pull request #105 from Kitware/export-types
floryst Mar 15, 2023
86ced66
chore(vtk.js): bump to 26.9.9
floryst Mar 31, 2023
f4a063e
fix(View): api is not optionally null
floryst Mar 31, 2023
6a1db28
feat(Dataset): initial dataset impl
floryst Mar 31, 2023
9aff778
feat(SliceRepresentation): mapper instance prop
floryst Mar 31, 2023
a1fe1ea
docs(usage): add ImageSeriesRendering example
floryst Mar 31, 2023
674b232
fix(useInteractorStyle): no presets with external styles
floryst Apr 6, 2023
57fd95f
Merge pull request #107 from Kitware/detect-external-style
floryst Apr 6, 2023
8d700e3
fix(useInteractorStyle): track effect deps
floryst Apr 6, 2023
9722b83
fix(useInteractorStyle): get latest value
floryst Apr 6, 2023
f8a7e62
Merge pull request #108 from Kitware/fix-isExternalStyle-tracking
floryst Apr 6, 2023
0bc5c85
fix(Picking): use react event system
floryst Apr 13, 2023
a55e689
Merge pull request #110 from Kitware/picking-uses-react-events
floryst Apr 18, 2023
22a4948
Merge pull request #106 from Kitware/datasets-and-image-array-mapper
floryst Apr 18, 2023
0863e96
feat: onDataAvailable representation callback
floryst May 22, 2023
f877b65
Merge pull request #111 from Kitware/ondataavailable-callback
floryst May 24, 2023
2e84f19
fix: do not show data if dataset is deleted
floryst Jun 8, 2023
98c1c27
docs(usage): add simple RemoveImageData test
floryst Jun 8, 2023
1af4ecf
Merge pull request #113 from Kitware/hide-actor-when-no-data
floryst Jun 8, 2023
4b009e5
feat(vtk.js): update vtk.js to 26.9.9
jun-sironamedical Jul 5, 2023
ae5e18a
Merge pull request #115 from jun-sironamedical/bump-vtk-26.9.9
floryst Jul 6, 2023
353b78a
fix: do not retrigger onDataAvailable
floryst Jul 10, 2023
1d86e33
Merge pull request #116 from Kitware/fix-data-available-triggers
floryst Jul 11, 2023
f2efe04
fix(DataArray): setRange with all valid indices
jadh4v Jul 26, 2023
d45d66d
Merge pull request #117 from jadh4v/fix-DataArray-setRange
floryst Jul 27, 2023
23801ba
feat(vtk.js): bump to v28.13.0
floryst Oct 23, 2023
ec3f872
feat(react): update react peer version
tamaynard Oct 29, 2023
6549e9d
Merge pull request #121 from tamaynard/beta
floryst Oct 30, 2023
f68e400
feat(VolumeRepresentation): initial add
floryst Jan 16, 2024
7ed06f4
feat: onDataAvailable/Changed event hooks
floryst Jan 16, 2024
71b04b8
feat(VolumeController): add impl
floryst Jan 16, 2024
f03d81a
docs(usage): add demos for volume representation
floryst Jan 16, 2024
894aff7
Merge pull request #124 from Kitware/add-volume-representation
floryst Jan 16, 2024
f6451eb
fix(ParentedView): mouse scrolling behavior for out-of-focus windows
jadh4v Jan 19, 2024
e95a7f3
Merge pull request #125 from jadh4v/fix-mouse-scrolling-out-of-focus-…
floryst Jan 26, 2024
382e3a8
bump(vtk.js): to version 29.4.5
jadh4v Jan 26, 2024
418802a
Merge pull request #126 from jadh4v/bump-vtk-js-to-29.4.5
floryst Jan 26, 2024
822444f
feat(context): uniform naming and main export
floryst Feb 22, 2024
e31d803
fix(ParentedView): switch interactor on capture
floryst Feb 28, 2024
5bd0ec1
Merge pull request #128 from Kitware/fix-event-ordering
floryst Mar 1, 2024
d47f388
feat: add view mounted suspense hook
floryst Feb 22, 2024
c4e287e
Merge pull request #127 from Kitware/suspense-hook
floryst Mar 1, 2024
1ccc505
Example of PET-CT fusion overlay rendering
sankhesh Apr 15, 2024
986d52b
Add coronal view to the PET-CT overlay example
sankhesh Apr 15, 2024
c13170c
Use the PET data scalar range for color mapping
sankhesh Apr 15, 2024
8475197
Ensure PET data is always over using coincident offset
sankhesh Apr 15, 2024
a1297f7
Merge pull request #129 from sankhesh/pet_ct_overlay
floryst Apr 17, 2024
f2af760
fix(Picking): guard against unmounted state
floryst Apr 22, 2024
4d03628
fix(Picking): guard against deleted selector
floryst Apr 22, 2024
39f142d
Add MIP rendering of PET data
sankhesh Apr 24, 2024
b2d750f
Merge pull request #132 from sankhesh/pet_mip
floryst Jun 4, 2024
e5d6187
ENH: Generalize detection and handling of PT-CT overlap
jadh4v Jun 5, 2024
e5b4e7b
Merge pull request #134 from jadh4v/pet-ct-generalize-overlap
floryst Jun 11, 2024
167843d
feat: add color + opacity funcs to slice + volume
floryst Jun 13, 2024
387f611
Merge pull request #135 from Kitware/add-color-opacity-functions
floryst Jun 17, 2024
2a6496f
fix(useColorAndOpacity): set as null
floryst Jun 17, 2024
806ad65
Merge pull request #136 from Kitware/fix-ts-error
floryst Jun 17, 2024
e94f744
🔧 MA-34 Fix Reader TSX
cornking2020 Jun 19, 2024
f2f8e5b
Merge pull request #137 from cornking2020/bugfix/MA-34-reader
floryst Jul 2, 2024
6d6bb0d
feat(example): PET MIP with window/level adjustment
jadh4v Jul 30, 2024
0633dbc
Merge pull request #138 from jadh4v/feat-window-level-adjustment-pet-…
floryst Sep 17, 2024
c9aa1a1
Support user defined color map preset
SiouxSigma Nov 15, 2024
02c9c68
Merge pull request #140 from sigmama/feature/support-custom-color-map
floryst Nov 21, 2024
bec3596
Merge pull request #131 from Kitware/fix-picking-after-unmount
floryst Aug 14, 2025
cdd5acd
Merge branch 'master' into beta
floryst Aug 19, 2025
2828274
Merge pull request #142 from Kitware/update-beta-with-master
floryst Aug 19, 2025
707ca3f
chore: update github runner versions
floryst Aug 20, 2025
0264852
Merge pull request #143 from Kitware/update-beta-with-master
floryst Aug 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
{
"parser": "babel-eslint",
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": [
"standard",
"standard-react",
"prettier",
"plugin:prettier/recommended",
"prettier/standard",
"prettier/react"
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:react-hooks/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"env": {
"browser": true
Expand All @@ -28,6 +32,8 @@
"react/jsx-handler-names": 0,
"react/jsx-fragments": 0,
"react/no-unused-prop-types": 0,
"import/export": 0
"import/export": 0,
"n/no-callback-literal": 0,
"@typescript-eslint/no-explicit-any": 0
}
}
4 changes: 2 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
publish:
name: Publish
runs-on: ubuntu-18.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -17,7 +17,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: 12
node-version: 22
- name: Install dependencies
run: npm ci
- name: Build
Expand Down
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
"bracketSpacing": true,
"jsxBracketSameLine": false,
"arrowParens": "always",
"trailingComma": "es5"
"trailingComma": "es5",
"plugins": ["prettier-plugin-organize-imports"]
}
93 changes: 93 additions & 0 deletions BREAKING_CHANGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Breaking Changes & Migration

## v1 to v2

V2 represents a major shift away from the class-based components towards functional components. There are several goals and reasons for this migration:
- Addresses some bugs inherent in how contexts were being consumed.
- Addresses a major issue with regards to parent-child unmounting order being at odds with vtk.js resource management.
- Migrates the codebase to Typescript and React 18. This also means we will expose Typescript types.
- Does some clean-up on props and some confusing component usage.
- Addresses rendering performance via batching.

Once V2 is released, V1 will be considered legacy. Bugfixes may still be made for it, but V2 will be considered current.

### Picking

The `View` component no longer has any of the picking modes or picking props. Instead, a new `<Picking />` component is provided. Most of the API has been moved over with no changes, except for the following:

- `setProps` prop and the `*info` readonly props, which have been removed.
- `onSelect` has been removed. Instead, look at the Picking example for how to get the same functionality.

There is a new `onHoverDebounceWait` parameter that determines the debounce wait threshold for the onHover event.

`View.pick` from before has been split into `pick` and `pickWithFrustum`, since they return different types.


### GeometryRepresentation

The cube axes and scalar bar have been split out into their own components.

### Algorithm

`<Algorithm>` can take both a vtk.js class as a string name or as the vtk.js class directly. In both cases, you must import the class in order for it to register with the vtk string constructor.

### ShareDataSet

ShareDataSet is no longer global. You must specify a ShareDataSetRoot as an ancestor to the subtree in which you wish to use ShareDataSet. The new API looks like the following:

<ShareDataSetRoot>
<RegisterDataSet id="cone">
<Algorithm vtkClass={vtkConeSource} />
</RegisterDataSet>
<View>
<GeometryRepresentation>
<UseDataSet id="cone" />
</GeometryRepresentation>
</View>
</ShareDataSetRoot>

### View

The View imperative ref API has changed completely. Refer to the `IView` type for more info. Examples of changes needed:

- `view.camera` is now `view.getCamera()`
- `view.openglRenderWindow` is now `view.getOpenGLRenderWindow().get()`
- `view.interactor` is now `view.getRenderWindow().getInteractor()`
- `view.renderView()` is now `view.requestRender()`

The `autoResetCamera` prop supercedes the `triggerResetCamera` prop. When `autoResetCamera` is true (by default), camera will now reset whenever the data in the scene changes.

The `triggerRender` prop is removed in favor of using the imperative API: `viewRef.current.requestRender()`.

The `camera` prop supercedes the old `camera*` prefixed props (i.e. cameraPosition, cameraFocalPoint, etc.). `camera` must be specified as a collection of camera properties to be set.

The default keybinds for resetting the camera (`KeyR`) has been removed. Application developers should decide if they want this functionality back by adding a keyboard listener and calling `viewRef.current.resetCamera()`.

All picking props have been removed. See the `<Picking />` component.

### Contexts

The exposed contexts have changed APIs and names. The following is a list of available contexts (from `contexts.ts`):

- OpenGLRenderWindowContext
- RenderWindowContext
- RendererContext
- FieldDataContext
- DatasetContext
- RepresentationContext
- DownstreamContext
- ShareDataSetContext
- MultiViewRootContext
- ViewContext

### MultiViewRoot

The `disabled` prop no longer exists.

### Reader

- `arrayBuffer` prop now accepts an ArrayBuffer. `base64ArrayBuffer` takes a Base64 string of an ArrayBuffer.
- `vtkClass` prop now takes a vtk class. String is still supported, but you must import to register the class first.
- `renderOnUpdate` and `resetCameraOnUpdate` no longer exist. This is automatic.
- `options` has been renamed to `urlOptions`.
- `id` is not used.
3 changes: 3 additions & 0 deletions babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["@babel/preset-env", "@babel/preset-react"]
}
Loading