NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
niftk::SurfaceReconstruction Class Reference

Takes image data, and calculates a surface reconstruction, and write a point cloud to mitk::DataStorage. More...

Inheritance diagram for niftk::SurfaceReconstruction:
Inheritance graph
[legend]
Collaboration diagram for niftk::SurfaceReconstruction:
Collaboration graph
[legend]

Classes

struct  ParamPacket
 

Public Types

enum  Method { SEQUENTIAL_CPU = 0, PYRAMID_PARALLEL_CPU = 1, PYRAMID_PARALLEL_CUDA }
 
enum  OutputType { MITK_POINT_CLOUD = 1, PCL_POINT_CLOUD = 2, DISPARITY_IMAGE = 3 }
 

Public Member Functions

 mitkClassMacroItkParent (SurfaceReconstruction, itk::Object) static Pointer New()
 
mitk::BaseData::Pointer Run (const mitk::Image::Pointer image1, const mitk::Image::Pointer image2, Method method, OutputType outputtype, const mitk::DataNode::Pointer camnode, float maxTriangulationError, float minDepth, float maxDepth, bool bakeCameraTransform)
 
mitk::BaseData::Pointer Run (ParamPacket params)
 

Static Public Member Functions

static bool GetMethodDetails (int index, Method *id, std::string *friendlyname)
 
static Method ParseMethodName (const std::string &friendlyname)
 

Protected Member Functions

 SurfaceReconstruction ()
 
virtual ~SurfaceReconstruction ()
 
 SurfaceReconstruction (const SurfaceReconstruction &)
 
SurfaceReconstructionoperator= (const SurfaceReconstruction &)
 

Detailed Description

Takes image data, and calculates a surface reconstruction, and write a point cloud to mitk::DataStorage.

Member Enumeration Documentation

Enumerator
SEQUENTIAL_CPU 
PYRAMID_PARALLEL_CPU 
PYRAMID_PARALLEL_CUDA 
Enumerator
MITK_POINT_CLOUD 
PCL_POINT_CLOUD 
DISPARITY_IMAGE 

Constructor & Destructor Documentation

niftk::SurfaceReconstruction::SurfaceReconstruction ( )
protected
niftk::SurfaceReconstruction::~SurfaceReconstruction ( )
protectedvirtual
niftk::SurfaceReconstruction::SurfaceReconstruction ( const SurfaceReconstruction )
protected

Member Function Documentation

bool niftk::SurfaceReconstruction::GetMethodDetails ( int  index,
Method id,
std::string friendlyname 
)
static

Returns some details of a available reconstruction methods. You should loop from zero in parameter index until it returns false. Stuff the returned friendlyname into a GUI combobox, and when the user chooses a method, read it back from the combobox and pass it into ParseMethodName() to retrieve the ID that can be passed into Run().

niftk::SurfaceReconstruction::mitkClassMacroItkParent ( SurfaceReconstruction  ,
itk::Object   
)
SurfaceReconstruction& niftk::SurfaceReconstruction::operator= ( const SurfaceReconstruction )
protected
SurfaceReconstruction::Method niftk::SurfaceReconstruction::ParseMethodName ( const std::string friendlyname)
static

Will throw an exception of the name is not recognised.

mitk::BaseData::Pointer niftk::SurfaceReconstruction::Run ( const mitk::Image::Pointer  image1,
const mitk::Image::Pointer  image2,
Method  method,
OutputType  outputtype,
const mitk::DataNode::Pointer  camnode,
float  maxTriangulationError,
float  minDepth,
float  maxDepth,
bool  bakeCameraTransform 
)
Warning
niftk::Undistortion::s_StereoRigTransformationPropertyName is taken from either image1 or image2 but it is interpreted as coming from image2! This is a bug, I think.
Exceptions
std::logic_errorif method is not implemented (beware: just because a method ID exists in the Method enum doesn't mean it's actually implemented! you need to loop through GetMethodDetails().)
std::runtime_errorif the dimensions of image1 and image2 are not the same.
std::runtime_errorif outputtype is POINT_CLOUD and either image lacks property niftk::Undistortion::s_CameraCalibrationPropertyName.
std::runtime_errorif property niftk::Undistortion::s_CameraCalibrationPropertyName is not of type mitk::CameraIntrinsicsProperty
std::runtime_errorif property niftk::Undistortion::s_StereoRigTransformationPropertyName is not of type niftk::MatrixProperty
std::runtime_errorif MITK image accessors fail.
mitk::BaseData::Pointer niftk::SurfaceReconstruction::Run ( ParamPacket  params)

The documentation for this class was generated from the following files: