Skip to content

Commit

Permalink
Merge pull request #132 from sankhesh/pet_mip
Browse files Browse the repository at this point in the history
Add MIP rendering of PET data
  • Loading branch information
floryst authored Jun 4, 2024
2 parents a1297f7 + 39f142d commit b2d750f
Showing 1 changed file with 36 additions and 3 deletions.
39 changes: 36 additions & 3 deletions usage/src/Volume/PET_CT_Overlay.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import vtkITKHelper from '@kitware/vtk.js/Common/DataModel/ITKHelper';
import vtkLiteHttpDataAccessHelper from '@kitware/vtk.js/IO/Core/DataAccessHelper/LiteHttpDataAccessHelper';
import vtkResourceLoader from '@kitware/vtk.js/IO/Core/ResourceLoader';
import vtkColorMaps from '@kitware/vtk.js/Rendering/Core/ColorTransferFunction/ColorMaps.js';
import { BlendMode } from '@kitware/vtk.js/Rendering/Core/VolumeMapper/Constants.js';
import { unzipSync } from 'fflate';
import { useContext, useEffect, useState } from 'react';
import './PET_CT_Overlay.css';
Expand All @@ -15,6 +16,7 @@ import {
SliceRepresentation,
UseDataSet,
View,
VolumeRepresentation,
} from 'react-vtk-js';

function Slider(props) {
Expand Down Expand Up @@ -243,7 +245,7 @@ function Example(props) {
style={{
position: 'absolute',
left: '0px',
width: '50%',
width: '33%',
height: '100%',
}}
>
Expand Down Expand Up @@ -298,8 +300,8 @@ function Example(props) {
<div
style={{
position: 'absolute',
left: '50%',
width: '50%',
left: '33%',
width: '33%',
height: '100%',
}}
>
Expand Down Expand Up @@ -353,6 +355,37 @@ function Example(props) {
</SliceRepresentation>
</View>
</div>
<div
style={{
position: 'absolute',
left: '66%',
width: '33%',
height: '100%',
}}
>
<View
id='0'
camera={{
position: [0, 0, 0],
focalPoint: [0, 1, 0],
viewUp: [0, 0, 1],
parallelProjection: true,
}}
background={[0, 0, 0]}
>
<VolumeRepresentation
mapper={{
blendMode: BlendMode.MAXIMUM_INTENSITY_BLEND,
maximumSamplesPerRay: 2000,
}}
colorMapPreset='Grayscale'
useLookupTableScalarRange={false}
shade={false}
>
<UseDataSet id='ptData' />
</VolumeRepresentation>
</View>
</div>
</div>
</ShareDataSetRoot>
</MultiViewRoot>
Expand Down

0 comments on commit b2d750f

Please sign in to comment.