Skip to content

Commit c29c4fa

Browse files
alexfreskadannyrb
authored andcommitted
docs: Fix grammar and links (#415)
1 parent a0071e4 commit c29c4fa

14 files changed

+34
-33
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ documentation/
66
docs/_book
77
docs/api.md
88
dist/
9+
.DS_Store

Diff for: docs/advanced/enabled-element-data.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
description: Cornerstone supports storing and retrieving arbitrary Enabled Element Data within the HTML data- fields of an Element
2+
description: Cornerstone supports storing and retrieving arbitrary Enabled Element Data within the HTML data- fields of an Element.
33
---
44

55
# Enabled Element Data
66

7-
> Cornerstone supports storing and retrieving arbitrary **Enabled Element Data**
7+
> Cornerstone supports storing and retrieving arbitrary **Enabled Element Data**.

Diff for: docs/advanced/enabled-element-layers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Basics:
1212
* An Enabled Element can have more than one Layer.
1313
* Each Layer is similar to an Enabled Element - They each have their own *Image* and *Viewport*, off-screen rendering Canvas, etc...
1414
* Only a single Layer can be active at a time.
15-
* Layers have properties for visibility and opacity, and are uniquely referenced by a Layer ID
15+
* Layers have properties for visibility and opacity, and are uniquely referenced by a Layer ID.
1616

1717
When a Layer is Active:
1818
* The layer's *Image* is available at enabledElement.image

Diff for: docs/advanced/image-cache.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ description: Cornerstone stores Images inside the Image Cache to keep track of m
44

55
# Image Cache
66

7-
> Cornerstone stores **Images** inside the **Image Cache** to keep track of memory usage.
7+
> Cornerstone stores **[Images](../concepts/images.md)** inside the **Image Cache** to keep track of memory usage.
88
9-
When the Promise within an Image Load Object resolves, the resulting Image is stored in an Object in the Image Cache module by Cornerstone. This is set up to operate as a least-recently-used (LRU) cache.
9+
When the Promise within an [Image Load Object](../api.md#imageloadobject) resolves, the resulting Image is stored in an Object in the Image Cache module by Cornerstone. This is set up to operate as a least-recently-used (LRU) cache.
1010

11-
Initially, when loadImage is called, the cache is populated with a placeholder for the cached image with a recorded size of 0. When the Promise tracking the image loading has resolved, the recorded size is updated with the actual size in bytes. If the loading fails, the placeholder is removed from the cache.
11+
Initially, when [loadImage](../api.md#loadimage) is called, the cache is populated with a placeholder for the cached image with a recorded size of 0. When the Promise tracking the image loading has resolved, the recorded size is updated with the actual size in bytes. If the loading fails, the placeholder is removed from the cache.
1212

1313
Developers can:
14-
* Set the maximum cache size, default 1 GB ([setMaximumSizeBytes](../api#setMaximumSizeBytes))
15-
* Manually purge the cache of all images ([purgeCache](../api#purgeCache))
16-
* Retrieve a summary of the cache ([getCacheInfo](../api#getCacheInfo))
17-
* Change the recorded cache size of a specific Image ([changeImageIdCacheSize](../api#changeImageIdCacheSize))
14+
* Set the maximum cache size, default 1 GB ([setMaximumSizeBytes](../api.md#setmaximumsizebytes))
15+
* Manually purge the cache of all images ([purgeCache](../api.md#purgecache))
16+
* Retrieve a summary of the cache ([getCacheInfo](../api.md#getcacheinfo))
17+
* Change the recorded cache size of a specific Image ([changeImageIdCacheSize](../api.md#changeimageidcachesize))

Diff for: docs/advanced/legacy-browser-support.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@ description: Cornerstone can be made to support legacy browsers by incorporating
88
99
You **may** need to include polyfills for these features, depending on which browsers you target.
1010

11-
* [Promises](https://caniuse.com/#feat=promises) represent the eventual result of an asynchronous operation. These are used by [Image Loaders](../concepts/image-loaders.md). You will need to polyfill Promises to use Internet Explorer 11.
11+
* [Promises](https://caniuse.com/#feat=promises) represent the eventual result of an asynchronous operation. These are used by [Image Loaders](../concepts/image-loaders.md). You will need to polyfill Promises to use Internet Explorer 11. Here is [a lightweight Promise polyfill](https://github.com/taylorhakes/promise-polyfill) which is MIT Licensed.
1212

13-
Here is [a lightweight Promise polyfill](https://github.com/taylorhakes/promise-polyfill) which is MIT Licensed.
14-
15-
* [requestAnimationFrame](https://caniuse.com/#feat=requestanimationframe) is a method for efficiently running animations. We are currently [check for its availability ourselves within Cornerstone](https://github.com/cornerstonejs/cornerstone/blob/master/src/internal/requestAnimationFrame.js), but may remove this in the future. There are many options for a [requestAnimationFrame polyfill in this gist by Paul Irish](https://gist.github.com/paulirish/1579671).
13+
* [requestAnimationFrame](https://caniuse.com/#feat=requestanimationframe) is a method for efficiently running animations. We currently [check for its availability ourselves within Cornerstone](https://github.com/cornerstonejs/cornerstone/blob/master/src/internal/requestAnimationFrame.js), but may remove this in the future. There are many options for a [requestAnimationFrame polyfill in this gist by Paul Irish](https://gist.github.com/paulirish/1579671).
1614

1715
* [performance.now](https://caniuse.com/#feat=high-resolution-time) is used for high-resolution timing for performance monitoring within Cornerstone. We are currently [avoiding errors ourselves within Cornerstone](https://github.com/cornerstonejs/cornerstone/blob/master/src/internal/now.js#L11), but may remove this in the future. Here is a [performance.now polyfill](https://gist.github.com/paulirish/5438650).
1816

Diff for: docs/advanced/modality-lut-and-voi-lut.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Cornerstone supports both Value of Interest (VOI) and Modality Look
44

55
# Modality LUT and VOI LUT
66

7-
> Cornerstone supports both Value of Interest (VOI) and Modality Lookup Tables
7+
> Cornerstone supports both Value of Interest (VOI) and Modality Lookup Tables.
88
99
Lookup tables define transformations from stored pixel values to presentation pixel values.
1010

Diff for: docs/advanced/retrieving-pixel-data.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Cornerstone supports retrieval of stored and transformed pixels fro
44

55
# Retrieving Pixel Data
66

7-
> Cornerstone supports retrieval of stored and transformed pixels from Images
7+
> Cornerstone supports retrieval of stored and transformed pixels from Images.
88
9-
* [getPixels](../api#getPixels)
10-
* [getStoredPixels](../api#getStoredPixels)
9+
* [getPixels](../api.md#getpixels)
10+
* [getStoredPixels](../api.md#getstoredpixels)

Diff for: docs/advanced/webgl-rendering-pipeline.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ description: Cornerstone supports an optional WebGL rendering pipeline for incre
44

55
# WebGL Rendering Pipeline
66

7-
> Cornerstone supports an optional WebGL rendering pipeline for increased performance
7+
> Cornerstone supports an optional WebGL rendering pipeline for increased performance.

Diff for: docs/concepts/metadata-providers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ To handle these scenarios, Cornerstone provides infrastructure for the definitio
1313
Here is a simple example of a Metadata Provider which returns an Object containing Image Plane metadata for a single specific image (Image Id: 'ct://1'):
1414

1515
````javascript
16-
function metaDataProvider(type, imageId)
16+
function metaDataProvider(type, imageId) {
1717
if (type === 'imagePlaneModule') {
1818
if (imageId === 'ct://1') {
1919
return {

Diff for: docs/concepts/pixel-coordinate-system.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ description: The Pixel Coordinate System is used when referring to individual pi
66

77
The Pixel Coordinate System is used when referring to individual pixels in the image and supports sub-pixel precision. The origin of the coordinate system is such that 0.0,0.0 is the top left corner of the top left pixel in the image and columns, rows would be the bottom right corner of the bottom right pixel in the image. A coordinate of .5,.5 is therefore the center of the top left pixel.
88

9-
1. The function pageToPixel() can be used to convert coordinates obtained from browser events to coordinates
9+
1. The function [pageToPixel()](../api.md#pagetopixel) can be used to convert coordinates obtained from browser events to coordinates
1010
in the pixel coordinate system.
11-
2. The function setToPixelCoordinateSystem() can be used to set the canvas context to the pixel coordinate system. This is useful when handling the CornerstoneImageRendered event to draw geometry on top of the image.
11+
2. The function [setToPixelCoordinateSystem()](../api.md#settopixelcoordinatesystem) can be used to set the canvas context to the pixel coordinate system. This is useful when handling the CornerstoneImageRendered event to draw geometry on top of the image.
1212
3. This coordinate system matches that specified in the DICOM Grayscale Softcopy Presentation State Graphic Annotation module for graphics drawn using the PIXEL annotation units.
13-
4. Use Math.ceil() to convert from the pixel coordinate system to the integer pixel number (for looking up the pixel value in the pixel data)
13+
4. Use `Math.ceil()` to convert from the pixel coordinate system to the integer pixel number (for looking up the pixel value in the pixel data).

Diff for: docs/concepts/rendering-loop.md

+9-7
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,23 @@ description: Viewport (e.g. windowing, pan, zoom) changes for Cornerstone Enable
66

77
> Viewport (e.g. windowing, pan, zoom, etc...) changes for Cornerstone Enabled Elements are updated through a rendering loop based on [requestAnimationFrame](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame).
88
9-
The rendering loop make use of the [requestAnimationFrame](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame) (RAF) method in most modern browsers. If RAF is not available, it is shimmed with a 16 ms timer using setTimeout and clearTimeout.
9+
The rendering loop make use of the [requestAnimationFrame](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame) (RAF) method in most modern browsers. If RAF is not available, it is shimmed with a 16 ms timer using `setTimeout` and `clearTimeout`.
1010

1111
The rendering loop is enabled on an element-by-element basis when elements are enabled or disabled for use with Cornerstone.
1212

1313
The workflow is as follows:
14-
1. A draw() callback is registered with RAF;
15-
2. draw() is called by the browser just after a frame is displayed on screen;
14+
15+
1. A [draw()](../api.md#draw) callback is registered with RAF;
16+
2. [draw()](../api.md#draw) is called by the browser just after a frame is displayed on screen;
1617
3. Once called,
17-
* if the element was scheduled for re-rendering, it is rendered and draw() is re-registered with RAF;
18+
* if the element was scheduled for re-rendering, it is rendered and [draw()](../api.md#draw) is re-registered with RAF;
1819
* if the element was **not** scheduled for re-rendering, no work is performed and the callback is re-registered with RAF;
19-
* if the element was disabled(), the callback is **not** re-registered, ending the rendering loop.
20+
* if the element was disabled, the callback is **not** re-registered, ending the rendering loop.
2021

2122
This means that:
22-
* cornerstone.draw() and cornerstone.invalidate() do not trigger immediate rendering the viewport. Instead, they flag the image as needing re-rendering;
23-
* Each cornerstone element register its own RAF loop;
23+
24+
* [draw()](../api.md#draw) and [invalidate()](../api.md#invalidate) do not trigger immediate rendering of the viewport. Instead, they flag the image as needing re-rendering;
25+
* Each cornerstone element registers its own RAF loop;
2426
* If the rendering time exceeds 16 ms on a 60 Hz system, rendering frames are skipped;
2527
* Only one render per frame is possible, even if render time is much lower than 16 ms;
2628
* All interactions (e.g. windowing, pan, zoom, etc...) are combined and rendered in the next frame.

Diff for: docs/concepts/viewports.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Each Enabled Element has a Viewport which describes how the Image s
44

55
# Viewports
66

7-
> Each [Enabled Element](enabled-elements.md) has a **Viewport** which describes how the [Image](images.md) should be rendered.
7+
> Each [Enabled Element](enabled-elements.md) has a **[Viewport](../api.md#viewport)** which describes how the [Image](images.md) should be rendered.
88
99
The viewport parameters for an enabled element can be obtained via the [getViewport()](../api.md#getviewport) function and set using the [setViewport()](../api.md#setviewport) function. The available properties for the Viewport can be found in the [Viewport object definition](../api.md#viewport) in the API documentation.
1010

Diff for: src/invalidate.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import triggerEvent from './triggerEvent.js';
33
import EVENTS from './events.js';
44

55
/**
6-
* Sets the invalid flag on the enabled element and fire an event
6+
* Sets the invalid flag on the enabled element and fires an event
77
* @param {HTMLElement} element The DOM element enabled for Cornerstone
88
* @returns {void}
99
* @memberof Drawing

Diff for: src/invalidateImageId.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { getEnabledElementsByImageId } from './enabledElements.js';
22
import drawImage from './internal/drawImage.js';
33

44
/**
5-
* Forces the image to be updated/redrawn for the all enabled elements
5+
* Forces the image to be updated/redrawn for all enabled elements
66
* displaying the specified imageId
77
*
88
* @param {string} imageId The imageId of the Cornerstone Image Object to redraw

0 commit comments

Comments
 (0)