Volume data, such as multi-dimensional images, need to be rendered onto 2D displays in many situations such as for medical imaging, mechanical engineering, scientific visualization, computer games and other applications. For example, volume rendering algorithms take an input signal defined on a three-dimensional domain and project it onto a two-dimensional image.
Various techniques are known for rendering 3D and higher dimensional images onto 2D displays. For example ray casting involves tracing the path of light through pixels in an image plane into a 3D volume. The 3D volume may have been obtained empirically using measurement equipment such as an MRI scanner or image capture device. However, ray casting is extremely computationally expensive and time consuming as it involves integrating data at each point along each ray. This has meant that many practical applications that use ray casting have typically rendered images slowly ahead of time. Also, typically only the surfaces of objects in the volume have been rendered in order to cut down on the amount of computation required. In the case of medical imaging applications this has led to omission of context providing detail in the resulting 2D images and this makes it harder for medical staff to understand and interpret the rendered images.
In hospitals, computerized tomography (CT) scanners, magnetic resonance imaging (MRI) scanners and other equipment produce new volume data for patients every day. Currently this volume data can only be visualized on dedicated workstations or rendered remotely by expensive CPU clusters. This makes it difficult for medical staff to view diagnostic quality renderings of the volume data quickly over low bandwidth connections and/or using thin clients. It is also difficult for medical staff to be given ubiquitous access to high quality renderings of volume data from different locations on a network and simultaneously with access by other medical staff. These problems also exist for other types of volume data that is required to be visualized on-demand and in real-time by multiple simultaneous users, with low latency even on low bandwidth internet connections and on thin clients.
The embodiments described below are not limited to implementations which solve any or all of the disadvantages of known volume rendering systems.
The following presents a simplified summary of the disclosure in order to provide a basic understanding to the reader. This summary is not an extensive overview of the disclosure and it does not identify key/critical elements of the invention or delineate the scope of the invention. Its sole purpose is to present some concepts disclosed herein in a simplified form as a prelude to the more detailed description that is presented later.
Architecture for volume rendering is described. In an embodiment volume rendering is carried out at a data centre having a cluster of rendering servers connected using a high bandwidth connection to a database of medical volumes. For example, each rendering server has multiple graphics processing units each with a dedicated device thread. For example, a surgeon working from home on her netbook or thin client is able to have a medical volume rendered remotely at one of the rendering servers and the resulting 2D image sent to her over a relatively low bandwidth connection. In an example a master rendering server carries out load balancing at the cluster. In an example each rendering server uses a dedicated device thread for each graphics processing unit in its control and has multiple calling threads which are able to send rendering instructions to appropriate ones of the device threads.
Many of the attendant features will be more readily appreciated as the same becomes better understood by reference to the following detailed description considered in connection with the accompanying drawings.
The present description will be better understood from the following detailed description read in light of the accompanying drawings, wherein:
Like reference numerals are used to designate like parts in the accompanying drawings.
The detailed description provided below in connection with the appended drawings is intended as a description of the present examples and is not intended to represent the only forms in which the present example may be constructed or utilized. The description sets forth the functions of the example and the sequence of steps for constructing and operating the example. However, the same or equivalent functions and sequences may be accomplished by different examples.
Although the present examples are described and illustrated herein as being implemented in a volume rendering system, the system described is provided as an example and not a limitation. As those skilled in the art will appreciate, the present examples are suitable for application in a variety of different types of rendering systems.
The storage server (102) comprises any appropriate storage media. Examples of appropriate storage media are magnetic or optical storage devices, random access memory (RAM), a hard disk drive, CD, DVD or other disc drive, flash memory, EPROM or EEPROM. The storage server may be located at the same machine as the master rendering server 106 or other rendering servers 104, 105. Alternatively the rendering and storage servers can be located on separate machines with a high bandwidth connection provided between each rendering server 102, 104, 105, 106 and the storage server 102.
Each of the rendering servers has at least one cache 108 in which volume data sets retrieved from the storage server 102 can be stored. Each rendering server may have a plurality of caches. One or more Graphics Processing Units (GPUs) 110, 120, 122, 124, 126 are integral with or connected to each rendering server and under the control of that rendering server. A GPU is a specialized processor that offloads three dimensional graphics rendering from a microprocessor. Whereas CPUs typically have a few cores (2-8 for example) GPUs often have hundreds or more and so are more suited to finer grained parallel tasks like ray casting. This may offer large performance benefits for graphics rendering as well as other complex algorithms where the algorithms are appropriately designed to make benefit of the GPU resources.
Images are rendered at the data centre from the volume data stored at the storage server 102 using any suitable rendering algorithm. Examples of suitable rendering algorithms include but are not limited to ray-casting and marching cubes. The images rendered at the data centre 100 can then be served to remote client machines. The images may be served over a hospital intranet 112 or through a communications network 116. The communications network may be any appropriate network. Examples of appropriate networks are Local Area Networks (LAN), Wide Area Networks (WAN), Public Switched Telephone Networks (PSTN), the Internet and Virtual Private Networks (VPN). The network 116 can be a wireless network or a wired network or combinations of these.
The files may be transferred using any appropriate file transfer protocol. A non-exhaustive list of examples of appropriate file transfer protocols is HTTP, FTP, SFTP, SCP. The files are transferred to a remote client. In the examples described herein remote clients include hospital work stations 114, laptops or netbooks 118. The rendered images may be optionally displayed at the remote client or on any appropriate display.
Volume data sets are large in size and transferring such data sets to client machines 114, 118 over networks which may have low-bandwidth causes delays in interaction with the data sets. In addition, parts of the data may be lost or become corrupted during the transfer process. Volume rendering is also highly computationally and memory intensive and imposes cumbersome restrictions on client machines 114, 118 in terms of their CPUs and GPUs. A relatively low specification client machine such as netbook 118 may lack the resources to execute appropriate rendering algorithms, which may leave the user unable to view the data remotely. By using clusters of GPUs at a data center as described herein these issues are addressed. For example, this enables hospital-scale deployment of remote rendering of medical volume data. In addition, by concentrating the required computing power in a data centre 100 it may also be possible to leverage efficiencies and economies of scale such as by reducing installation costs.
Using clusters of GPUs yields challenges related to simultaneous clients, load balancing, transport and efficiency. For example, simultaneous volume rendering is carried out at the data centre for a plurality of data sets and served to client machines 114, 118 at remote locations. Users of client machines can include radiologists, surgeons, oncologists, general practitioners, patients or any other appropriate user. To most efficiently make use of the available resources load balancing is performed among the multiple processors to achieve scaleability and serve many different clients simultaneously. Load balancing techniques can be used to select an appropriate GPU. In the examples herein the rendering server can be selected by looking for the GPU with the most free memory and returning its host's address to the client. However, any appropriate load balancing mechanism can be used. Examples of load balancing mechanisms are round robin or random choice algorithms. Other factors may be taken into account when selecting which GPU to use. A non-exhaustive list of factors is; a server's reported load, recent response times, up/down status (determined by a monitoring poll of some kind), number of active connections, geographic location, capabilities, or how much traffic a rendering server has recently been assigned. Multiple layers of load balancing may be used. For example, load balancing between master rendering servers (in cases where two or more master rendering servers are provided), load balancing between rendering servers associated with a particular master rendering server, load balancing between GPUs associated with a particular rendering server.
In the examples described herein volume rendering may be carried out by graphics processing units of which there is at least one integral with or connected to each rendering server. GPUs 110,120, 122,124,126 may provide efficient volume rendering due to their parallelism, their built in tri-linear texture sampling and their superior memory bandwidth (as compared with CPUs).
Client side software is optionally provided on the client machines 114, 118 to enable an end user to request and view images rendered at the data centre 100. In an example the client side software is a thin client which may provide a graphical user interface to a rendering service provided by the data center 100. In an example the thin client provides the ability to control the rendering service to load volume data sets from the storage server 102 to a GPU at the data center 100, to choose a rendering mode, to interactively manipulate a viewpoint and transfer functions; and to define and interactively manipulate clipping planes or carry out any other appropriate task.
Each rendering server has at least one GPU attached and each GPU may serve multiple clients. In an example, each rendering server is provided with a multi-threaded programming environment for controlling the GPU(s) attached to that rendering server. For example, this programming environment is arranged to provide good results where calls which use GPU resources occur in the same thread that allocates and frees those resources.
On each rendering server a process is run which receives client requests, performs rendering and replies with data as appropriate. A plurality of threads can be associated with each process. In an example the threads can executed on multiple processors, on processors with multiple cores, or on a single multi-threading processor core. A non-limiting list of examples of multi-threading techniques is block multi-threading, interleaved multi-threading and simultaneous multi-threading. Each thread has access to shared system resources.
A device thread is started 302 for each GPU attached to the server. The device threads run at the CPU of the rendering server. As client requests arrive on the server simultaneously on different calling threads, it is determined which GPU can serve the request and the request data is serialized to the appropriate device thread associated with the GPU. Each time a device thread receives a render request it wakes up if necessary and processes the instructions in the queue. Each GPU may have a plurality of volumes for rendering stored in the cache. If a volume for rendering is not stored in the cache it is retrieved from the storage server 102.
By using separate device threads for each GPU controlled by a rendering server in conjunction with the calling threads as described, the benefit of being able to use a particular type of programming environment at the rendering server is achieved. This programming environment may be one which is arranged to provide good results where calls which use GPU resources occur in the same thread that allocates and frees those resources. For example, a calling thread is able to send instructions to multiple device threads in order to indirectly use any GPU resources. However, each device thread has calls which use only the resources of a single GPU.
In an example the rendering servers comprise a Compute Unified Device Architecture (CUDA®) environment for controlling the graphics processing units. For example, the graphics processing units may be nVidia® graphics processing units such as Tesla® S1070® which connects via cables to the PCIe bus of a host machine. However, this is an example only, any suitable type of graphics processing units may be used with any suitable programming environment at the rendering server.
Each device thread 402 consists of a queue of instructions that the associated GPU is to carry out. A non exhaustive list of examples of instructions that the device thread can carry out is; retrieve data from storage, apply rendering algorithm, retrieve data from the cache, re-render data, transfer the rendered image to main memory.
There is only one device thread associated with each GPU. However, the device thread may contain many sets of instructions. The device threads can be in serial form. Instructions are sent to multiple device threads from a calling thread. If a volume has been previously stored in the cache of a GPU, instructions relating to that volume will continue to be sent to the device thread of the appropriate GPU. This ensures that memory and bandwidth resources are not used to retrieve data from the storage server 102 unnecessarily. If volume data has not previously stored in the cache of a GPU then the master rendering server 106 will select an appropriate rendering server using load balancing techniques as described above.
Each time the user requests a different image the volume is re-rendered. Storing volumes in the GPU cache reduces the time taken to execute repeat instructions from the user. A request received by the calling thread 400 may contain many parameters. A non exhaustive list of parameters that may be received is image width, image height, virtual camera position and color transfer functions. The parameters can be transferred with each request or stored in the cache 108. Each time a request for a different image, requiring re-rendering of the volume, is received at the calling thread, instructions to render the image are added to the device thread. The instructions are then executed in serial by the device thread.
As described above, a calling thread receives 502 a request to render a volume (in this example volume 2). The calling thread then determines 406 which GPU is loaded with volume 2. A request is added 408 to the found GPU's device thread (in this example GPU B). A rendering algorithm is applied 412 and the output image is transferred 414 to main memory. A notification signal that the request is completed is sent 416 to the calling thread and image data is sent 418 to the client.
Calling thread 2500 executes simultaneously to calling thread 1. Calling thread 2 receives a request 508 to render a volume (in this example volume 4). The calling thread determines that the volume (in this example volume 4) is associated 510 with a GPU (in this example GPU C). A request 512 is added 514 to the appropriate device thread's 506 queue to render volume 4. A rendering algorithm is applied 518 to volume 4 and the output image is transferred 520 to the main memory. A signal that the request has been completed 522 is returned to the calling thread 500.
In the examples described above with reference to
In the example described herein the requests are received at the same calling thread. However, the requests could be received at different calling threads. Requests from a plurality of calling threads can be added to a device thread and are executed in the order in which they are received. In a further example the requests 600, 602 can be received at the same calling thread and distributed to a plurality of device threads. The distribution of requests from a plurality of calling threads to a plurality of device threads can be based on where volumes are cached. The distribution of requests can be based on load balancing techniques executed on a processor at the master rendering server.
Computing-based device 700 comprises one or more processors 702 which may be microprocessors, controllers or any other suitable type of processors for processing computing executable instructions to control the operation of the device in order to execute volume rendering. Platform software comprising an operating system 704 or any other suitable platform software may be provided at the computing-based device to enable application software 706 to be executed on the device.
Image processing hardware 708 such as a graphics processing unit is also provided at the device 700. The image processing hardware may be one or more processing devices. Image analysis logic 710 may also be provided. The image analysis logic may be any form of appropriate rendering logic. In an example the rendering logic is a ray-casting engine. A data store 714 is provided in order to store 3 or higher dimensional data volumes.
The computing-based device 700 comprises one or more inputs 718 which are of any suitable type for receiving media content, Internet Protocol (IP) input, FTP input, TCP/IP input, HTTP input or any other appropriate input and including three or higher dimensional volume data. The device also comprises communication interface 720 to enable the device to communicate with other rendering servers, databases or other entities over a communications network.
The computer executable instructions may be provided using any computer-readable media, such as memory 716. The memory is of any suitable type such as random access memory (RAM), a disk storage device of any type such as a magnetic or optical storage device, a hard disk drive, or a CD, DVD or other disc drive. Flash memory, EPROM or EEPROM may also be used. Although the memory is shown within the computing-based device 700 it will be appreciated that the storage may be distributed or located remotely and accessed via a network or other communication link (e.g. using communication interface 720).
An output is also provided such as an audio and/or video output to a display system integral with or in communication with the computing-based device. An output interface 722 to a display system may provide a graphical user interface, or other user interface of any suitable type although this is not essential.
The term ‘computer’ is used herein to refer to any device with processing capability such that it can execute instructions. Those skilled in the art will realize that such processing capabilities are incorporated into many different devices and therefore the term ‘computer’ includes PCs, servers, mobile telephones, personal digital assistants and many other devices.
The methods described herein may be performed by software in machine readable form on a tangible storage medium. Examples of tangible (or non-transitory) storage media include disks, thumb drives, memory etc and do not include propagated signals. The software can be suitable for execution on a parallel processor or a serial processor such that the method steps may be carried out in any suitable order, or simultaneously.
This acknowledges that software can be a valuable, separately tradable commodity. It is intended to encompass software, which runs on or controls “dumb” or standard hardware, to carry out the desired functions. It is also intended to encompass software which “describes” or defines the configuration of hardware, such as HDL (hardware description language) software, as is used for designing silicon chips, or for configuring universal programmable chips, to carry out desired functions.
Those skilled in the art will realize that storage devices utilized to store program instructions can be distributed across a network. For example, a remote computer may store an example of the process described as software. A local or terminal computer may access the remote computer and download a part or all of the software to run the program. Alternatively, the local computer may download pieces of the software as needed, or execute some software instructions at the local terminal and some at the remote computer (or computer network). Those skilled in the art will also realize that by utilizing conventional techniques known to those skilled in the art that all, or a portion of the software instructions may be carried out by a dedicated circuit, such as a DSP, programmable logic array, or the like.
Any range or device value given herein may be extended or altered without losing the effect sought, as will be apparent to the skilled person.
It will be understood that the benefits and advantages described above may relate to one embodiment or may relate to several embodiments. The embodiments are not limited to those that solve any or all of the stated problems or those that have any or all of the stated benefits and advantages. It will further be understood that reference to ‘an’ item refers to one or more of those items.
The steps of the methods described herein may be carried out in any suitable order, or simultaneously where appropriate. Additionally, individual blocks may be deleted from any of the methods without departing from the spirit and scope of the subject matter described herein. Aspects of any of the examples described above may be combined with aspects of any of the other examples described to form further examples without losing the effect sought.
The term ‘comprising’ is used herein to mean including the method blocks or elements identified, but that such blocks or elements do not comprise an exclusive list and a method or apparatus may contain additional blocks or elements.
It will be understood that the above description of a preferred embodiment is given by way of example only and that various modifications may be made by those skilled in the art. The above specification, examples and data provide a complete description of the structure and use of exemplary embodiments of the invention. Although various embodiments of the invention have been described above with a certain degree of particularity, or with reference to one or more individual embodiments, those skilled in the art could make numerous alterations to the disclosed embodiments without departing from the spirit or scope of this invention.