NifTK
16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
|
Used to quickly make test harnesses demos and research prototypes. More...
Public Member Functions | |
vtkCalibratedModelRenderingPipeline (const std::string &name, const mitk::Point2I &windowSize, const mitk::Point2I &calibratedWindowSize, const std::string &leftIntrinsicsFileName, const std::string &rightIntrinsicsFileName, const std::string &visualisationModelFileName, const std::string &rightToLeftFileName, const std::string &textureFileName, const std::string &trackingModelFileName, const std::string &ultrasoundCalibrationMatrixFileName, const std::string &ultrasoundImageFileName, const float &trackingGlyphRadius) | |
Constructor. More... | |
virtual | ~vtkCalibratedModelRenderingPipeline () |
std::string | GetName () const |
Returns the name of this object, just used for reference. More... | |
void | SetIsRightHandCamera (const bool &isRight) |
This class can be setup to be a right or left handed camera in a stereo camera pair. More... | |
bool | GetIsRightHandCamera () const |
Get the right(true)/left(false) indicator. More... | |
virtual void | Render () |
Updates the whole VTK pipeline. More... | |
void | DumpScreen (const std::string fileName) |
Updates screen and writes to specified file. More... | |
void | SaveModelToWorld (const std::string &fileName) |
Saves the Model to World transform to file. More... | |
void | SaveCameraToWorld (const std::string &fileName) |
Saves the Camera to World transform to file. More... | |
void | SetModelToWorldMatrix (const vtkMatrix4x4 &modelToWorld) |
Multiplies model vtkPolyData points by modelToWorld to give a position in world coordinates, having the effect of moving the model relative to the world coordinates. More... | |
void | SetModelToWorldTransform (const std::vector< float > &) |
Sets transform using rx,ry,rz (degrees), tx,ty,rz (mm). More... | |
void | SetCameraToWorldMatrix (const vtkMatrix4x4 &cameraToWorld) |
Used to set the camera position in world coordinates. More... | |
void | SetCameraToWorldTransform (const std::vector< float > &) |
Sets transform using rx,ry,rz (degrees), tx,ty,rz (mm). More... | |
void | SetWorldToCameraMatrix (const vtkMatrix4x4 &worldToCamera) |
Used to set the camera position in world coordinates. More... | |
void | SetWorldToCameraTransform (const std::vector< float > &) |
Sets transform using rx,ry,rz (degrees), tx,ty,rz (mm). More... | |
bool | IsFacingCamera (const double normal[3]) |
Returns true if point is deemed to be facing camera. normal vector of a point in world coordinates. More... | |
void | ProjectPoint (const double world[3], double imagePoint[2]) |
projects a point from world 3D to image 2D. More... | |
void | ProjectToCameraSpace (const double worldPoint[3], double cameraPoint[3]) |
projects a point from world 3D to camera 3D. More... | |
vtkPolyData * | GetTrackingModel () const |
Returns a pointer to the tracking model, so external classes can iterate over points for instance. More... | |
vtkRenderWindow * | GetRenderWindow () const |
Returns a point to the vtkRenderWindow. More... | |
Used to quickly make test harnesses demos and research prototypes.
Loads camera calibration files and displays a perspective projection without doing distortion correction (i.e. just does intrinsic and extrinsic).
vtkCalibratedModelRenderingPipeline::vtkCalibratedModelRenderingPipeline | ( | const std::string & | name, |
const mitk::Point2I & | windowSize, | ||
const mitk::Point2I & | calibratedWindowSize, | ||
const std::string & | leftIntrinsicsFileName, | ||
const std::string & | rightIntrinsicsFileName, | ||
const std::string & | visualisationModelFileName, | ||
const std::string & | rightToLeftFileName, | ||
const std::string & | textureFileName, | ||
const std::string & | trackingModelFileName, | ||
const std::string & | ultrasoundCalibrationMatrixFileName, | ||
const std::string & | ultrasoundImageFileName, | ||
const float & | trackingGlyphRadius | ||
) |
Constructor.
name | |
windowSize | The actual window size we want to represent (e.g. 1920, 1080) |
calibratedWindowSize | For calibrated camera model, we specify the size of the window that the calibration (e.g. niftkCameraCalibration) was done at. (e.g. 1920,540) |
leftIntrinsicsFileName | Filename containing intrinsic parameters, as output by other NifTK programs such as niftkCameraCalibration. |
rightIntrinsicsFileName | Filename containing intrinsic parameters, as output by other NifTK programs such as niftkCameraCalibration. |
visualisationModelFileName | Filename of vtkPolyData that will be rendered at a given pose. |
textureFileName | If not-empty, and if loadable, will be texture mapped onto the visualisationModel. |
rightToLeftFileName | If not-empty, and if loadable, will be added into camera matrices to simulate a right-hand camera. Default is left. |
trackingModelFileName | If not-empty, and if loadable, will also be rendered, where each surface point is combined with a sphere glyph. |
ultrasoundCalibrationMatrixFileName | If not-empty, and if loadable, and if ultrasoundImageFileName is also set, will also render the ultrasound image in place. |
ultrasoundImageFileName | If not-empty, and if loadable, and if ultrasoundCalibrationMatrixFileName is also set, will also render the ultrasound image in place. |
|
virtual |
void vtkCalibratedModelRenderingPipeline::DumpScreen | ( | const std::string | fileName | ) |
Updates screen and writes to specified file.
fileName | file name |
|
inline |
Get the right(true)/left(false) indicator.
|
inline |
Returns the name of this object, just used for reference.
vtkRenderWindow * vtkCalibratedModelRenderingPipeline::GetRenderWindow | ( | ) | const |
Returns a point to the vtkRenderWindow.
vtkPolyData * vtkCalibratedModelRenderingPipeline::GetTrackingModel | ( | ) | const |
Returns a pointer to the tracking model, so external classes can iterate over points for instance.
bool vtkCalibratedModelRenderingPipeline::IsFacingCamera | ( | const double | normal[3] | ) |
Returns true if point is deemed to be facing camera. normal vector of a point in world coordinates.
void vtkCalibratedModelRenderingPipeline::ProjectPoint | ( | const double | world[3], |
double | imagePoint[2] | ||
) |
projects a point from world 3D to image 2D.
void vtkCalibratedModelRenderingPipeline::ProjectToCameraSpace | ( | const double | worldPoint[3], |
double | cameraPoint[3] | ||
) |
projects a point from world 3D to camera 3D.
|
virtual |
Updates the whole VTK pipeline.
void vtkCalibratedModelRenderingPipeline::SaveCameraToWorld | ( | const std::string & | fileName | ) |
Saves the Camera to World transform to file.
fileName |
void vtkCalibratedModelRenderingPipeline::SaveModelToWorld | ( | const std::string & | fileName | ) |
Saves the Model to World transform to file.
fileName |
void vtkCalibratedModelRenderingPipeline::SetCameraToWorldMatrix | ( | const vtkMatrix4x4 & | cameraToWorld | ) |
Used to set the camera position in world coordinates.
cameraToWorld | rigid body transform |
void vtkCalibratedModelRenderingPipeline::SetCameraToWorldTransform | ( | const std::vector< float > & | transform | ) |
Sets transform using rx,ry,rz (degrees), tx,ty,rz (mm).
void vtkCalibratedModelRenderingPipeline::SetIsRightHandCamera | ( | const bool & | isRight | ) |
This class can be setup to be a right or left handed camera in a stereo camera pair.
void vtkCalibratedModelRenderingPipeline::SetModelToWorldMatrix | ( | const vtkMatrix4x4 & | modelToWorld | ) |
Multiplies model vtkPolyData points by modelToWorld to give a position in world coordinates, having the effect of moving the model relative to the world coordinates.
modelToWorld | rigid body transform |
void vtkCalibratedModelRenderingPipeline::SetModelToWorldTransform | ( | const std::vector< float > & | transform | ) |
Sets transform using rx,ry,rz (degrees), tx,ty,rz (mm).
void vtkCalibratedModelRenderingPipeline::SetWorldToCameraMatrix | ( | const vtkMatrix4x4 & | worldToCamera | ) |
Used to set the camera position in world coordinates.
worldToCamera | rigid body transform |
void vtkCalibratedModelRenderingPipeline::SetWorldToCameraTransform | ( | const std::vector< float > & | transform | ) |
Sets transform using rx,ry,rz (degrees), tx,ty,rz (mm).