Skip to content

Commit f44267b

Browse files
committed
Clean up.
1 parent c0b6a5c commit f44267b

File tree

2 files changed

+96
-96
lines changed

2 files changed

+96
-96
lines changed

examples/js/Volume.js

Lines changed: 68 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,21 @@ THREE.Volume = function( xLength, yLength, zLength, type, arrayBuffer ) {
1616
if ( arguments.length > 0 ) {
1717

1818
/**
19-
* @member {number} xLength Width of the volume in the IJK coordinate system
20-
*/
19+
* @member {number} xLength Width of the volume in the IJK coordinate system
20+
*/
2121
this.xLength = Number( xLength ) || 1;
2222
/**
23-
* @member {number} yLength Height of the volume in the IJK coordinate system
24-
*/
23+
* @member {number} yLength Height of the volume in the IJK coordinate system
24+
*/
2525
this.yLength = Number( yLength ) || 1;
2626
/**
27-
* @member {number} zLength Depth of the volume in the IJK coordinate system
28-
*/
27+
* @member {number} zLength Depth of the volume in the IJK coordinate system
28+
*/
2929
this.zLength = Number( zLength ) || 1;
3030

3131
/**
32-
* @member {TypedArray} data Data of the volume
33-
*/
32+
* @member {TypedArray} data Data of the volume
33+
*/
3434

3535
switch ( type ) {
3636

@@ -117,25 +117,25 @@ THREE.Volume = function( xLength, yLength, zLength, type, arrayBuffer ) {
117117
}
118118

119119
/**
120-
* @member {Array} spacing Spacing to apply to the volume from IJK to RAS coordinate system
121-
*/
120+
* @member {Array} spacing Spacing to apply to the volume from IJK to RAS coordinate system
121+
*/
122122
this.spacing = [ 1, 1, 1 ];
123123
/**
124-
* @member {Array} offset Offset of the volume in the RAS coordinate system
125-
*/
124+
* @member {Array} offset Offset of the volume in the RAS coordinate system
125+
*/
126126
this.offset = [ 0, 0, 0 ];
127127
/**
128-
* @member {THREE.Martrix3} matrix The IJK to RAS matrix
129-
*/
128+
* @member {THREE.Martrix3} matrix The IJK to RAS matrix
129+
*/
130130
this.matrix = new THREE.Matrix3();
131131
this.matrix.identity();
132132
/**
133-
* @member {THREE.Martrix3} inverseMatrix The RAS to IJK matrix
134-
*/
133+
* @member {THREE.Martrix3} inverseMatrix The RAS to IJK matrix
134+
*/
135135
/**
136136
* @member {number} lowerThreshold The voxels with values under this threshold won't appear in the slices.
137-
* If changed, geometryNeedsUpdate is automatically set to true on all the slices associated to this volume
138-
*/
137+
* If changed, geometryNeedsUpdate is automatically set to true on all the slices associated to this volume
138+
*/
139139
var lowerThreshold = - Infinity;
140140
Object.defineProperty( this, 'lowerThreshold', {
141141
get : function() {
@@ -195,39 +195,39 @@ THREE.Volume.prototype = {
195195
constructor : THREE.Volume,
196196

197197
/**
198-
* @member {Function} getData Shortcut for data[access(i,j,k)]
199-
* @memberof THREE.Volume
200-
* @param {number} i First coordinate
201-
* @param {number} j Second coordinate
202-
* @param {number} k Third coordinate
203-
* @returns {number} value in the data array
204-
*/
198+
* @member {Function} getData Shortcut for data[access(i,j,k)]
199+
* @memberof THREE.Volume
200+
* @param {number} i First coordinate
201+
* @param {number} j Second coordinate
202+
* @param {number} k Third coordinate
203+
* @returns {number} value in the data array
204+
*/
205205
getData : function( i, j, k ) {
206206

207207
return this.data[ k * this.xLength * this.yLength + j * this.xLength + i ];
208208

209209
},
210210

211211
/**
212-
* @member {Function} access compute the index in the data array corresponding to the given coordinates in IJK system
213-
* @memberof THREE.Volume
214-
* @param {number} i First coordinate
215-
* @param {number} j Second coordinate
216-
* @param {number} k Third coordinate
217-
* @returns {number} index
218-
*/
212+
* @member {Function} access compute the index in the data array corresponding to the given coordinates in IJK system
213+
* @memberof THREE.Volume
214+
* @param {number} i First coordinate
215+
* @param {number} j Second coordinate
216+
* @param {number} k Third coordinate
217+
* @returns {number} index
218+
*/
219219
access : function( i, j, k ) {
220220

221221
return k * this.xLength * this.yLength + j * this.xLength + i;
222222

223223
},
224224

225225
/**
226-
* @member {Function} reverseAccess Retrieve the IJK coordinates of the voxel corresponding of the given index in the data
227-
* @memberof THREE.Volume
228-
* @param {number} index index of the voxel
229-
* @returns {Array} [x,y,z]
230-
*/
226+
* @member {Function} reverseAccess Retrieve the IJK coordinates of the voxel corresponding of the given index in the data
227+
* @memberof THREE.Volume
228+
* @param {number} index index of the voxel
229+
* @returns {Array} [x,y,z]
230+
*/
231231
reverseAccess : function( index ) {
232232

233233
var z = Math.floor( index / ( this.yLength * this.xLength ) );
@@ -238,15 +238,15 @@ THREE.Volume.prototype = {
238238
},
239239

240240
/**
241-
* @member {Function} map Apply a function to all the voxels, be careful, the value will be replaced
242-
* @memberof THREE.Volume
243-
* @param {Function} functionToMap A function to apply to every voxel, will be called with the following parameters :
244-
* value of the voxel
245-
* index of the voxel
246-
* the data (TypedArray)
247-
* @param {Object} context You can specify a context in which call the function, default if this Volume
248-
* @returns {THREE.Volume} this
249-
*/
241+
* @member {Function} map Apply a function to all the voxels, be careful, the value will be replaced
242+
* @memberof THREE.Volume
243+
* @param {Function} functionToMap A function to apply to every voxel, will be called with the following parameters :
244+
* value of the voxel
245+
* index of the voxel
246+
* the data (TypedArray)
247+
* @param {Object} context You can specify a context in which call the function, default if this Volume
248+
* @returns {THREE.Volume} this
249+
*/
250250
map : function( functionToMap, context ) {
251251

252252
var length = this.data.length;
@@ -263,12 +263,12 @@ THREE.Volume.prototype = {
263263
},
264264

265265
/**
266-
* @member {Function} extractPerpendicularPlane Compute the orientation of the slice and returns all the information relative to the geometry such as sliceAccess, the plane matrix (orientation and position in RAS coordinate) and the dimensions of the plane in both coordinate system.
267-
* @memberof THREE.Volume
268-
* @param {string} axis the normal axis to the slice 'x' 'y' or 'z'
269-
* @param {number} index the index of the slice
270-
* @returns {Object} an object containing all the usefull information on the geometry of the slice
271-
*/
266+
* @member {Function} extractPerpendicularPlane Compute the orientation of the slice and returns all the information relative to the geometry such as sliceAccess, the plane matrix (orientation and position in RAS coordinate) and the dimensions of the plane in both coordinate system.
267+
* @memberof THREE.Volume
268+
* @param {string} axis the normal axis to the slice 'x' 'y' or 'z'
269+
* @param {number} index the index of the slice
270+
* @returns {Object} an object containing all the usefull information on the geometry of the slice
271+
*/
272272
extractPerpendicularPlane : function( axis, RASIndex ) {
273273

274274
var iLength,
@@ -380,13 +380,13 @@ THREE.Volume.prototype = {
380380
},
381381

382382
/**
383-
* @member {Function} extractSlice Returns a slice corresponding to the given axis and index
384-
* The coordinate are given in the Right Anterior Superior coordinate format
385-
* @memberof THREE.Volume
386-
* @param {string} axis the normal axis to the slice 'x' 'y' or 'z'
387-
* @param {number} index the index of the slice
388-
* @returns {THREE.VolumeSlice} the extracted slice
389-
*/
383+
* @member {Function} extractSlice Returns a slice corresponding to the given axis and index
384+
* The coordinate are given in the Right Anterior Superior coordinate format
385+
* @memberof THREE.Volume
386+
* @param {string} axis the normal axis to the slice 'x' 'y' or 'z'
387+
* @param {number} index the index of the slice
388+
* @returns {THREE.VolumeSlice} the extracted slice
389+
*/
390390
extractSlice : function( axis, index ) {
391391

392392
var slice = new THREE.VolumeSlice( this, index, axis );
@@ -396,11 +396,11 @@ THREE.Volume.prototype = {
396396
},
397397

398398
/**
399-
* @member {Function} repaintAllSlices Call repaint on all the slices extracted from this volume
400-
* @see THREE.VolumeSlice.repaint
401-
* @memberof THREE.Volume
402-
* @returns {THREE.Volume} this
403-
*/
399+
* @member {Function} repaintAllSlices Call repaint on all the slices extracted from this volume
400+
* @see THREE.VolumeSlice.repaint
401+
* @memberof THREE.Volume
402+
* @returns {THREE.Volume} this
403+
*/
404404
repaintAllSlices : function() {
405405

406406
this.sliceList.forEach( function( slice ) {
@@ -414,10 +414,10 @@ THREE.Volume.prototype = {
414414
},
415415

416416
/**
417-
* @member {Function} computeMinMax Compute the minimum and the maximum of the data in the volume
418-
* @memberof THREE.Volume
419-
* @returns {Array} [min,max]
420-
*/
417+
* @member {Function} computeMinMax Compute the minimum and the maximum of the data in the volume
418+
* @memberof THREE.Volume
419+
* @returns {Array} [min,max]
420+
*/
421421
computeMinMax : function() {
422422

423423
var min = Infinity;

examples/js/VolumeSlice.js

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ THREE.VolumeSlice = function( volume, index, axis ) {
1111

1212
var slice = this;
1313
/**
14-
* @member {THREE.Volume} volume The associated volume
15-
*/
14+
* @member {THREE.Volume} volume The associated volume
15+
*/
1616
this.volume = volume;
1717
/**
1818
* @member {Number} index The index of the slice, if changed, will automatically call updateGeometry at the next repaint
@@ -34,7 +34,7 @@ THREE.VolumeSlice = function( volume, index, axis ) {
3434
} );
3535
/**
3636
* @member {String} axis The normal axis
37-
*/
37+
*/
3838
this.axis = axis || 'z';
3939

4040
/**
@@ -45,11 +45,11 @@ THREE.VolumeSlice = function( volume, index, axis ) {
4545
*/
4646
this.canvas = document.createElement( 'canvas' );
4747
/**
48-
* @member {HTMLCanvasElement} canvasBuffer The intermediary canvas used to paint the data
49-
*/
48+
* @member {HTMLCanvasElement} canvasBuffer The intermediary canvas used to paint the data
49+
*/
5050
/**
51-
* @member {CanvasRenderingContext2D} ctxBuffer Context of the canvas buffer
52-
*/
51+
* @member {CanvasRenderingContext2D} ctxBuffer Context of the canvas buffer
52+
*/
5353
this.canvasBuffer = document.createElement( 'canvas' );
5454
this.updateGeometry();
5555

@@ -59,30 +59,30 @@ THREE.VolumeSlice = function( volume, index, axis ) {
5959
canvasMap.wrapS = canvasMap.wrapT = THREE.ClampToEdgeWrapping;
6060
var material = new THREE.MeshBasicMaterial( { map: canvasMap, side: THREE.DoubleSide, transparent : true } );
6161
/**
62-
* @member {THREE.Mesh} mesh The mesh ready to get used in the scene
63-
*/
62+
* @member {THREE.Mesh} mesh The mesh ready to get used in the scene
63+
*/
6464
this.mesh = new THREE.Mesh( this.geometry, material );
6565
/**
66-
* @member {Boolean} geometryNeedsUpdate If set to true, updateGeometry will be triggered at the next repaint
67-
*/
66+
* @member {Boolean} geometryNeedsUpdate If set to true, updateGeometry will be triggered at the next repaint
67+
*/
6868
this.geometryNeedsUpdate = true;
6969
this.repaint();
7070

7171
/**
72-
* @member {Number} iLength Width of slice in the original coordinate system, corresponds to the width of the buffer canvas
73-
*/
72+
* @member {Number} iLength Width of slice in the original coordinate system, corresponds to the width of the buffer canvas
73+
*/
7474

7575
/**
76-
* @member {Number} jLength Height of slice in the original coordinate system, corresponds to the height of the buffer canvas
77-
*/
76+
* @member {Number} jLength Height of slice in the original coordinate system, corresponds to the height of the buffer canvas
77+
*/
7878

7979
/**
80-
* @member {Function} sliceAccess Function that allow the slice to access right data
81-
* @see THREE.Volume.extractPerpendicularPlane
82-
* @param {Number} i The first coordinate
83-
* @param {Number} j The second coordinate
84-
* @returns {Number} the index corresponding to the voxel in volume.data of the given position in the slice
85-
*/
80+
* @member {Function} sliceAccess Function that allow the slice to access right data
81+
* @see THREE.Volume.extractPerpendicularPlane
82+
* @param {Number} i The first coordinate
83+
* @param {Number} j The second coordinate
84+
* @returns {Number} the index corresponding to the voxel in volume.data of the given position in the slice
85+
*/
8686

8787

8888
}
@@ -92,9 +92,9 @@ THREE.VolumeSlice.prototype = {
9292
constructor : THREE.VolumeSlice,
9393

9494
/**
95-
* @member {Function} repaint Refresh the texture and the geometry if geometryNeedsUpdate is set to true
96-
* @memberof THREE.VolumeSlice
97-
*/
95+
* @member {Function} repaint Refresh the texture and the geometry if geometryNeedsUpdate is set to true
96+
* @memberof THREE.VolumeSlice
97+
*/
9898
repaint : function() {
9999

100100
if ( this.geometryNeedsUpdate ) {
@@ -180,10 +180,10 @@ THREE.VolumeSlice.prototype = {
180180
},
181181

182182
/**
183-
* @member {Function} Refresh the geometry according to axis and index
184-
* @see THREE.Volume.extractPerpendicularPlane
185-
* @memberof THREE.VolumeSlice
186-
*/
183+
* @member {Function} Refresh the geometry according to axis and index
184+
* @see THREE.Volume.extractPerpendicularPlane
185+
* @memberof THREE.VolumeSlice
186+
*/
187187
updateGeometry : function() {
188188

189189
var extracted = this.volume.extractPerpendicularPlane( this.axis, this.index );

0 commit comments

Comments
 (0)