Appearance
copper3d / Modules / Utils/segmentation/NrrdTools / NrrdTools
Class: NrrdTools
Utils/segmentation/NrrdTools.NrrdTools
Hierarchy
↳
NrrdTools
Table of contents
Constructors
Properties
- baseCanvasesSize
- container
- contrastEventPrameters
- cursorPage
- dragOperator
- drawingPrameters
- eraserUrls
- guiParameterSettings
- gui_states
- initState
- mainAreaContainer
- nrrd_states
- paintedImage
- pencilUrls
- preTimer
- protectedData
- start
- storedPaintImages
- undoArray
Methods
- addSkip
- afterLoadSlice
- appendLoadingbar
- checkSharedPlaceSlice
- clear
- clearDictionary
- clearPaint
- clearStoreImages
- configContrastDragMode
- convertCursorPoint
- createEmptyPaintImage
- drag
- draw
- drawCalSphereDown
- drawCalSphereUp
- drawCalculatorSphere
- drawCalculatorSphereOnEachViews
- drawImageOnEmptyImage
- drawSphere
- enableContrastDragEvents
- filterDrawedImage
- findSliceInSharedPlace
- flipDisplayImageByAxis
- getContainer
- getCurrentImageDimension
- getCurrentSliceIndex
- getCurrentSlicesNumAndContrastNum
- getDrawingCanvas
- getGuiSettings
- getIsShowContrastState
- getMaskData
- getMaxSliceNum
- getNrrdToolsSettings
- getRestLabel
- getSharedPlace
- getSpaceOrigin
- getVoxelSpacing
- init
- initPaintImages
- loadDisplaySlicesArray
- loadingMaskByLabel
- redrawDisplayCanvas
- redrawMianPreOnDisplayCanvas
- reloadMaskToLabel
- removeContrastDragMode
- removeSkip
- replaceArray
- replaceHorizontalRowPixels
- replaceVerticalColPixels
- repraintCurrentContrastSlice
- resetDisplaySlicesStatus
- resetLayerCanvas
- resetPaintAreaUIPosition
- resizePaintArea
- setAllSlices
- setBaseDrawDisplayCanvasesSize
- setCalculateDistanceSphere
- setDisplaySliceIndexPanel
- setDisplaySlicesBaseOnAxis
- setEmptyCanvasSize
- setEraserUrls
- setIsDrawFalse
- setMainAreaSize
- setMainPreSlice
- setMasksData
- setOriginCanvasAndPre
- setPencilIconUrls
- setShowInMainArea
- setSliceMoving
- setSliceOrientation
- setSyncsliceNum
- setupConfigs
- setupConrastEvents
- setupGUI
- sliceArrayH
- sliceArrayV
- storeAllImages
- storeEachLayerImage
- storeImageToAxis
- storeImageToLabel
- switchAllSlicesArrayData
- undoLastPainting
- updateMaxIndex
- updateOriginAndChangedWH
- updateSlicesContrast
Constructors
constructor
• new NrrdTools(container
)
Parameters
Name | Type |
---|---|
container | HTMLDivElement |
Overrides
Defined in
src/Utils/segmentation/NrrdTools.ts:36
Properties
baseCanvasesSize
• baseCanvasesSize: number
= 1
Inherited from
Defined in
src/Utils/segmentation/CommToolsData.ts:15
container
• container: HTMLDivElement
Overrides
Defined in
src/Utils/segmentation/NrrdTools.ts:24
contrastEventPrameters
• contrastEventPrameters: IContrastEvents
Inherited from
DrawToolCore.contrastEventPrameters
Defined in
src/Utils/segmentation/DrawToolCore.ts:29
cursorPage
• cursorPage: ICursorPage
Inherited from
Defined in
src/Utils/segmentation/CommToolsData.ts:81
dragOperator
• dragOperator: DragOperator
Defined in
src/Utils/segmentation/NrrdTools.ts:27
drawingPrameters
• drawingPrameters: IDrawingEvents
Inherited from
Defined in
src/Utils/segmentation/DrawToolCore.ts:18
eraserUrls
• eraserUrls: string
[] = []
Inherited from
Defined in
src/Utils/segmentation/DrawToolCore.ts:42
guiParameterSettings
• Private
guiParameterSettings: undefined
| IGuiParameterSettings
Defined in
src/Utils/segmentation/NrrdTools.ts:34
gui_states
• gui_states: IGUIStates
Inherited from
Defined in
src/Utils/segmentation/CommToolsData.ts:102
initState
• Private
initState: boolean
= true
Defined in
src/Utils/segmentation/NrrdTools.ts:32
mainAreaContainer
• mainAreaContainer: HTMLDivElement
Inherited from
DrawToolCore.mainAreaContainer
Defined in
src/Utils/segmentation/DrawToolCore.ts:17
nrrd_states
• nrrd_states: INrrdStates
Inherited from
Defined in
src/Utils/segmentation/CommToolsData.ts:16
paintedImage
• Private
paintedImage: undefined
| IPaintImage
Defined in
src/Utils/segmentation/NrrdTools.ts:30
pencilUrls
• pencilUrls: string
[] = []
Inherited from
Defined in
src/Utils/segmentation/DrawToolCore.ts:43
preTimer
• Private
preTimer: any
Defined in
src/Utils/segmentation/NrrdTools.ts:33
protectedData
• protectedData: IProtected
Inherited from
Defined in
src/Utils/segmentation/CommToolsData.ts:154
start
• start: () => void
Type declaration
▸ (): void
Returns
void
Inherited from
Defined in
src/Utils/segmentation/DrawToolCore.ts:47
storedPaintImages
• storedPaintImages: undefined
| IStoredPaintImages
Defined in
src/Utils/segmentation/NrrdTools.ts:28
undoArray
• undoArray: IUndoType
[] = []
Inherited from
Defined in
src/Utils/segmentation/DrawToolCore.ts:44
Methods
addSkip
▸ addSkip(index
): void
Parameters
Name | Type |
---|---|
index | number |
Returns
void
Defined in
src/Utils/segmentation/NrrdTools.ts:606
afterLoadSlice
▸ Private
afterLoadSlice(): void
Returns
void
Defined in
src/Utils/segmentation/NrrdTools.ts:841
appendLoadingbar
▸ appendLoadingbar(loadingbar
): void
Parameters
Name | Type |
---|---|
loadingbar | HTMLDivElement |
Returns
void
Defined in
src/Utils/segmentation/NrrdTools.ts:900
checkSharedPlaceSlice
▸ checkSharedPlaceSlice(width
, height
, imageData
): Uint8ClampedArray
**************************** Utils for store image and itksnap core *************************************
Parameters
Name | Type |
---|---|
width | number |
height | number |
imageData | ImageData |
Returns
Uint8ClampedArray
Inherited from
DrawToolCore.checkSharedPlaceSlice
Defined in
src/Utils/segmentation/DrawToolCore.ts:1933
clear
▸ clear(): void
Returns
void
Defined in
src/Utils/segmentation/NrrdTools.ts:624
clearDictionary
▸ Private
clearDictionary(dic
): void
Parameters
Name | Type |
---|---|
dic | ISkipSlicesDictType |
Returns
void
Defined in
src/Utils/segmentation/NrrdTools.ts:1133
clearPaint
▸ clearPaint(): void
Clear mask on current slice canvas
Returns
void
Inherited from
Defined in
src/Utils/segmentation/DrawToolCore.ts:1468
clearStoreImages
▸ clearStoreImages(): void
Rewrite this {clearStoreImages} function under NrrdTools
Returns
void
Overrides
Defined in
src/Utils/segmentation/NrrdTools.ts:904
configContrastDragMode
▸ configContrastDragMode(): void
Returns
void
Inherited from
DrawToolCore.configContrastDragMode
Defined in
src/Utils/segmentation/DrawToolCore.ts:2078
convertCursorPoint
▸ convertCursorPoint(from
, to
, cursorNumX
, cursorNumY
, currentSliceIndex
): undefined
| { convertCursorNumX
: number
; convertCursorNumY
: number
; currentIndex
: number
; oldIndex
: number
}
We generate the MRI slice from threejs based on mm, but when we display it is based on pixel size/distance. So, the index munber on each axis (sagittal, axial, coronal) is the slice's depth in mm distance. And the width and height displayed on screen is the slice's width and height in pixel distance.
When we switch into different axis' views, we need to convert current view's the depth to the pixel distance in other views width or height, and convert the current view's width or height from pixel distance to mm distance as other views' depth (slice index) in general.
Then as for the crosshair (Cursor Inspector), we also need to convert the cursor point (x, y, z) to other views' (x, y, z).
Parameters
Name | Type | Description |
---|---|---|
from | "z" | "y" | "x" | "x" | "y" | "z", current view axis, "x: sagittle, y: coronal, z: axial". |
to | "z" | "y" | "x" | "x" | "y" | "z", target view axis (where you want jump to), "x: sagittle, y: coronal, z: axial". |
cursorNumX | number | number, cursor point x on current axis's slice. (pixel distance) |
cursorNumY | number | number, cursor point y on current axis's slice. (pixel distance) |
currentSliceIndex | number | number, current axis's slice's index/depth. (mm distance) |
Returns
undefined
| { convertCursorNumX
: number
; convertCursorNumY
: number
; currentIndex
: number
; oldIndex
: number
}
Inherited from
DrawToolCore.convertCursorPoint
Defined in
src/Utils/segmentation/DrawToolCore.ts:1311
createEmptyPaintImage
▸ createEmptyPaintImage(dimensions
, paintImages
): void
Rewrite this {createEmptyPaintImage} function under NrrdTools
Parameters
Name | Type |
---|---|
dimensions | number [] |
paintImages | IPaintImages |
Returns
void
Overrides
DrawToolCore.createEmptyPaintImage
Defined in
src/Utils/segmentation/NrrdTools.ts:407
drag
▸ drag(opts?
): void
core function for drag slices
Parameters
Name | Type |
---|---|
opts? | IDragOpts |
Returns
void
Defined in
src/Utils/segmentation/NrrdTools.ts:67
draw
▸ draw(opts?
): void
Parameters
Name | Type |
---|---|
opts? | IDrawOpts |
Returns
void
Inherited from
Defined in
src/Utils/segmentation/DrawToolCore.ts:143
drawCalSphereDown
▸ drawCalSphereDown(x
, y
, sliceIndex
, cal_position
): void
Parameters
Name | Type |
---|---|
x | number |
y | number |
sliceIndex | number |
cal_position | "tumour" | "skin" | "nipple" | "ribcage" |
Returns
void
Inherited from
DrawToolCore.drawCalSphereDown
Defined in
src/Utils/segmentation/DrawToolCore.ts:152
drawCalSphereUp
▸ drawCalSphereUp(): void
Returns
void
Inherited from
Defined in
src/Utils/segmentation/DrawToolCore.ts:196
drawCalculatorSphere
▸ drawCalculatorSphere(radius
): void
Parameters
Name | Type |
---|---|
radius | number |
Returns
void
Inherited from
DrawToolCore.drawCalculatorSphere
Defined in
src/Utils/segmentation/DrawToolCore.ts:1225
drawCalculatorSphereOnEachViews
▸ drawCalculatorSphereOnEachViews(axis
): void
Parameters
Name | Type |
---|---|
axis | "z" | "y" | "x" |
Returns
void
Inherited from
DrawToolCore.drawCalculatorSphereOnEachViews
Defined in
src/Utils/segmentation/DrawToolCore.ts:1059
drawImageOnEmptyImage
▸ drawImageOnEmptyImage(canvas
): void
Parameters
Name | Type |
---|---|
canvas | HTMLCanvasElement |
Returns
void
Inherited from
DrawToolCore.drawImageOnEmptyImage
Defined in
src/Utils/segmentation/DrawToolCore.ts:1040
drawSphere
▸ drawSphere(mouseX
, mouseY
, radius
): void
Parameters
Name | Type |
---|---|
mouseX | number |
mouseY | number |
radius | number |
Returns
void
Inherited from
Defined in
src/Utils/segmentation/DrawToolCore.ts:1256
enableContrastDragEvents
▸ enableContrastDragEvents(callback
): void
Enable the drag function for contrast images window center and window high.
Parameters
Name | Type |
---|---|
callback | (step : number , towards : "horizental" | "vertical" ) => void |
Returns
void
Defined in
src/Utils/segmentation/NrrdTools.ts:101
filterDrawedImage
▸ filterDrawedImage(axis
, sliceIndex
, paintedImages
): IPaintImage
Get a painted mask image (IPaintImage) based on current axis and input slice index.
Parameters
Name | Type | Description |
---|---|---|
axis | "z" | "y" | "x" | "x" | "y" | "z" |
sliceIndex | number | number |
paintedImages | IPaintImages | IPaintImages, All painted mask images. |
Returns
IPaintImage
Inherited from
DrawToolCore.filterDrawedImage
Defined in
src/Utils/segmentation/CommToolsData.ts:353
findSliceInSharedPlace
▸ findSliceInSharedPlace(): ImageData
[]
Returns
ImageData
[]
Inherited from
DrawToolCore.findSliceInSharedPlace
Defined in
src/Utils/segmentation/DrawToolCore.ts:1973
flipDisplayImageByAxis
▸ flipDisplayImageByAxis(): void
flip the canvas to a correct position. This is because the slice canvas from threejs is not in a correct 2D postion. Thus, everytime when we redraw the display canvas, we need to flip to draw the origin canvas from threejs. Under different axis(sagittal, Axial, Coronal), the flip orientation is different.
Returns
void
Overrides
DrawToolCore.flipDisplayImageByAxis
Defined in
src/Utils/segmentation/NrrdTools.ts:1116
getContainer
▸ getContainer(): HTMLElement
Returns
HTMLElement
Defined in
src/Utils/segmentation/NrrdTools.ts:693
getCurrentImageDimension
▸ getCurrentImageDimension(): number
[]
Returns
number
[]
Defined in
src/Utils/segmentation/NrrdTools.ts:333
getCurrentSliceIndex
▸ getCurrentSliceIndex(): number
Returns
number
Defined in
src/Utils/segmentation/NrrdTools.ts:720
getCurrentSlicesNumAndContrastNum
▸ getCurrentSlicesNumAndContrastNum(): Object
Returns
Object
Name | Type |
---|---|
contrastIndex | number |
currentIndex | number |
Defined in
src/Utils/segmentation/NrrdTools.ts:713
getDrawingCanvas
▸ getDrawingCanvas(): HTMLCanvasElement
Returns
HTMLCanvasElement
Defined in
src/Utils/segmentation/NrrdTools.ts:696
getGuiSettings
▸ getGuiSettings(): Object
Returns
Object
Name | Type |
---|---|
guiSetting | undefined | IGuiParameterSettings |
guiState | IGUIStates |
Defined in
src/Utils/segmentation/NrrdTools.ts:159
getIsShowContrastState
▸ getIsShowContrastState(): boolean
Returns
boolean
Defined in
src/Utils/segmentation/NrrdTools.ts:726
getMaskData
▸ getMaskData(): IMaskData
Returns
IMaskData
Defined in
src/Utils/segmentation/NrrdTools.ts:343
getMaxSliceNum
▸ getMaxSliceNum(): number
[]
Returns
number
[]
Defined in
src/Utils/segmentation/NrrdTools.ts:703
getNrrdToolsSettings
▸ getNrrdToolsSettings(): INrrdStates
Returns
INrrdStates
Defined in
src/Utils/segmentation/NrrdTools.ts:699
getRestLabel
▸ getRestLabel(): ("label1"
| "label2"
| "label3"
)[]
label div controls*************************
Returns
("label1"
| "label2"
| "label3"
)[]
Inherited from
Defined in
src/Utils/segmentation/DrawToolCore.ts:1449
getSharedPlace
▸ Private
getSharedPlace(len
, ratio
): number
[]
Parameters
Name | Type |
---|---|
len | number |
ratio | number |
Returns
number
[]
Defined in
src/Utils/segmentation/NrrdTools.ts:363
getSpaceOrigin
▸ getSpaceOrigin(): number
[]
Returns
number
[]
Defined in
src/Utils/segmentation/NrrdTools.ts:340
getVoxelSpacing
▸ getVoxelSpacing(): number
[]
Returns
number
[]
Defined in
src/Utils/segmentation/NrrdTools.ts:337
init
▸ Private
init(): void
A initialise function for nrrd_tools
Returns
void
Defined in
src/Utils/segmentation/NrrdTools.ts:176
initPaintImages
▸ Private
initPaintImages(dimensions
): void
init all painted images for store images
Parameters
Name | Type |
---|---|
dimensions | number [] |
Returns
void
Defined in
src/Utils/segmentation/NrrdTools.ts:388
loadDisplaySlicesArray
▸ Private
loadDisplaySlicesArray(): void
Returns
void
Defined in
src/Utils/segmentation/NrrdTools.ts:759
loadingMaskByLabel
▸ Private
loadingMaskByLabel(masks
, index
, imageData
): ImageData
Parameters
Name | Type |
---|---|
masks | exportPaintImageType [] |
index | number |
imageData | ImageData |
Returns
ImageData
Defined in
src/Utils/segmentation/NrrdTools.ts:248
redrawDisplayCanvas
▸ redrawDisplayCanvas(): void
Redraw current contrast image to display canvas. It is more related to change the contrast slice image's window width or center.
Returns
void
Overrides
DrawToolCore.redrawDisplayCanvas
Defined in
src/Utils/segmentation/NrrdTools.ts:1173
redrawMianPreOnDisplayCanvas
▸ redrawMianPreOnDisplayCanvas(): void
Returns
void
Defined in
src/Utils/segmentation/NrrdTools.ts:957
reloadMaskToLabel
▸ Private
reloadMaskToLabel(paintImages
, ctx
): void
Used to init the mask on each label and reload
Parameters
Name | Type |
---|---|
paintImages | IPaintImages |
ctx | CanvasRenderingContext2D |
Returns
void
Defined in
src/Utils/segmentation/NrrdTools.ts:1055
removeContrastDragMode
▸ removeContrastDragMode(): void
Returns
void
Inherited from
DrawToolCore.removeContrastDragMode
Defined in
src/Utils/segmentation/DrawToolCore.ts:2092
removeSkip
▸ removeSkip(index
): void
Parameters
Name | Type |
---|---|
index | number |
Returns
void
Defined in
src/Utils/segmentation/NrrdTools.ts:618
replaceArray
▸ replaceArray(mainArr
, replaceArr
): void
Parameters
Name | Type |
---|---|
mainArr | number [] | Uint8ClampedArray |
replaceArr | number [] | Uint8ClampedArray |
Returns
void
Inherited from
Defined in
src/Utils/segmentation/DrawToolCore.ts:1960
replaceHorizontalRowPixels
▸ replaceHorizontalRowPixels(paintImageArray
, length
, ratio
, markedArr
, targetWidth
, convertIndex
): void
Parameters
Name | Type | Description |
---|---|---|
paintImageArray | IPaintImage [] | : the target view slice's marked images array |
length | number | : the target view slice's dimention (total slice index num) |
ratio | number | : the target slice image's width/height ratio of its dimention length |
markedArr | number [][] | Uint8ClampedArray [] | : current painted image's horizontal 2d Array |
targetWidth | number | : the target image width |
convertIndex | number | : Mapping current image's index to target slice image's width/height pixel start point |
Returns
void
Inherited from
DrawToolCore.replaceHorizontalRowPixels
Defined in
src/Utils/segmentation/DrawToolCore.ts:1912
replaceVerticalColPixels
▸ replaceVerticalColPixels(paintImageArray
, length
, ratio
, markedArr
, targetWidth
, convertIndex
): void
Parameters
Name | Type | Description |
---|---|---|
paintImageArray | IPaintImage [] | : the target view slice's marked images array |
length | number | : the target view slice's dimention (total slice index num) |
ratio | number | : the target slice image's width/height ratio of its dimention length |
markedArr | number [][] | Uint8ClampedArray [] | : current painted image's vertical 2d Array |
targetWidth | number | : the target image width |
convertIndex | number | : Mapping current image's index to target slice image's width/height pixel start point |
Returns
void
Inherited from
DrawToolCore.replaceVerticalColPixels
Defined in
src/Utils/segmentation/DrawToolCore.ts:1879
repraintCurrentContrastSlice
▸ repraintCurrentContrastSlice(): void
Returns
void
Inherited from
DrawToolCore.repraintCurrentContrastSlice
Defined in
src/Utils/segmentation/DrawToolCore.ts:2142
resetDisplaySlicesStatus
▸ Private
resetDisplaySlicesStatus(): void
Returns
void
Defined in
src/Utils/segmentation/NrrdTools.ts:786
resetLayerCanvas
▸ resetLayerCanvas(): void
Clear masks on drawingCanvas layers.
Returns
void
Overrides
Defined in
src/Utils/segmentation/NrrdTools.ts:946
resetPaintAreaUIPosition
▸ resetPaintAreaUIPosition(l?
, t?
): void
Reset the draw and display canvases layout after mouse pan. If no params in, then center the draw and display canvases.
Parameters
Name | Type | Description |
---|---|---|
l? | number | number, Offset to the left |
t? | number | number, Offset to the top |
Returns
void
Overrides
DrawToolCore.resetPaintAreaUIPosition
Defined in
src/Utils/segmentation/NrrdTools.ts:926
resizePaintArea
▸ resizePaintArea(factor
): void
Resize the draw and display canvas size based on the input size factor number.
Parameters
Name | Type | Description |
---|---|---|
factor | number | number |
Returns
void
Overrides
Defined in
src/Utils/segmentation/NrrdTools.ts:985
setAllSlices
▸ setAllSlices(allSlices
): void
entry function
- { x:slice, y:slice, z:slice }
Parameters
Name | Type | Description |
---|---|---|
allSlices | nrrdSliceType [] | all nrrd contrast slices |
Returns
void
Defined in
src/Utils/segmentation/NrrdTools.ts:198
setBaseDrawDisplayCanvasesSize
▸ setBaseDrawDisplayCanvasesSize(size
): void
Set the Draw Display Canvas base size
Parameters
Name | Type | Description |
---|---|---|
size | number | number |
Returns
void
Defined in
src/Utils/segmentation/NrrdTools.ts:83
setCalculateDistanceSphere
▸ setCalculateDistanceSphere(x
, y
, sliceIndex
, cal_position
): void
Parameters
Name | Type |
---|---|
x | number |
y | number |
sliceIndex | number |
cal_position | "tumour" | "skin" | "nipple" | "ribcage" |
Returns
void
Defined in
src/Utils/segmentation/NrrdTools.ts:348
setDisplaySliceIndexPanel
▸ setDisplaySliceIndexPanel(panel
): void
Parameters
Name | Type |
---|---|
panel | HTMLDivElement |
Returns
void
Defined in
src/Utils/segmentation/NrrdTools.ts:93
setDisplaySlicesBaseOnAxis
▸ Private
setDisplaySlicesBaseOnAxis(): void
Returns
void
Defined in
src/Utils/segmentation/NrrdTools.ts:746
setEmptyCanvasSize
▸ setEmptyCanvasSize(axis?
): void
Set the empty canvas width and height based on the axis (pixel distance not the mm), to reduce duplicate codes.
Parameters
Name | Type |
---|---|
axis? | "z" | "y" | "x" |
Returns
void
Overrides
DrawToolCore.setEmptyCanvasSize
Defined in
src/Utils/segmentation/NrrdTools.ts:1144
setEraserUrls
▸ setEraserUrls(urls
): void
Parameters
Name | Type |
---|---|
urls | string [] |
Returns
void
Inherited from
Defined in
src/Utils/segmentation/DrawToolCore.ts:106
setIsDrawFalse
▸ setIsDrawFalse(target
): void
Give a delay time to finish the last drawing before upcoming interrupt opreations. Give a delay time number (ms) to disable the draw function, After your interrupt opeartion, you should enable the draw fucntion.
Parameters
Name | Type | Description |
---|---|---|
target | number | number |
Returns
void
Overrides
Defined in
src/Utils/segmentation/NrrdTools.ts:736
setMainAreaSize
▸ setMainAreaSize(factor
): void
Parameters
Name | Type |
---|---|
factor | number |
Returns
void
Defined in
src/Utils/segmentation/NrrdTools.ts:680
setMainPreSlice
▸ Private
setMainPreSlice(): void
Returns
void
Defined in
src/Utils/segmentation/NrrdTools.ts:810
setMasksData
▸ setMasksData(masksData
, loadingBar?
): void
Parameters
Name | Type |
---|---|
masksData | storeExportPaintImageType |
loadingBar? | loadingBarType |
Returns
void
Defined in
src/Utils/segmentation/NrrdTools.ts:265
setOriginCanvasAndPre
▸ Private
setOriginCanvasAndPre(): void
Returns
void
Defined in
src/Utils/segmentation/NrrdTools.ts:817
setPencilIconUrls
▸ setPencilIconUrls(urls
): void
Parameters
Name | Type |
---|---|
urls | string [] |
Returns
void
Inherited from
DrawToolCore.setPencilIconUrls
Defined in
src/Utils/segmentation/DrawToolCore.ts:109
setShowInMainArea
▸ Private
setShowInMainArea(): void
Returns
void
Defined in
src/Utils/segmentation/NrrdTools.ts:329
setSliceMoving
▸ setSliceMoving(step
): void
Parameters
Name | Type |
---|---|
step | number |
Returns
void
Defined in
src/Utils/segmentation/NrrdTools.ts:671
setSliceOrientation
▸ setSliceOrientation(axisTo
): void
Switch all contrast slices' orientation
Parameters
Name | Type |
---|---|
axisTo | "z" | "y" | "x" |
Returns
void
Defined in
src/Utils/segmentation/NrrdTools.ts:452
setSyncsliceNum
▸ setSyncsliceNum(): void
Keep all contrast slice index to same. Synchronize the slice indexes of all the contrasts so that they are consistent with the main slice's index.
Returns
void
Overrides
Defined in
src/Utils/segmentation/NrrdTools.ts:892
setupConfigs
▸ Private
setupConfigs(): void
Returns
void
Defined in
src/Utils/segmentation/NrrdTools.ts:793
setupConrastEvents
▸ setupConrastEvents(callback
): void
Set up root container events fns for drag function
Parameters
Name | Type |
---|---|
callback | (step : number , towards : "horizental" | "vertical" ) => void |
Returns
void
Inherited from
DrawToolCore.setupConrastEvents
Defined in
src/Utils/segmentation/DrawToolCore.ts:2025
setupGUI
▸ setupGUI(gui
): void
Set up GUI for drawing panel
Parameters
Name | Type | Description |
---|---|---|
gui | GUI | GUI |
Returns
void
Defined in
src/Utils/segmentation/NrrdTools.ts:109
sliceArrayH
▸ sliceArrayH(arr
, row
, col
): Uint8ClampedArray
[]
Parameters
Name | Type |
---|---|
arr | Uint8ClampedArray |
row | number |
col | number |
Returns
Uint8ClampedArray
[]
Inherited from
Defined in
src/Utils/segmentation/DrawToolCore.ts:1841
sliceArrayV
▸ sliceArrayV(arr
, row
, col
): number
[][]
Parameters
Name | Type |
---|---|
arr | Uint8ClampedArray |
row | number |
col | number |
Returns
number
[][]
Inherited from
Defined in
src/Utils/segmentation/DrawToolCore.ts:1852
storeAllImages
▸ storeAllImages(index
, label
): void
Parameters
Name | Type |
---|---|
index | number |
label | string |
Returns
void
Inherited from
Defined in
src/Utils/segmentation/DrawToolCore.ts:1598
storeEachLayerImage
▸ storeEachLayerImage(index
, label
): void
Parameters
Name | Type |
---|---|
index | number |
label | string |
Returns
void
Inherited from
DrawToolCore.storeEachLayerImage
Defined in
src/Utils/segmentation/DrawToolCore.ts:1799
storeImageToAxis
▸ storeImageToAxis(index
, paintedImages
, imageData
, axis?
): void
Store images*************************
Parameters
Name | Type |
---|---|
index | number |
paintedImages | IPaintImages |
imageData | ImageData |
axis? | "z" | "y" | "x" |
Returns
void
Inherited from
Defined in
src/Utils/segmentation/DrawToolCore.ts:1564
storeImageToLabel
▸ storeImageToLabel(index
, canvas
, paintedImages
): ImageData
Parameters
Name | Type |
---|---|
index | number |
canvas | HTMLCanvasElement |
paintedImages | IPaintImages |
Returns
ImageData
Inherited from
DrawToolCore.storeImageToLabel
Defined in
src/Utils/segmentation/DrawToolCore.ts:1779
switchAllSlicesArrayData
▸ switchAllSlicesArrayData(allSlices
): void
Parameters
Name | Type |
---|---|
allSlices | nrrdSliceType [] |
Returns
void
Defined in
src/Utils/segmentation/NrrdTools.ts:780
undoLastPainting
▸ undoLastPainting(): void
Rewrite this {undoLastPainting} function under DrawToolCore
Returns
void
Inherited from
Defined in
src/Utils/segmentation/DrawToolCore.ts:1487
updateMaxIndex
▸ Private
updateMaxIndex(): void
Returns
void
Defined in
src/Utils/segmentation/NrrdTools.ts:861
updateOriginAndChangedWH
▸ updateOriginAndChangedWH(): void
Update the original canvas size, allow set to threejs load one (pixel distance not the mm). Then update the changedWidth and changedHeight based on the sizeFoctor.
Returns
void
Overrides
DrawToolCore.updateOriginAndChangedWH
Defined in
src/Utils/segmentation/NrrdTools.ts:871
updateSlicesContrast
▸ updateSlicesContrast(value
, flag
): void
Parameters
Name | Type |
---|---|
value | number |
flag | string |
Returns
void
Inherited from
DrawToolCore.updateSlicesContrast