Fovia C++ In-Process API
|
Public Member Functions | |
virtual signed int | ApplyVolumetricShadowMap (IVolumeShadow *pShadow)=0 |
virtual signed int | AskInterface (const BGUID *piid, IRoot **ppr)=0 |
virtual signed int | Close ()=0 |
virtual signed int | DecRef ()=0 |
virtual signed int | FastSwap (IVolumeData *pData, IVolumeOctree *pOctree)=0 |
virtual signed int | FreeHandCut (signed int numPoints, POINT *arrPoints, int ppWidth, int ppHeight, int type)=0 |
virtual signed int | GetCurvedResampling (IVolumeData **pOutputData, signed int numProjPlanesPerSlice, signed int numSlices, signed int ppWidth, signed int ppHeight, signed int measurementSlice, float Zoom, MATRIX44D **arrProjPlanes, ENUM_CURVED_MPR_TYPE type)=0 |
virtual signed int | GetCurvedResamplingAlongNormal (IVolumeData **pOutputData, signed int numProjPlanes, signed int numSlicesInFront, signed int numSlicesBehind, double sliceSpacing, signed int ppWidth, signed int ppHeight, float Zoom, MATRIX44D *arrProjPlanes, ENUM_CURVED_MPR_TYPE type)=0 |
virtual signed int | GetCurvedSegmentationResampling (DATABYTE ***pBuffer, signed int numProjPlanesPerSlice, signed int numSlices, signed int ppWidth, signed int ppHeight, signed int measurementSlice, float Zoom, MATRIX44D **arrProjPlanes, ENUM_CURVED_MPR_TYPE type, IAllocator *pAlloc)=0 |
virtual signed int | GetFramesPerPhase (signed int *frames)=0 |
virtual signed int | GetLastRenderedParams (RENDER_PARAMS *pVal)=0 |
virtual signed int | GetMandibleTrace (VECTOR3D *left, VECTOR3D *right, VECTOR3D *front, unsigned int *numPoints, VECTOR3D *points, MATRIX44D *projectionPlane, float *zoom, double *slabThickness)=0 |
virtual signed int | GetNavigationVector (VECTOR3D *v)=0 |
virtual signed int | GetPointVisibility (VERTEX3D *vtr, POINTVISIBLEINFO *pt, signed int Num)=0 |
virtual signed int | GetPolygonCrossSectionLineParameters (double *width, COLOR_RGBA *color)=0 |
virtual signed int | GetRenderCallback (IRenderEngineCallback **irec, signed int **id)=0 |
virtual signed int | GetRenderParams (RENDER_PARAMS *rp)=0 |
virtual signed int | GetSegmentationBoundaries (unsigned long long *masks)=0 |
virtual signed int | GetTransferFunction (unsigned int index, RENDER_RANGE_PARAMS *arrParams)=0 |
virtual signed int | GetTransferFunctionCount (unsigned int *numTFs)=0 |
virtual signed int | GetVertexCallLists (unsigned int *numLists, IVertexCallList ***arrLists)=0 |
virtual signed int | GetVolumeCount (signed int *numVolumes)=0 |
virtual signed int | GetVolumeData (IVolumeData **vd, IVolumeOctree **vo)=0 |
virtual signed int | GetVoumetricShadowMap (IVolumeShadow **ppShadow)=0 |
virtual signed int | IncRef ()=0 |
virtual signed int | InterruptCurvedResampling ()=0 |
virtual signed int | InterruptRender ()=0 |
virtual signed int | IsRenderingFinished ()=0 |
virtual signed int | ProjectPoint (VERTEX3D *vtr, POINT *pt, signed int Num)=0 |
virtual signed int | ProjectVolumetricShadow ()=0 |
virtual signed int | Render (signed int Reserved, VOLVISIMAGE imReq, VOLVISIMAGE *imRes)=0 |
virtual signed int | RenderShadowLight ()=0 |
virtual signed int | ResetRenderParams ()=0 |
virtual signed int | SetCurvedMPRPath (signed int numProjPlanes, MATRIX44D *arrProjPlanes, ENUM_CURVED_MPR_TYPE type)=0 |
virtual signed int | SetFastPolygonsEnabled (signed int bEnabled)=0 |
virtual signed int | SetFramesPerPhase (signed int frames)=0 |
virtual signed int | SetFreeHandCutMode (ENUM_FHC_MODE mode)=0 |
virtual signed int | SetOpacityReductionForSegmentationBoundary (unsigned int log2reduction)=0 |
virtual signed int | SetPhase (signed int phase)=0 |
virtual signed int | SetPolygonCrossSectionLineParameters (double width, COLOR_RGBA color)=0 |
virtual signed int | SetProbeRayEnergyThreshold (double val)=0 |
virtual signed int | SetRenderCallback (IRenderEngineCallback *irec, signed int *id)=0 |
virtual signed int | SetRenderParams (RENDER_PARAMS *rd)=0 |
virtual signed int | SetSegmentationBoundaries (unsigned long long *masks)=0 |
virtual signed int | SetSegmentationBoundaryLightingThreshold (double threshold)=0 |
virtual signed int | SetTransferFunction (unsigned int index, RENDER_RANGE_PARAMS *arrParams)=0 |
virtual signed int | SetVertexCallLists (unsigned int numLists, IVertexCallList **arrLists)=0 |
virtual signed int | SetVertexColorMapTransferFunction (RENDER_RANGE_PARAMS *rrp)=0 |
virtual signed int | SetViewMode (ENUM_VIEW_MODE rm)=0 |
virtual signed int | SetVolumeData (IVolumeData *vd, IVolumeOctree *vo)=0 |
virtual signed int | SetVolumeData4D (IVolumeData **vd, IVolumeOctree **vo, signed int numVolumes)=0 |
virtual signed int | ShootRay (POINT *pt, RAYSTOPINFO *rsi, signed int Num)=0 |
virtual signed int | ShootRayEx (POINT *pt, VECTOR3D *start, VECTOR3D *direction, double percent, RAYSTOPINFO *rsi, signed int Num)=0 |
virtual signed int | ShootRayFast (POINT *pt, RAYSTOPINFO *rsi, signed int Num)=0 |
virtual signed int | ShootRayGetWall (POINT *pt, RAYWALLINFO *rwi, signed int Num)=0 |
virtual signed int | StartRender (signed int Reserved, VOLVISIMAGE imReq)=0 |
virtual signed int | TestFunction (unsigned int testType, void *pTestData, signed int bVRColor)=0 |
virtual signed int | WaitRender (VOLVISIMAGE *imRes)=0 |
![]() | |
template<class T > | |
signed int | AskInterface (T **pp) |
IRenderEngine is the main interface for all rendering engines.
|
pure virtual |
Deprecated non-functioning interface. Decreasing the reference count on this object until it reaches 0 will cause all memory used by the object to be freed and all referenced objects to have their reference counts decremented.
|
pure virtual |
Decreases the reference count on this object by 1. If the reference count reaches 0, the object is deallocated.
Implements IRoot.
|
pure virtual |
Swaps out the current data set. You must not be in the process of rendering. Call InterruptRendering() if you're not sure. You also must be positive that the new volume's dimension and orientation is identical to the previous.
pData | The new volume data. |
pOctree | The new volume's octree. |
|
pure virtual |
Cut a section out up the data using a polygon specified by the POINT array. Note that IVolumeSegmentation simply delegates to this function when performing free hand cut operations. Therefore, if you will only be doing free hand cut segmentation there is no need to create IVolumeSegmentation.
numPoints | Number of points in our selection polygon. |
arrPoints | Points in the polygon. |
ppWidth | width in pixels of the projection plane. |
ppHeight | height in pixels of the projection plane. |
type | SEGMENTATION_TYPE_POSITIVE or SEGMENTATION_TYPE_NEGATIVE. |
|
pure virtual |
Creates a new volume from several curved MPR specifications. This function may be used to reformat a volume so that a curved render may have depth as well. The resultant volume may then be rendered in any available rendering mode. Viewing the volume axially will give the view you would get from SetCurvedMPRPAth().
pOutputData | The resultant volume data. |
numProjPlanesPerSlice | The number of positions that make up the curve for each slice. |
numSlices | The number of slices |
ppWidth | Output volume width |
ppHeight | Output volume height |
measurementSlice | This is the index (0-based) of the slice to specify for accurate measurement. For example, if you specify 3 the fourth image in the volume will have the property that pixels in the X and Y directions will be accurately represented in millimeters. |
Zoom | The number of pixels per voxel in the non-curved dimension. If this is -1, the pixels per voxel is calculated based upon the length of the curve. |
arrProjPlanes | The projecton plane positions for each slice. The dimensions are arrProjPlanes[slice][curvePoint]. |
type | Which axis is going to be non-linear on every slice? |
|
pure virtual |
Reserved for future use.
|
pure virtual |
Returns the RENDER_PARAMS used for the most recently completed frame.
pVal | RENDER_PARAMS to receive the data. |
|
pure virtual |
Obtain autonavigation vector. Only valid for perspective rendering. This vector will define the direction in which we should move. The magnitude of the vector is the average screen depth during the last completed render.
Note that this function is closely related to rendering itself. You should only apply the navigation vector once per render call. Also, only apply this vector to the RENDER_PARAMS from the previously completed frame. This can be retrieved by calling GetLastRenderedParams().
Once you receive the autonavigation vector, you will probably want to rotate in the direction you've navigated. Here is some sample code to illustrate this:
v | VECTOR3D structure to receive the nav vector. |
|
pure virtual |
Project 3D coordinates (in patient system coordinates) onto the rendering plane. Output points are relative to the center of the rendering plane, with X axis increasing along the raster, Y axis increasing along rows. Additionally, the opacity of the specified point is returned. This information may be used to render 3D primitives on a video card with relatively accurate interaction with the volume.
vtr | Pointer to an array of 3D vertices to project |
pt | Pointer to an array of POINTVISIBLEINFO structures |
Num | Number of vertices to convert |
|
pure virtual |
Gets the current callback (even if it's NULL).
irec | Recieves the address of the pointer to the callback interface |
id | Recieves the address of the pointer to the callback interface ID |
|
pure virtual |
Get the current rendering parameters. This will represent all that is known about the state of the rendering engine. Examine the RENDER_PARAMS::Mask to determine what parameters are valid.
rp |
|
pure virtual |
Only applicable in eight transfer function builds. Gets the transfer function currently at index (0-7) and puts it in arrParams.
index | Index (0-7) of the transfer function to get. |
arrParams | The transfer function. This should be an array of RENDER_RANGE_PARAMS that is MAX_RENDER_RANGES_PARAMS in length. |
|
pure virtual |
Gets the call lists applied to this object. The pointer returned into *arrLists is still owned by this object Do not release this pointer.
|
pure virtual |
Returns the number of volumes into numVolumes. If the number is greater than 1, we're in 4D mode.
numVolumes | Integer to recieve the number of volumes. |
|
pure virtual |
vd and vo must be arrays large enough to hold the number of volume and octree pointers returned by GetVolumeCount(). If there is only one volume, a simple pointer is sufficient to recieve the volume and and octree pointers.
|
pure virtual |
Increases the reference count on this object by 1. You do not need to call this after an object is first created. It is 1 by default.
Implements IRoot.
|
pure virtual |
Interrupt rendering operation. If the rendering engine is performing a rendering operation, then the function returns as soon as the rendering process is terminated. If the rendering engine is not performing rendering operation then the function returns immediately.
Note that the final stage of rendering is the place where this call makes the most sense. In fact, internally interactive stages will complete regardless of whether you interrupted them. However, once interrupted no rendering stage requires you to call WaitRender().
|
pure virtual |
Returns S_OK if the rendering is finished AS WELL AS if the function was called when no rendering is happening. Returns S_FALSE if rendering is still in progress.
|
pure virtual |
Project 3D coordinates (in patient system coordinates) onto the rendering plane. Output points are relative to the center of the rendering plane, with X axis increasing along the raster, Y axis increasing along rows
vtr | Pointer to an array of 3D vertices to project |
pt | Pointer to an array of 2D points |
Num | Number of vertices to convert |
|
pure virtual |
Projects a volume shadow from the current view location. This is implemented by setting the parts of the volume to be shadowed to the second transfer function. The second TF should then be slightly darker than the first.
|
pure virtual |
Render image according to previously specified RENDER_PARAMS. This call will block until rendering completes.
Reserved | Reserved for future use. Should be set to zero. |
imReq | Specifies the required image dimensions, rendering stage, compression parameters...etc. Fill the structure with zeros to get the default image dimentions. |
imRes | Result image. The client is responsible to free the data with the correct allocator. The allocator can be Retrieved through ILibrary::GetAllocator() with AP_IMAGE for the id parameter. |
|
pure virtual |
Reset rendering parameters.to default values. Should really only be a last resort. There is no state of RENDER_PARAMS that is unrecoverable.
|
pure virtual |
Sets the curved MPR path to use. Essentially, the X vector in the projection plane describes the direction for the linear slice to take at every interpolated point on the curve. The offset in the projection plane describes where each point is. From this description, the points you specify are interpolated via Catmull-Rom spline interpolation. The spacing between interpolated points is dictated by the image size. NOTE: You call this function every time you switch to RT_MPR_CURVED. It does not persist across other render types.
numProjPlanes | Numbers of projection plane positions that make up the curve. |
arrProjPlanes | Projection plane positions that describe what we should interpolate between. |
type | Which axis is going to be non-linear? |
|
pure virtual |
Sets the number of frames to render before moving on to the next phase. Set this to 0 to keep the current phase indefinitely.
frames | The number of frames to render before moving on to the next phase. |
|
pure virtual |
Sets the free hand cut mode.
mode | Mode to set |
|
pure virtual |
If the control was initialized for 4D rendering, this sets the view to the specified phase.
phase | The phase to set. |
|
pure virtual |
Sets whether or not you'll recieve callbacks when rendering completes. If you call InterruptRender(), you will not recieve the callback.
irec | The interface to call whenever rendering completes. Set to NULL for no callback. |
id | Arbitrary id that will be passed back to you when the callback occurs. NULL is acceptable for this parameter. |
|
pure virtual |
The SetRenderParams function updates rendering parameters according to the RENDER_PARAMS::Mask variable. For optimal performance, it is recommended to only update necessary rendering parameters.
SetRenderParams cannot be called between StartRender() / WaitRender() calls.
rd | New parameters to apply. |
|
pure virtual |
Only applicable in eight transfer function builds. Sets the transfer function at index (0-7) to the TF specified in arrParams.
index | Index (0-7) of the transfer function to apply. |
arrParams | The transfer function. This should be an array of RENDER_RANGE_PARAMS that is MAX_RENDER_RANGES_PARAMS in length. |
|
pure virtual |
Sets an array of call lists to apply to this render engine. All rendered frames after this call will contain the polygon objects defined in those call lists. Do not call this function while rendering is in progress.
|
pure virtual |
WARNING: This call is deprecated and is really only a wrapper for setting the RF_FRONT_CLIPPING_PLANE_ENABLED flag to true for VM_MPR_CLIP or false for VM_VIEW3D.
Sets the method of viewing for the render engine. See ENUM_VIEW_MODE for more details.
rm | the mode to set. |
|
pure virtual |
Sets the volume that this rendering engine should be using.
Rendering engines must be associated with a VolumeData object. The association can be changed by repeatedly calling SetVolumeData() function. If the rendering engine is reassociated with a volume dataset of different size, then internal structures have to be updated. Switching between datasets of different size requires internal reinitialization of the engine, and therefore not recomended for real time interaction.
vd | The data to render. |
vo | The octree asseciated with this data. If you will only be using thin MIP/MPR rendering modes, you may pass NULL for this parameter. |
|
pure virtual |
Initializes a volume for 4D rendering. All data sets must be the same dimensions and orientation/skew/spacing.
vd | Array of IVolumeData interface pointers; one for each dataset. |
vo | Array of IVolumeOctree interface pointers; one for each dataset. |
numVolumes | The number of volumes in vd/vo. |
|
pure virtual |
Shoot a ray from specific points on the projection plane specified by RENDER_PARAMS::Transform.
pt | Array of coordinates from the projection plane |
rsi | Array of structures to receive the results of the ShootRay operation. |
Num | Number of elements in both arrays. |
|
pure virtual |
A significantly faster version of ShootRay() when shooting many rays. The catch is that you will NOT get the min and max information returned in the RAYSTOPINFO. For this reason, this function is insufficient for connectivity segmentation.
pt | Array of coordinates from the projection plane |
rsi | Array of structures to receive the results of the ShootRay operation. |
Num | Number of elements in both arrays. |
|
pure virtual |
Start rendering operation. When rendering process for final rendering stage has completed and was not interrupted by the InterruptRender() function the rendering engine will call the callback function specified by SetRenderCallback().
To receive the rendered image the client shall call WaitRender().
After calling StartRender() function only WaitRender() and InterruptRender() methods can be called.
Reserved | Reserved for future use. Should be set to zero. |
imReq | Structure describing the attributes of the requested image. |
|
pure virtual |
Wait for rendering operation to complete. The function can be called only if StartRender() function has been called.
imRes | Recieves the result image. See Render() for details. |