@@ -2,6 +2,7 @@ import vtkITKHelper from '@kitware/vtk.js/Common/DataModel/ITKHelper';
2
2
import vtkLiteHttpDataAccessHelper from '@kitware/vtk.js/IO/Core/DataAccessHelper/LiteHttpDataAccessHelper' ;
3
3
import vtkResourceLoader from '@kitware/vtk.js/IO/Core/ResourceLoader' ;
4
4
import vtkColorMaps from '@kitware/vtk.js/Rendering/Core/ColorTransferFunction/ColorMaps.js' ;
5
+ import { BlendMode } from '@kitware/vtk.js/Rendering/Core/VolumeMapper/Constants.js' ;
5
6
import { unzipSync } from 'fflate' ;
6
7
import { useContext , useEffect , useState } from 'react' ;
7
8
import './PET_CT_Overlay.css' ;
@@ -15,6 +16,7 @@ import {
15
16
SliceRepresentation ,
16
17
UseDataSet ,
17
18
View ,
19
+ VolumeRepresentation ,
18
20
} from 'react-vtk-js' ;
19
21
20
22
function Slider ( props ) {
@@ -243,7 +245,7 @@ function Example(props) {
243
245
style = { {
244
246
position : 'absolute' ,
245
247
left : '0px' ,
246
- width : '50 %' ,
248
+ width : '33 %' ,
247
249
height : '100%' ,
248
250
} }
249
251
>
@@ -298,8 +300,8 @@ function Example(props) {
298
300
< div
299
301
style = { {
300
302
position : 'absolute' ,
301
- left : '50 %' ,
302
- width : '50 %' ,
303
+ left : '33 %' ,
304
+ width : '33 %' ,
303
305
height : '100%' ,
304
306
} }
305
307
>
@@ -353,6 +355,37 @@ function Example(props) {
353
355
</ SliceRepresentation >
354
356
</ View >
355
357
</ div >
358
+ < div
359
+ style = { {
360
+ position : 'absolute' ,
361
+ left : '66%' ,
362
+ width : '33%' ,
363
+ height : '100%' ,
364
+ } }
365
+ >
366
+ < View
367
+ id = '0'
368
+ camera = { {
369
+ position : [ 0 , 0 , 0 ] ,
370
+ focalPoint : [ 0 , 1 , 0 ] ,
371
+ viewUp : [ 0 , 0 , 1 ] ,
372
+ parallelProjection : true ,
373
+ } }
374
+ background = { [ 0 , 0 , 0 ] }
375
+ >
376
+ < VolumeRepresentation
377
+ mapper = { {
378
+ blendMode : BlendMode . MAXIMUM_INTENSITY_BLEND ,
379
+ maximumSamplesPerRay : 2000 ,
380
+ } }
381
+ colorMapPreset = 'Grayscale'
382
+ useLookupTableScalarRange = { false }
383
+ shade = { false }
384
+ >
385
+ < UseDataSet id = 'ptData' />
386
+ </ VolumeRepresentation >
387
+ </ View >
388
+ </ div >
356
389
</ div >
357
390
</ ShareDataSetRoot >
358
391
</ MultiViewRoot >
0 commit comments