Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
77 changes: 37 additions & 40 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/src/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Custom itk-viewer Material UI Demo</title>
</head>
<body>
<div
class="content"
style="

<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/src/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Custom itk-viewer Boostrap UI Demo</title>
</head>

<body>
<div class="content" style="
position: absolute;
width: 100vw;
height: 100vh;
Expand All @@ -19,35 +19,32 @@
background: black;
margin: 0;
padding: 0;
"
></div>
<script
type="text/javascript"
src="https://cdn.jsdelivr.net/npm/itk-vtk-viewer@13.0.0/dist/itkVtkViewer.js"
></script>
<script>
const container = document.querySelector('.content')
const ipfsImage = new URL(
'./test-data/HeadMRVolume.nrrd',
"></div>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/itk-vtk-viewer@13.0.0/dist/itkVtkViewer.js"></script>
<script>
const container = document.querySelector('.content')
const ipfsImage = new URL(
'./test-data/HeadMRVolume.nrrd',
document.location.origin
)
const labelImage = new URL(
'./test-data/HeadMRVolumeLabels.nrrd',
document.location.origin
)

const uiMachineOptions = {
href: new URL(
'/src/bootstrapUIMachineOptions.js',
document.location.origin
)
const labelImage = new URL(
'./test-data/HeadMRVolumeLabels.nrrd',
document.location.origin
)
).href
}
itkVtkViewer.createViewer(container, {
image: ipfsImage,
labelImage,
rotate: false,
config: { uiMachineOptions }
})
</script>
</body>

const uiMachineOptions = {
href: new URL(
'/src/materialUIMachineOptions.js',
document.location.origin
).href
}
itkVtkViewer.createViewer(container, {
image: ipfsImage,
labelImage,
rotate: false,
config: { uiMachineOptions }
})
</script>
</body>
</html>
</html>
79 changes: 38 additions & 41 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/src/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Custom itk-viewer Material UI Demo</title>
</head>
<body>
<div
class="content"
style="

<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/src/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Custom itk-viewer Bootstrap UI Demo</title>
</head>

<body>
<div class="content" style="
position: absolute;
width: 100vw;
height: 100vh;
Expand All @@ -19,35 +19,32 @@
background: black;
margin: 0;
padding: 0;
"
></div>
<script
type="text/javascript"
src="https://cdn.jsdelivr.net/npm/itk-vtk-viewer@13.0.0/dist/itkVtkViewer.js"
></script>
<script>
const container = document.querySelector('.content')
const ipfsImage = new URL(
'./test-data/HeadMRVolume.nrrd',
document.location.origin
)
const labelImage = new URL(
'./test-data/HeadMRVolumeLabels.nrrd',
document.location.origin
)
"></div>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/itk-vtk-viewer@13.0.0/dist/itkVtkViewer.js"></script>
<script>
const container = document.querySelector('.content')
const ipfsImage = new URL(
'./test-data/HeadMRVolume.nrrd',
document.location.origin
)
const labelImage = new URL(
'./test-data/HeadMRVolumeLabels.nrrd',
document.location.origin
)

const uiMachineOptions = {
href: new URL(
'./bootstrapUIMachineOptions.js.es.js',
document.location.origin
).href
}
itkVtkViewer.createViewer(container, {
image: ipfsImage,
labelImage,
rotate: false,
config: { uiMachineOptions }
})
</script>
</body>

const uiMachineOptions = {
href: new URL(
'./materialUIMachineOptions.js.es.js',
document.location.origin
).href
}
itkVtkViewer.createViewer(container, {
image: ipfsImage,
labelImage,
rotate: false,
config: { uiMachineOptions }
})
</script>
</body>
</html>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import toggleUICollapsed from './toggleUICollapsed.jsx'

import './App.scss'

const materialUIMachineOptions = {
const boostrapUIMachineOptions = {
main: mainUIMachineOptions,

layers: layersUIMachineOptions,
Expand All @@ -27,4 +27,4 @@ const materialUIMachineOptions = {
}
}

export default materialUIMachineOptions
export default boostrapUIMachineOptions
5 changes: 2 additions & 3 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ export default defineConfig({
plugins: [reactRefresh(), cssInjectedByJsPlugin()],
build: {
lib: {
entry: path.resolve(__dirname, 'src', 'materialUIMachineOptions.js'),
name: 'materialUIMachineOptions',
entry: path.resolve(__dirname, 'src', 'bootstrapUIMachineOptions.js'),
name: 'bootstrapUIMachineOptions',
formats: ['es'],
fileName: 'materialUIMachineOptions.js'
}
},
resolve: {
Expand Down