[0001] 1. Field of Invention
[0002] This invention relates to voxel rendering to produce a display image based on voxel data.
[0003] 2. Description of Related Art
[0004] In the field of rendering voxel information to produce a display, it is common practice to employ ray tracing techniques to identify voxels which map to display locations and then to determine from the identified voxels, which ones are to be seen on the display and which ones are to be occluded.
[0005] The mapping of voxels to display locations using ray tracing techniques involves numerous floating point computer calculations, which can be very time consuming, especially if a large number of voxels are to be rendered. Such calculations take time to perform and thus the greater the number of voxels in a voxel object, the greater the time required to perform a render.
[0006] Similarly, once the mapping has been determined, priority must be determined for each voxel to determine which ones are to be seen and which ones are to be occluded. This again takes time and involves addressing every voxel in the voxel object and performing calculations on each to determine priority. Obviously the greater the number of voxels in the voxel object, the longer the time required to perform the render.
[0007] What is desired therefore is an apparatus that addresses these problems.
[0008] The present invention addresses the above needs by providing an apparatus and method for associating display positions on a display, with display information associated with voxels in a voxel block, the voxels being mappable to a display coordinate system defined by a view plane. The method involves scanning voxel positions in the voxel block, according to a scan order in which column positions, in respective planes through the voxel block which are progressively farther from a base point in the voxel block are addressed in order of those which map to foreground positions in the view plane before those which map to more background positions in the view plane, to produce position specifiers identifying renderable voxel positions in the voxel block. Then respective display positions for each position specifier are determined according to a display position mapping and respective display positions are associated with corresponding position specifiers such that position specifiers which map to display positions which are already associated with position specifiers identifying more foreground positions on the display are not associated with display positions.
[0009] Associating may involve assigning references associated with respective position specifiers to respective display positions, the references identifying display attributes of voxels at the respective position specifiers.
[0010] Identifications of the respective display positions and their associated references may be provided to a rendering routine.
[0011] The method may include identifying the renderable voxel positions and this may involve identifying columns within a renderable column range. Identifying columns may involve addressing a plane and producing column addresses of columns progressively farther from an edge of the voxel block, in the plane. A position specifier may be produced for each voxel associated with a column address that is within a renderable column range.
[0012] Identifying renderable voxels may involve identifying columns, which have active voxels, and this may involve producing a column address and using the column address to locate active voxels in the column identified by the column address.
[0013] The method may involve determining a plane axis along which each plane in the succession of planes is defined and may involve determining a column axis and producing column addresses specifying columns progressively farther from the plane axis in a plane until a column address of a column within a renderable column range and having active voxels is located.
[0014] Producing column addresses may involve producing a plane coordinate along the plane axis to specify a plane orthogonal to the plane axis and producing a column coordinate along the column axis to specify a column in the plane specified by the plane coordinate.
[0015] Producing a position specifier may involve producing a set of coordinates specifying a column of voxels in an x-z plane of the voxel block and specifying a voxel in the column of voxels, the plane coordinate and the column coordinate specifying the column in the x-z-plane and a y-coordinate of the voxel block specifying the voxel in the column specified by the plane and column coordinates.
[0016] The method may involve storing an indication of whether or not a position specifier has been associated with a given display position and reading the indication when the given display position is computed for a given position specifier and outputting the reference to the given position specifier when the indication indicates that a position specifier has not already been associated with the given display position.
[0017] The method may involve executing an initialization routine prior to producing the set of position identifiers. The initialization routine may involve determining the scan order and establishing a mapping between coordinates in the voxel block and the display positions. Determining the scan order may involve determining the base point and determining plane and column axes of the voxel block. Determining the base point may involve mapping corners of the voxel block to the display coordinate system and producing normalized corner vectors for each mapped corner of the voxel block. Determining the base point may further involve finding a corner vector from the origin in the display coordinate system to a mapped corner point of the voxel block that forms a larger angle than all other corner vectors with a display orientation vector representing an orientation of the view plane.
[0018] The display orientation vector may be determined by finding which of two orthogonal vectors and their corresponding parity reverse counterparts, along display axes in the display coordinate system, is most parallel to a vector in the display coordinate system representing a mapping of a y-axis of the voxel block. Determining a plane axis may involve determining an edge of the voxel block that contains the base point and that appears to extend in a direction progressing most rapidly away from the view plane when mapped to the display coordinate system. The plane axis may be defined as a line in the voxel coordinate system, coincident with the edge. Determining a column axis may involve defining as the column axis a line in the coordinate system which is coincident with the base point and which intersects the plane axis and which is at an angle to a y-axis of the voxel block.
[0019] The initialization routine may involve computing a mapping such as a parallel projection mapping, for mapping points in the voxel block to points in the display coordinate system. It may also involve producing a clipping table. The clipping table may be used to determine whether a voxel is renderable. Producing a clipping table may involve producing a table having fields associated with corresponding columns in the voxel block and populating the fields with indicators indicating whether or nor a set of position indicators is to be produced for corresponding columns. Alternatively or in addition the fields may be populated with range indicators indicating ranges of voxels within a corresponding column, for which a set of position indicators is to be produced. Clipping tables permit slicing through the voxel block, for example.
[0020] The initialization routine may involve initializing a priority completion buffer and the method may involve storing in the priority completion buffer an indication of whether or not a given display position has been associated with a reference to a position specifier and reading the indication when the given display position is computed for a given position specifier and outputting the reference to the given position specifier when the indication indicates that a position specifier has not already been associated with the given display position.
[0021] In accordance with another aspect of the invention, there is provided a method of associating display positions on a display with display information associated with voxels in a voxel block, the voxels being mappable to a display coordinate system defined by a view plane. The method may involve, for each plane in a succession of planes comprised of voxel columns in the voxel block, where the planes are progressively farther from the view plane and from a base point of the voxel block, producing a set of position specifiers for renderable voxels in each column of each plane, computing a display position for each position specifier in the set and producing a reference to one of the position specifiers if a reference to said one of the position specifiers has not already been produced for the display position.
[0022] In accordance with another aspect of the invention there is provided a method of associating display positions on a display with display information associated with voxels in a voxel block, the voxels being mappable to a display coordinate system defined by a view plane. The method may involve establishing a mapping between coordinates in the voxel block and display positions of the display, computing a scan order for scanning positions of the voxel block, scanning positions in the voxel block in the scan order, producing position specifiers for positions which are to be considered for rendering, using the mapping to produce a display position for each position specifier, and producing a reference to the position specifier if a reference to the position specifier has not already been produced for the display position.
[0023] In accordance with another aspect of the invention there is provided a method of associating display positions on a display with display information associated with voxels in a voxel block, the voxels being mappable to a display coordinate system defined by a view plane. The method may involve determining from the voxel block and the view plane a parallel projection mapping for mapping points in the voxel block coordinate system to points in the display coordinate system, employing the parallel projection mapping to determine which corner of the voxel block appears closest to the view plane and to determine which edge of the voxel block appears to extend in a direction progressing most rapidly away from the view plane, defining a plane axis as an axis which is coincident with the edge which appears to extend in a direction progressing most rapidly away from the view plane and defining a column axis as a line which is coincident with the base point and which intersects the plane axis and which is at an angle to a y-axis of the voxel block, producing voxel position specifiers, each comprising a coordinate on the plane axis, a coordinate on the column axis and a coordinate on the y-axis, the voxel position specifiers being those of voxels in columns parallel to the column axis and in successive positions along the plane axis which are progressively farther from the view plane, computing a display position for each position specifier, and producing a reference to the position specifier if a reference to the position specifier has not already been produced for the display position.
[0024] In accordance with another aspect of the invention, there is provided an apparatus for associating display positions on a display, with display information associated with voxels in a voxel block, the voxels being mappable to a display coordinate system defined by a view plane. The apparatus includes a scanner, a mapper and an associator. The scanner scans voxel positions in the voxel block, according to a scan order in which column positions, in respective planes through the voxel block which are progressively farther from a base point in the voxel block are addressed in order of those which map to foreground positions in the view plane before those which map to more background positions in the view plane, to produce position specifiers identifying renderable voxel positions in the voxel block. The mapper determines respective display positions for each position specifier according to a display position mapping. The associator associates respective display positions with corresponding position specifiers such that position specifiers which map to display positions which are already associated with position specifiers identifying more foreground positions on the display are not associated with display positions.
[0025] The associator may be operable to assign references associated with respective the position specifiers to respective display positions, the references identifying display attributes of voxels at the respective position specifiers.
[0026] The apparatus may further include an identifier for identifying the renderable voxel positions. The identifier may be operable to identify renderable voxels by identifying columns which have active voxels. This may involve identifying columns within a renderable column range. This may be done by addressing a plane in the succession of planes and producing column addresses of columns progressively farther from an edge of the voxel block, in the plane. A position specifier may be produced for each voxel associated with a column address, when the column address is within the renderable column range.
[0027] The scanner may be operable to determine a plane axis along which each plane in the succession of planes is defined and to determine a column axis and produce column addresses specifying columns progressively farther from the plane axis in a plane in the succession of planes until a column address of a column within a renderable column range and having active voxels is located.
[0028] The scanner may produce a plane coordinate along the plane axis to specify a plane orthogonal to the plane axis and may produce a column coordinate along the column axis to specify a column in the plane specified by the plane coordinate. The scanner may produce a set of coordinates specifying a column of voxels in an x-z plane of the voxel block and may specify a voxel in the column of voxels, where the plane coordinate and the column coordinate specify the column in the x-z-plane and a y-coordinate of the voxel block specify the voxel in the column specified by the plane and column coordinates.
[0029] The apparatus may employ a processor circuit for storing an indication of whether or not a position specifier has been associated with a given display position. The processor circuit may read the indication when the given display position is computed for a given position specifier and output the reference to the given position specifier when the indication indicates that a position specifier has not already been associated with the given display position.
[0030] The processor circuit may execute an initialization routine prior to producing the set of position identifiers. This may involve determining the scan order and establishing a mapping between coordinates in the voxel block and the display positions. Determining the scan order may involve determining the base point and plane and column axes of the voxel block.
[0031] The processor circuit may be operable to map corners of the voxel block, to the display coordinate system and produce normalized corner vectors for each mapped corner of the voxel block and may be operable to find a corner vector, from the origin in the display coordinate system, to a mapped corner point of the voxel block, wherein the base corner vector forms a larger angle than all other corner vectors with a display orientation vector representing an orientation of the view plane.
[0032] The processor circuit may be operable to determine the display orientation vector by finding which of two orthogonal vectors and their corresponding parity reverse counterparts, along display axes in the display coordinate system, is most parallel to a vector in the display coordinate system representing a mapping of a y-axis of the voxel block.
[0033] The processor circuit may be operable to determine an edge of the voxel block, that contains the base point and that appears to extend in a direction progressing most rapidly away from the view plane when mapped to the display coordinate system and to define the plane axis as a line in the voxel coordinate system, coincident with the edge.
[0034] The processor circuit may define as the column axis a line in the coordinate system which is coincident with the base point and which intersects the plane axis and which is at an angle to a y-axis of the voxel block.
[0035] The processor circuit may compute a parallel projection mapping for mapping points in the voxel block to points in the display coordinate system.
[0036] The processor circuit may produce a clipping table and using the clipping table to determine whether a voxel is renderable. The clipping table may have fields associated with corresponding columns in the voxel block and the fields may be populated with indicators indicating whether or nor a set of position indicators is to be produced for corresponding columns. Alternatively, or in addition, the processor circuit may populate the fields with a range indicator indicating a range of voxels within a corresponding column, for which a set of position indicators is to be produced.
[0037] The apparatus further includes a priority completion buffer operable to store an indication of whether or not a given display position has been associated with a reference to a position specifier. The processor circuit may read the indication when the given display position is computed for a given position specifier and to output the reference to the given position specifier when the indication indicates that a position specifier has not already been associated with the given display position.
[0038] In drawings which illustrate embodiments of the invention,
[0039]
[0040]
[0041]
[0042]
[0043]
[0044]
[0045]
[0046]
[0047]
[0048]
[0049]
[0050]
[0051]
[0052]
[0053]
[0054]
[0055] Referring to
[0056] The computer system
[0057] The set of codes
[0058] The set of codes
[0059] The embodiments herein relate to associating data in a volume data set with positions on a display, for use rendering data from the data set on the 2D graphics display
[0060] Referring to
[0061] Referring back to
[0062] Alternatively, the voxel block
[0063] In this embodiment, the voxel block
[0064] In this embodiment, a base
[0065] In general, the voxel block
[0066] The voxel block
[0067] The voxel associating method and apparatus described herein are intended for use with voxel information stored in a column-oriented data structure. A suitable column oriented data structure is described in International Patent Application No. PCT/CA01/00686, filed May 16, 2001. Generally in a column oriented data structure of the type referred to herein, a column of active voxels in a voxel block is associated with a group of memory locations, each of which is associated with a respective index and at least the geometric representations of active voxels in the column are stored in successive memory locations in the group. This permits a group of memory locations associated with a column of active voxels in the voxel block to be addressed. The individual memory location within the group can then be sequentially addressed, enabling fast access to voxel information, a column at a time, as will become apparent below.
[0068] An example of a column-oriented data structure with which the apparatus and methods according to the various embodiments of the invention operate is shown at
[0069] The data area
[0070] The management area
[0071] The memory allocation control area
[0072] The base array
[0073] Since the Y coordinates of the active voxels in the column are stored in association with respective indices in the group identified by the base array, the X and Z coordinates of a given voxel can be used to find the group of memory locations associated with the column and the Y coordinate of the given voxel can be used to search within the group for the associated index.
[0074] This index identifies all the memory locations in which all the attributes of the voxel are stored, for use in associating.
[0075] Referring back to
[0076] Referring to
[0077] Initialization Routine
[0078] Referring to
[0079] The information which is computed in the initialization routine is based on the voxel block and the view plane positioned in a global coordinate system.
[0080] The voxel block coordinate system (and hence the voxel block's position and orientation) is described by a function φ that produces the voxel block coordinates of a point, given its global coordinates. The function φ employs a unique three-tuple pφ and a unique 3×3 orthogonal matrix Rφ such that for every point x (given in global coordinates), the corresponding point in voxel block coordinates is given by:
[0081] In addition to Rφ and pφ, which define the position and orientation of the voxel block, the three integers X-size, Y_size and Z_size are supplied to define the dimensions of the voxel block. Rφ, pφ, X_size, Y_size and Z_size are all specified in the management area
[0082] The view plane coordinate system (and hence the view plane's position and orientation) is described by a function ψ that produces the view plane coordinates of a point given its global coordinates. The function ψ employs a unique three-tuple pψ and a unique 3×3 orthogonal matrix Rψ such that for every point x (given in global coordinates), the corresponding point in view plane coordinates is given by:
[0083] In addition to Rψ and pψ, which define the position and orientation of the view plane, two integers X_SCREEN_SIZE and Y_SCREEN_SIZE are supplied to define the dimensions of the view plane.
[0084] The basic steps for initializing are indicated by blocks
[0085] In the embodiment shown, the first step in the initialization routine is represented by block
[0086] In this embodiment a parallel projection map π for a point x in the global coordinate system is defined by:
[0087] Thus, a parallel projection map Π that produces the view plane coordinates of a point given its voxel block coordinates x
[0088] This general transform will be referred to as a parallel projection transformation herein referred to as Π. Thus, in general the transformation Π determines display coordinates (X
[0089] While the implementation of the transform described herein is by use of a programmed processor circuit, it will be appreciated that a dedicated hardware function for achieving the same result may be implemented in an integrated circuit such as an application-specific integrated circuit. Regardless of how the transform is implemented any device which performs the function of mapping voxel block coordinates to view plane coordinates may be referred to as a mapper.
[0090] The next step in the initialization routine is represented by block
[0091] As a first step in finding the base point, a display orientation vector u is determined. Effectively this involves finding which of two orthogonal vectors and their corresponding parity reverse counterparts, along display axes in the display coordinate system, is most parallel to a vector in the display coordinate system which represents a mapping of the y-axis of the voxel block
[0092] To do this a unit vector
[0093] If any one of these unit vectors maximizes the above statement, any one may be selected. Next, referring to
[0094] To do this, each of the eight voxel positions
[0095] The base point is defined as the corner point of the voxel block
[0096] Let b be a corner of the voxel block (ie b ∈{(0, 0, 0), (0, 0, Z_size), (0, Y_size, 0), (X_size, 0, 0), (X_size, Y_size, 0), (X_size, 0, Z_size), (0, Y_size, Z_size), (X_size, Y_size, Z_size)} that minimizes
[0097] Where there is more than one corner vector giving the smallest dot product, any of the associated corner vectors may be taken as determining the base point. In this embodiment the first of the smallest dot products found determines the base point. In the example shown, the base point is taken as point
[0098] After finding the base point it is necessary to determine the plane and column axes of the voxel block
[0099] To do this, referring to
[0100] Mathematically, this can be represented as:
[0101] Let r be the unique corner of the voxel block such that r−b is parallel to the x-axis of the voxel block coordinate frame.
[0102] Let s be the unique corner of the voxel block such that s−b is parallel to the z-axis of the voxel block coordinate frame.
[0103] Then, if
[0104] then the plane axis is the Z-axis, otherwise the plane axis is the X-axis.
[0105] Referring back to
[0106] The full transform for obtaining a linear address from a plane, column and y-direction three-tuple (p,c,y) representing a voxel position in the voxel block is given as:
[0107] Since each position (p,c,y) in the voxel block can effectively be represented as integer extensions of unit vectors in each direction from the base point the above function is easily implemented in a fast lookup table as shown in
[0108] In the event that the x-axis had been found to be the plane axis, the entries under the Plane (z) and Column (x) headings would be interchanged and the headings would be changed to Plane (x) and Column (z).
[0109] Next, block
[0110] A clipping table may have the same dimensions as the base array
[0111] Similarly, referring back to
[0112] In this table, each position in the table identifies the range of y values such as 0 to 50, for example, which are to be included in the render. This has the effect of defining clipping boundaries vertically within the voxel block
[0113] It will be appreciated that by using a combination of a column inclusion clipping table and a range clipping table, a clipping boundary of any convex shape can be defined.
[0114] Referring back to
[0115] Associating Routine
[0116] Referring to
[0117] The voxel addressing and verification portion
[0118] After a column address has been determined, blocks
[0119] If at block
[0120] If the clipping table contains a one, the column is renderable and the processor circuit is directed to block
[0121] At block
[0122] As a result of completing the voxel addressing and verification routine the processor circuit has effectively produced renderable voxel position specifier in the form of a three-tuple comprised of a plane axis value, a column axis value and a y-value. This three-tuple is received at a first block
[0123] Once the display position is known, it is used at block
[0124] If at block
[0125] After outputting the number pair above, block
[0126] The processor circuit is then directed back to block
[0127] As a result of the scan order, the most foreground plane having renderable voxels is considered first, the next most foreground plane is considered and so on, until the most background plane is considered. This ensures that the voxel positions of renderable voxels in the more foreground planes are associated with display addresses before voxel positions of renderable voxels in the more background planes and thus the priority/completion buffer is progressively loaded as a result of references being assigned to display addresses produced in the foreground planes first. Consequently, the foreground planes are given priority in assignment of references to display positions, which automatically causes occlusion of renderable voxels in more background planes which would map to display positions to which references have already been assigned for position specifiers in more foreground planes. Thus, a relatively small set of data, comprised of display positions and references to renderable voxels, which are not occluded, is passed to a rendering program.
[0128] Once provided with a display position and reference pair, the rendering program (not shown) can use the reference to obtain normal and color information, for example, as may be stored in the color and normal arrays
[0129] While the operations of scanning the voxel block and associating references with display positions are described as being implemented by a processor circuit which is programmed by processor readable instructions, these operations may alternatively be implemented by dedicated hardware devices such as integrated circuits which may include application specific integrated circuits (ASICs). Thus an ASIC may have a functional block which acts as a scanner, for example, which is designed to determine the base point and scan order and use these to scan the voxel block.
[0130] In addition, the priority/establishment routine is described as being carried out by a processor circuit but this also may be implemented in an ASIC, where the priority/establishment routine is implemented in a functional block which may be referred to as an associator which associates respective display positions with corresponding position specifiers such that position specifiers which map to display positions which are already associated with position specifiers identifying more foreground positions on the display are not associated with display positions.
[0131] Referring to
[0132] The ASIC includes a scanner functional block
[0133] The identifier
[0134] The associator
[0135] While specific embodiments of the invention have been described and illustrated, such embodiments should be considered illustrative of the invention only and not as limiting the invention as construed in accordance with the accompanying claims.