Line 38: |
Line 38: |
| Figure 1 depicts the software | | Figure 1 depicts the software |
| interface layers available to programmers writing imaging applications | | interface layers available to programmers writing imaging applications |
− | on SGI hardware and ImageVision's position among them. <unknown 0></p> | + | on SGI hardware and ImageVision's position among them.</p> |
| <p> | | <p> |
− | <paranum><b>FIGURE 1 </b><i>Image Processing
| + | <b>FIGURE 1 </b><i>Image Processing |
− | application interfaces on SGI hardware </i></unknown></p> | + | application interfaces on SGI hardware </i></p> |
| <p> | | <p> |
| </p> | | </p> |
Line 48: |
Line 48: |
| [[File:Fig 78.gif]]</p> | | [[File:Fig 78.gif]]</p> |
| <p> | | <p> |
− | <unknown 0></p>
| + | </p> |
| <p> | | <p> |
− | <i>1.1 </i><b>Abstract</b></unknown><b> </b></p> | + | <i>1.1 </i><b>Abstract</b><b> </b></p> |
| <p> | | <p> |
| IL consists of a library developed in C++. An interfaces for C | | IL consists of a library developed in C++. An interfaces for C |
| programmers is included in a supporting library. </p> | | programmers is included in a supporting library. </p> |
| <p> | | <p> |
− | The current release of IL contains a core set of more than eightty | + | The current release of IL contains a core set of more than eighty |
| image processing functions common to most disciplines; more will | | image processing functions common to most disciplines; more will |
| continue to be added in future releases. Since developers must work | | continue to be added in future releases. Since developers must work |
Line 90: |
Line 90: |
| execute processing requests automatically in parallel. </p> | | execute processing requests automatically in parallel. </p> |
| <p> | | <p> |
− | In summary, Silicon Graphics's IL provides the following features: <unknown 0></p> | + | In summary, Silicon Graphics's IL provides the following features: </p> |
| <ul> | | <ul> |
| <li> | | <li> |
| · an image processing programmer interface common across all | | · an image processing programmer interface common across all |
− | Silicon Graphics workstations</unknown><unknown 0> | + | Silicon Graphics workstations |
| <li> | | <li> |
| · a core set of general-purpose image operators and an easy way to | | · a core set of general-purpose image operators and an easy way to |
− | add new ones</unknown><unknown 0> | + | add new ones |
| <li> | | <li> |
− | · a framework for chaining a sequence of operators together</unknown><unknown 0> | + | · a framework for chaining a sequence of operators together |
| <li> | | <li> |
| · an efficient method of augmenting the set of supported image | | · an efficient method of augmenting the set of supported image |
− | file formats</unknown><unknown 0> | + | file formats |
| <li> | | <li> |
− | · an optimized memory model for handling very large images</unknown><unknown 0> | + | · an optimized memory model for handling very large images |
| <li> | | <li> |
− | · an efficient method for pre-fetching image data</unknown><unknown 0> | + | · an efficient method for pre-fetching image data |
| <li> | | <li> |
| · transparent support for execution on single processors and | | · transparent support for execution on single processors and |
− | multiple, parallel processors</unknown><unknown 0> | + | multiple, parallel processors< |
| <li> | | <li> |
− | · an architecture that supports general image types</unknown><unknown 0> | + | · an architecture that supports general image types |
| </ul> | | </ul> |
| <p> | | <p> |
− | 1.2 <b>Overview</b></unknown><b> </b></p> | + | 1.2 <b>Overview</b><b> </b></p> |
| <p> | | <p> |
| IL organizes the diverse I/O, computation, and display requirements of | | IL organizes the diverse I/O, computation, and display requirements of |
| an image processing application into a set of coordinated programming | | an image processing application into a set of coordinated programming |
− | models. These models are outlined in the following sections. <unknown 0></p> | + | models. These models are outlined in the following sections. </p> |
| <p> | | <p> |
− | 1.2.1 <b>Image Object Model</b></unknown><b> </b></p> | + | 1.2.1 <b>Image Object Model</b><b> </b></p> |
| <p> | | <p> |
| The foundation and unifying concept of IL is the image object. All | | The foundation and unifying concept of IL is the image object. All |
| image types are derived from a common object definition. These image | | image types are derived from a common object definition. These image |
− | types include: <unknown 0></p> | + | types include:</p> |
| <ul> | | <ul> |
| <li> | | <li> |
− | · a memory image, implemented as a contiguous array</unknown><unknown 0> | + | · a memory image, implemented as a contiguous array |
| <li> | | <li> |
− | · a cached image that resides in a file and is buffered in memory</unknown><unknown 0> | + | · a cached image that resides in a file and is buffered in memory |
| <li> | | <li> |
− | · a displayed image, resident in the frame buffer</unknown><unknown 0> | + | · a displayed image, resident in the frame buffer |
| <li> | | <li> |
− | · an operator image that implements an image processing algorithm</unknown> | + | · an operator image that implements an image processing algorithm |
| </ul> | | </ul> |
| <p> | | <p> |
Line 139: |
Line 139: |
| image types can be handled in a consistent fashion. This results in a | | image types can be handled in a consistent fashion. This results in a |
| streamlined programming model that greatly simplifies application | | streamlined programming model that greatly simplifies application |
− | development. <unknown 0></p> | + | development. </p> |
| <p> | | <p> |
− | 1.2.2 <b>File I/O Model</b></unknown><b> </b></p> | + | 1.2.2 <b>File I/O Model</b><b> </b></p> |
| <p> | | <p> |
| The file I/O model abstracts how images are accessed from disk. File | | The file I/O model abstracts how images are accessed from disk. File |
Line 148: |
Line 148: |
| transparently support the different file formats provided by the Image | | transparently support the different file formats provided by the Image |
| Format Library (IFL). You can easily integrate new file formats into | | Format Library (IFL). You can easily integrate new file formats into |
− | IFL without modifying the application. <unknown 0></p> | + | IFL without modifying the application. </p> |
| <p> | | <p> |
− | 1.2.3 <b>Execution Model</b></unknown><b> </b></p> | + | 1.2.3 <b>Execution Model</b><b> </b></p> |
| <p> | | <p> |
| IL implements a <i>pull-driven</i>, or demand-driven, model, such that | | IL implements a <i>pull-driven</i>, or demand-driven, model, such that |
− | data is processed only on demand. <unknown 0></p> | + | data is processed only on demand. </p> |
| <p> | | <p> |
− | <paranum><b>FIGURE 2 </b><i>Push Execution Model
| + | <b>FIGURE 2 </b><i>Push Execution Model |
− | versus ImageVision Library</i></unknown><i> </i></p> | + | versus ImageVision Library</i><i> </i></p> |
| <p> | | <p> |
| </p> | | </p> |
Line 174: |
Line 174: |
| each image operator process the entire image in sequence and also | | each image operator process the entire image in sequence and also |
| require extra buffers to store the intermediate results. Figure 2 contrasts the push and pull | | require extra buffers to store the intermediate results. Figure 2 contrasts the push and pull |
− | execution models. <unknown 0></p> | + | execution models. </p> |
| <p> | | <p> |
− | 1.2.4 <b>Display Model</b></unknown><b> </b></p> | + | 1.2.4 <b>Display Model</b><b> </b></p> |
| <p> | | <p> |
| The display model defines how images are displayed on the screen. It | | The display model defines how images are displayed on the screen. It |
Line 185: |
Line 185: |
| the application to conveniently specify how images are to be displayed | | the application to conveniently specify how images are to be displayed |
| while automatically drawing only the portions of each image that are | | while automatically drawing only the portions of each image that are |
− | exposed. <unknown 0></p> | + | exposed. </p> |
| <p> | | <p> |
− | <paranum><b>FIGURE 3 </b><i>An Example Using the
| + | <b>FIGURE 3 </b><i>An Example Using the |
− | ImageVision Library Display Model.</i></unknown><i> </i></p> | + | ImageVision Library Display Model.</i><i> </i></p> |
| <p> | | <p> |
| </p> | | </p> |
Line 195: |
Line 195: |
| [[File:Fig 61.gif]]</p> | | [[File:Fig 61.gif]]</p> |
| <p> | | <p> |
− | <unknown 0></p>
| + | </p> |
| <p> | | <p> |
− | <i>1.3 </i><b>Image Abstraction</b></unknown><b> </b></p> | + | <i>1.3 </i><b>Image Abstraction</b><b> </b></p> |
| <p> | | <p> |
| IL is based on a single object abstraction of the way in which images | | IL is based on a single object abstraction of the way in which images |
Line 212: |
Line 212: |
| methods allow access to a single pixel value. </p> | | methods allow access to a single pixel value. </p> |
| <p> | | <p> |
− | <a href="index.html#REF66727">Figure 4</a> depicts IL abstractions for
| + | Figure 4 depicts IL abstractions for |
| a set of distinct image types: memory images, disk file images, | | a set of distinct image types: memory images, disk file images, |
− | displayed images, and processed images (operator images). <unknown 0></p> | + | displayed images, and processed images (operator images). </p> |
| <p> | | <p> |
− | <a name="REF66727"><paranum></a><b>FIGURE 4 </b><i>Image Object
| + | <b>FIGURE 4 </b><i>Image Object |
− | Abstraction Hierarchy</i></unknown><i> </i></p> | + | Abstraction Hierarchy</i><i> </i></p> |
| <p> | | <p> |
| </p> | | </p> |
| <hr> | | <hr> |
| <p> | | <p> |
− | <a href="fig/fig_1.ps"><img src="/web/19970727074634im_/http://www.sgi.com/Technology/ImageVision/techreport/fig/fig_1.gif" width="525" height="186" sgi_src="/d/roots/godot/ilweb/techreport/fig/fig_1.gif"></a></p>
| + | [[File:Fig 1.gif]]</p> |
| <p> | | <p> |
| Because all image types share a common model, a programmer need only | | Because all image types share a common model, a programmer need only |
| access images and image data as an <i>ilImage</i> type. The following | | access images and image data as an <i>ilImage</i> type. The following |
| sections fully describe the attributes and access methods for all image | | sections fully describe the attributes and access methods for all image |
− | types. <unknown 0></p> | + | types. </p> |
| <p> | | <p> |
− | 1.3.1 <b>Data Dimensions</b></unknown><b> </b></p> | + | 1.3.1 <b>Data Dimensions</b><b> </b></p> |
| <p> | | <p> |
| IL supports three main image dimensions: x-dimension or number of | | IL supports three main image dimensions: x-dimension or number of |
| columns, <br> | | columns, <br> |
− | y-dimension or number of rows, and z-dimension or image depth. </p>
| + | y-dimension or number of rows, and z-dimension or image depth. </p> |
| <p> | | <p> |
| Each element in this array, pixel or voxel, can consist of multiple | | Each element in this array, pixel or voxel, can consist of multiple |
| components or channels. All pixels in a given image must have the same | | components or channels. All pixels in a given image must have the same |
| number of components and the same scalar data type. There is no | | number of components and the same scalar data type. There is no |
− | prescribed limit to the size of the x, y, z, or component dimensions. <unknown 0></p> | + | prescribed limit to the size of the x, y, z, or component dimensions. </p> |
| <p> | | <p> |
− | 1.3.2 <b>Data Types</b></unknown><b> </b></p> | + | 1.3.2 <b>Data Types</b><b> </b></p> |
| <p> | | <p> |
| Each component of a pixel has a scalar data type that can have one of | | Each component of a pixel has a scalar data type that can have one of |
Line 246: |
Line 246: |
| <ul> | | <ul> |
| <li> | | <li> |
− | · bit</unknown><unknown 0> | + | · bit |
| <li> | | <li> |
− | · char (signed or unsigned)</unknown><unknown 0> | + | · char (signed or unsigned) |
| <li> | | <li> |
− | · short (signed or unsigned)</unknown><unknown 0> | + | · short (signed or unsigned) |
| <li> | | <li> |
− | · long (signed or unsigned)</unknown><unknown 0> | + | · long (signed or unsigned) |
| <li> | | <li> |
− | · float</unknown><unknown 0> | + | · float |
| <li> | | <li> |
− | · double</unknown><unknown 0> | + | · double |
| </ul> | | </ul> |
| <p> | | <p> |
− | 1.3.3 <b>Data Ordering</b></unknown><b> </b></p> | + | 1.3.3 <b>Data Ordering</b><b> </b></p> |
| <p> | | <p> |
| To provide flexible support for different image formats, IL supports | | To provide flexible support for different image formats, IL supports |
| image data ordering as a configurable image attribute. Image data can | | image data ordering as a configurable image attribute. Image data can |
− | be retrieved or archived in one of three orders: <unknown 0></p> | + | be retrieved or archived in one of three orders: </p> |
| <p> | | <p> |
| 1. Interleaved ordering clusters the pixel components together. For | | 1. Interleaved ordering clusters the pixel components together. For |
| example, a three-component (RGB) image would be stored as RGBRGBRGB... | | example, a three-component (RGB) image would be stored as RGBRGBRGB... |
− | and so on.</unknown><unknown 0></p> | + | and so on.</p> |
| <p> | | <p> |
| 2. Sequential ordering clusters the individual pixel components on a | | 2. Sequential ordering clusters the individual pixel components on a |
Line 273: |
Line 273: |
| data would contain a line's worth of red values followed by the same | | data would contain a line's worth of red values followed by the same |
| line's green values and then the blue values for that line, before | | line's green values and then the blue values for that line, before |
− | continuing with the data for the next line.</unknown><unknown 0></p> | + | continuing with the data for the next line.</p> |
| <p> | | <p> |
| 3. Separate ordering stores each component in a separate contiguous | | 3. Separate ordering stores each component in a separate contiguous |
− | piece.</unknown><unknown 0></p> | + | piece.</p> |
| <p> | | <p> |
− | 1.3.4 <b>Data Interpretation</b></unknown><b> </b></p> | + | 1.3.4 <b>Data Interpretation</b><b> </b></p> |
| <p> | | <p> |
| Image data can be interpreted using several different color semantics. | | Image data can be interpreted using several different color semantics. |
Line 285: |
Line 285: |
| <ul> | | <ul> |
| <li> | | <li> |
− | · luminance</unknown><unknown 0> | + | · luminance |
| <li> | | <li> |
− | · negative (minimum value white)</unknown><unknown 0> | + | · negative (minimum value white) |
| <li> | | <li> |
− | · luminance plus &alpha; (transparency value)</unknown><unknown 0> | + | · luminance plus &alpha; (transparency value) |
| <li> | | <li> |
− | · color palette or pseudo-color</unknown><unknown 0> | + | · color palette or pseudo-color |
| <li> | | <li> |
− | · RGB</unknown><unknown 0> | + | · RGB |
| <li> | | <li> |
− | · RGB plus &alpha; (transparency value)</unknown><unknown 0> | + | · RGB plus &alpha; (transparency value) |
| <li> | | <li> |
− | · HSV (hue, color, and value)</unknown><unknown 0> | + | · HSV (hue, color, and value) |
| <li> | | <li> |
− | · YCC</unknown><unknown 0> | + | · YCC |
| <li> | | <li> |
− | · CMY</unknown><unknown 0> | + | · CMY |
| <li> | | <li> |
− | · CMYK</unknown><unknown 0> | + | · CMYK |
| <li> | | <li> |
− | · multi-spectral</unknown><unknown 0> | + | · multi-spectral |
| </ul> | | </ul> |
| <p> | | <p> |
− | 1.3.5 <b>Data Access</b></unknown><b> </b></p> | + | 1.3.5 <b>Data Access</b><b> </b></p> |
| <p> | | <p> |
| IL provides access functions for reading and writing image data. Data | | IL provides access functions for reading and writing image data. Data |
Line 323: |
Line 323: |
| using the <i>ilCombineImg</i> and <i>ilRoiImg</i> operators. <unknown 0></p> | | using the <i>ilCombineImg</i> and <i>ilRoiImg</i> operators. <unknown 0></p> |
| <p> | | <p> |
− | Section 2 <b><i>Using the ImageVision Library</i></b></unknown><b><i> </i></b></p> | + | Section 2 <b><i>Using the ImageVision Library</i></b><b><i> </i></b></p> |
| <p> | | <p> |
| Using IL is easy. With image objects, it is possible to write many | | Using IL is easy. With image objects, it is possible to write many |
Line 337: |
Line 337: |
| image data through a common programming interface. All image data can | | image data through a common programming interface. All image data can |
| be stored or retrieved using IL's <b>setTile,</b> <b>copyTile </b>or<b> | | be stored or retrieved using IL's <b>setTile,</b> <b>copyTile </b>or<b> |
− | getTile</b> functions. Additionally, IL transparently supports the
| + | getTile</b> functions. Additionally, IL transparently supports the |
| ability to chain image operators together. </p> | | ability to chain image operators together. </p> |
| <p> | | <p> |
− | <a href="index.html#REF32293">Figure 5</a> shows how elements of an IL
| + | Figure 5 shows how elements of an IL |
| application might be connected. IL manages the data caching to | | application might be connected. IL manages the data caching to |
− | appropriately process images from anywhere in the chain. <unknown 0></p> | + | appropriately process images from anywhere in the chain. </p> |
| <p> | | <p> |
− | <a name="REF32293"><paranum></a><b>FIGURE 5 </b>Elements of an IL
| + | <b>FIGURE 5 </b>Elements of an IL |
− | Application</unknown> </p> | + | Application </p> |
| <p> | | <p> |
| </p> | | </p> |
| <hr> | | <hr> |
| <p> | | <p> |
− | <a href="fig/fig_14.ps"><img src="/web/19970727074634im_/http://www.sgi.com/Technology/ImageVision/techreport/fig/fig_14.gif" width="511" height="261" sgi_src="/d/roots/godot/ilweb/techreport/fig/fig_14.gif"></a></p>
| + | [[File:Fig 14.gif]]</p> |
| <p> | | <p> |
− | <unknown 0></p>
| + | </p> |
| <p> | | <p> |
− | 2.1 <b>Programming with ImageVision</b></unknown><b> </b></p> | + | 2.1 <b>Programming with ImageVision</b><b> </b></p> |
| <p> | | <p> |
| Programming with IL is easy and intuitive. For example, the following | | Programming with IL is easy and intuitive. For example, the following |
| simple steps allow you to obtain an image from a file, sharpen it, and | | simple steps allow you to obtain an image from a file, sharpen it, and |
− | write the result back to disk: <unknown 0></p> | + | write the result back to disk: </p> |
| <pre> | | <pre> |
| 1. Open the input image file | | 1. Open the input image file |
Line 369: |
Line 369: |
| <p> | | <p> |
| Even better, the following C++ code shows how each of the outlined | | Even better, the following C++ code shows how each of the outlined |
− | steps maps easily into a single call to the IL: <unknown 0></p> | + | steps maps easily into a single call to the IL: </p> |
| <pre> | | <pre> |
| void main () { | | void main () { |
| // Step 1. Open the input image file | | // Step 1. Open the input image file |
− | ilFileImg inimg("image.tif"); | + | ilFileImg inimg("image.tif"); |
| | | |
| // Step 2. Construct a sharpen operator image using | | // Step 2. Construct a sharpen operator image using |
| // this file as input, sharpen the image by .5 | | // this file as input, sharpen the image by .5 |
− | ilSharpenImg sharpen(&inimg, .5); | + | ilSharpenImg sharpen(&inimg, .5); |
| | | |
| // Step 3. Create the output image file, use the file attributes | | // Step 3. Create the output image file, use the file attributes |
| // from the sharpened result. | | // from the sharpened result. |
− | ilFileImg outimg("output.tif", &sharpen); | + | ilFileImg outimg("output.tif", &sharpen); |
| | | |
− | // Step 4. Copy the sharpened image to the fileoutimg.copy(&sharpen); | + | // Step 4. Copy the sharpened image to the fileoutimg.copy(&sharpen); |
| // The IL will flush buffers and close the file automatically | | // The IL will flush buffers and close the file automatically |
| // when outimg is destroyed | | // when outimg is destroyed |
− | fileoutimg.copy(&piecewise); | + | fileoutimg.copy(&piecewise); |
| } | | } |
| </pre> | | </pre> |
Line 392: |
Line 392: |
| </blockquote> | | </blockquote> |
| <p> | | <p> |
− | 2.2 <b>Making a Simple Chain</b></unknown><b> </b></p> | + | 2.2 <b>Making a Simple Chain</b><b> </b></p> |
| <p> | | <p> |
| Image application developers must often perform more than one operation | | Image application developers must often perform more than one operation |
| in sequence. In the following example, the input image is scaled, | | in sequence. In the following example, the input image is scaled, |
| rotated, sharpened, and then radiometrically adjusted using a look-up | | rotated, sharpened, and then radiometrically adjusted using a look-up |
− | table. Here is the new sequence: <unknown 0></p> | + | table. Here is the new sequence: </p> |
| <pre> | | <pre> |
− | 1. Open the input image file</unknown> <unknown 0> | + | 1. Open the input image file |
− | 2. Construct a scale and rotate operator image using the input image file as input</unknown><unknown 0> | + | 2. Construct a scale and rotate operator image using the input image file as input |
− | 3. Construct a sharpen image using the warp image as input</unknown><unknown 0> | + | 3. Construct a sharpen image using the warp image as input |
− | 4. Construct a piecwise linear mapping operator using the sharpen image as input</unknown><unknown 0> | + | 4. Construct a piecwise linear mapping operator using the sharpen image as input |
− | 5. Create the output image file</unknown><unknown 0> | + | 5. Create the output image file |
− | 6. Copy the piecewise image to the output image file</unknown> | + | 6. Copy the piecewise image to the output image file |
| </pre> | | </pre> |
| <p> | | <p> |
Line 412: |
Line 412: |
| transparently. Developing a simple or complex chain in the IL can be as | | transparently. Developing a simple or complex chain in the IL can be as |
| easy as performing single operations. The next C++ code fragment | | easy as performing single operations. The next C++ code fragment |
− | demonstrates the versatility of IL: <unknown 0></p> | + | demonstrates the versatility of IL: </p> |
| <pre> | | <pre> |
− | main()</unknown><unknown 0>{</unknown><unknown 0> | + | main(){ |
− | // Step 1. Open the input image file</unknown><unknown 0> | + | // Step 1. Open the input image file |
− | ilFileImg inimg("input.tif");</unknown><unknown 0> | + | ilFileImg inimg("input.tif"); |
| | | |
− | // Step 2. Construct a scale & rotate operator, rotate by 30</unknown><unknown 0> | + | // Step 2. Construct a scale & rotate operator, rotate by 30 |
− | // degrees and scale it by 0.5 using bilinear resampling</unknown><unknown 0> | + | // degrees and scale it by 0.5 using bilinear resampling |
− | ilRotZoomImg rotate(&inimg, 30, .5, .5, ilBiLinear);</unknown><unknown 0> | + | ilRotZoomImg rotate(&inimg, 30, .5, .5, ilBiLinear); |
| | | |
− | // Step 3. Construct a sharpen operator,</unknown><unknown 0> | + | // Step 3. Construct a sharpen operator, |
− | // sharpen the rotated image by .5</unknown><unknown 0> | + | // sharpen the rotated image by .5 |
− | ilSharpenImg sharpen(&rotate, .5);</unknown><unknown 0> | + | ilSharpenImg sharpen(&rotate, .5); |
| | | |
− | // Step 4. Construct a look-up operator, using a piecewise</unknown><unknown 0> | + | // Step 4. Construct a look-up operator, using a piecewise |
− | // linear mapping</unknown><unknown 0> | + | // linear mapping |
− | iflXYfloat bkpts[3] = { iflXYfloat(0, 0), iflXYfloat(100, 60), </unknown><unknown 0> | + | iflXYfloat bkpts[3] = { iflXYfloat(0, 0), iflXYfloat(100, 60), |
− | iflXYfloat(255, 255) };</unknown><unknown 0> | + | iflXYfloat(255, 255) }; |
− | ilPiecewiseImg piecewise(&sharpen, bkpts, 3);</unknown><unknown 0> | + | ilPiecewiseImg piecewise(&sharpen, bkpts, 3); |
| | | |
− | // Step 5. Create the output image file, use the file attributes</unknown><unknown 0> | + | // Step 5. Create the output image file, use the file attributes |
− | // from the final operator result.</unknown><unknown 0> | + | // from the final operator result. |
− | ilFileImg outimg("output.tif", &piecewise);</unknown><unknown 0> | + | ilFileImg outimg("output.tif", &piecewise); |
| | | |
− | // Step 6. Copy the final image to the file</unknown><unknown 0> | + | // Step 6. Copy the final image to the file |
− | outimg.copy(&piecewise);</unknown><unknown 0> | + | outimg.copy(&piecewise); |
− | }</unknown><unknown 0> | + | } |
| </pre> | | </pre> |
| <p> | | <p> |
− | 2.3 <b>Displaying the Results</b></unknown><b> </b></p> | + | 2.3 <b>Displaying the Results</b><b> </b></p> |
| <p> | | <p> |
| Using IL, you can display your results as easily as writing them to an | | Using IL, you can display your results as easily as writing them to an |
| image file. To display your results directly, replace steps 5 and 6 | | image file. To display your results directly, replace steps 5 and 6 |
− | above with the following sequence: <unknown 0></p> | + | above with the following sequence: </p> |
| <pre> | | <pre> |
− | 5. Create a display object</unknown> <unknown 0> | + | 5. Create a display object |
− | 6. Invoke a standard event loop</unknown> | + | 6. Invoke a standard event loop |
| </pre> | | </pre> |
| <p> | | <p> |
| IL provides an efficient model for displaying one to many images within | | IL provides an efficient model for displaying one to many images within |
− | a window. Image rendering with IL uses the X window system and OpenGL<i>TM: </i><unknown 0><tt>// | + | a window. Image rendering with IL uses the X window system and OpenGL<i>TM: </i><tt>// |
− | Step 5. create a window to display the image results, </tt></unknown><tt> | + | Step 5. create a window to display the image results, </tt><tt> |
− | </tt><unknown 0></p>
| + | </tt></p> |
| <pre> | | <pre> |
− | <tt>// save the window id to pass onto IL</tt></unknown><tt> </tt><unknown 0> | + | <tt>// save the window id to pass onto IL</tt><tt> </tt> |
− | <tt>Display* dpy = XOpenDisplay(NULL);</tt></unknown><tt> </tt><unknown 0> | + | <tt>Display* dpy = XOpenDisplay(NULL);</tt><tt> </tt> |
− | <tt>ilViewer viewer(dpy, piecewise.getWidth(), </tt></unknown><tt> </tt><unknown 0><tt> </tt> | + | <tt>ilViewer viewer(dpy, piecewise.getWidth(), </tt><tt> </tt><tt> </tt> |
− | <tt>piecewise.getHeight());</tt></unknown><tt> </tt><unknown 0> | + | <tt>piecewise.getHeight());</tt><tt> </tt> |
− | <tt>viewer.addView(&piecewise);</tt></unknown><tt> </tt><unknown 0> | + | <tt>viewer.addView(&piecewise);</tt><tt> </tt> |
− | <tt>// Step 6. process X events</tt></unknown><tt> </tt><unknown 0> | + | <tt>// Step 6. process X events</tt><tt> </tt> |
− | <tt>viewer.eventLoop();</tt></unknown><tt> </tt> | + | <tt>viewer.eventLoop();</tt><tt> </tt> |
| </pre> | | </pre> |
| <p> | | <p> |
| This code fragment merely shows you the minimal set of features | | This code fragment merely shows you the minimal set of features |
| provided by IL. The IL display capabilities also include operations | | provided by IL. The IL display capabilities also include operations |
− | such as roam, wipe, and translate. <unknown 0></p> | + | such as roam, wipe, and translate. </p> |
| <p> | | <p> |
− | <tt>2.4 <b>Interactively Modifying a Chain</b></tt></unknown><b><tt> </tt></b></p> | + | <tt>2.4 <b>Interactively Modifying a Chain</b></tt><b><tt> </tt></b></p> |
| <p> | | <p> |
| IL allows you to change the parameters of an existing chain. For | | IL allows you to change the parameters of an existing chain. For |
Line 475: |
Line 475: |
| scale operator in the previous example, you would need to write you own | | scale operator in the previous example, you would need to write you own |
| event loop and in response to some user input (like pressing the arrow | | event loop and in response to some user input (like pressing the arrow |
− | keys) you would take the following steps: <unknown 0><tt>6. </tt>Write | + | keys) you would take the following steps: <tt>6. </tt>Write |
− | a simple event loop</unknown> <unknown 0></p> | + | a simple event loop</p> |
| <pre> | | <pre> |
| 7. Call the sharpen operator's built-in method to alter its sharpness</unknown> <unknown 0> | | 7. Call the sharpen operator's built-in method to alter its sharpness</unknown> <unknown 0> |