Cortex  10.0.0-a4
Public Member Functions | Protected Member Functions | Friends | List of all members
IECore::StandardRadialLensModel Class Reference

#include <StandardRadialLensModel.h>

+ Inheritance diagram for IECore::StandardRadialLensModel:

Public Member Functions

 IE_CORE_DECLARERUNTIMETYPED (StandardRadialLensModel, LensModel)
 
void validate () override
 
Imath::V2d distort (Imath::V2d p) override
 
Imath::V2d undistort (Imath::V2d p) override
 
- Public Member Functions inherited from IECore::LensModel
 IE_CORE_DECLARERUNTIMETYPED (LensModel, Parameterised)
 
Imath::Box2i bounds (int mode, const Imath::Box2i &input, int width, int height)
 
- Public Member Functions inherited from IECore::Parameterised
 IE_CORE_DECLARERUNTIMETYPED (Parameterised, RunTimeTyped)
 
 Parameterised (const std::string &description)
 
 Parameterised (const std::string &description, CompoundParameterPtr compoundParameter)
 Another constructor added later on that gives defines the CompoundParameter object to be hold in this Parameterised instance.
 
const std::string & description () const
 Returns a description for this parameterised object.
 
CompoundParameterparameters () override
 
const CompoundParameterparameters () const override
 Returns the parameters for query.
 
CompoundObjectuserData ()
 Returns an object that anyone can use for storing anything.
 
const CompoundObjectuserData () const
 Read only version of the above.
 
- Public Member Functions inherited from IECore::RunTimeTyped
 IE_CORE_DECLAREMEMBERPTR (RunTimeTyped)
 
virtual TypeId typeId () const
 
virtual const char * typeName () const
 
virtual bool isInstanceOf (TypeId typeId) const
 
virtual bool isInstanceOf (const char *typeName) const
 
- Public Member Functions inherited from IECore::RefCounted
 IE_CORE_DECLAREMEMBERPTR (RefCounted)
 
void addRef () const
 Add a reference to the current object.
 
void removeRef () const
 Remove a reference from the current object.
 
RefCount refCount () const
 Returns the current reference count.
 

Protected Member Functions

 StandardRadialLensModel ()
 
- Protected Member Functions inherited from IECore::LensModel
 LensModel ()
 
 ~LensModel () override
 

Friends

class LensModel
 

Additional Inherited Members

- Public Types inherited from IECore::LensModel
enum  { Distort = 0, Undistort = 1 }
 
typedef LensModelPtr(* CreatorFn) (ConstCompoundObjectPtr data)
 
- Public Types inherited from IECore::RunTimeTyped
typedef RefCounted BaseClass
 A typedef for the class this class derives from. All RunTimeTyped classes define this typedef.
 
- Public Types inherited from IECore::RefCounted
typedef size_t RefCount
 
- Static Public Member Functions inherited from IECore::LensModel
static LensModelPtr create (ConstCompoundObjectPtr lensParams)
 
static LensModelPtr create (const std::string &name)
 
static LensModelPtr create (TypeId id)
 
static std::vector< std::string > lensModels ()
 Returns a vector of available lens models.
 
- Static Public Member Functions inherited from IECore::RunTimeTyped
static TypeId staticTypeId ()
 Returns the TypeId for this class, without needing an instance.
 
static const char * staticTypeName ()
 Returns the type name for this class, without needing an instance.
 
static TypeId baseTypeId ()
 
static const char * baseTypeName ()
 
static bool inheritsFrom (TypeId typeId)
 Returns true if this class inherits from the specified type.
 
static bool inheritsFrom (const char *typeName)
 Returns true if this class inherits from the specified type.
 
static bool inheritsFrom (TypeId type, TypeId baseType)
 Returns true if type inherits from baseType.
 
static bool inheritsFrom (const char *typeName, const char *baseTypeName)
 Returns true if typeName inherits from baseTypeName.
 
static TypeId baseTypeId (TypeId typeId)
 Returns the base type of the given type, or InvalidTypeId if no such base exists.
 
static const std::vector< TypeId > & baseTypeIds (TypeId typeId)
 
static const std::set< TypeId > & derivedTypeIds (TypeId typeId)
 
static TypeId typeIdFromTypeName (const char *typeName)
 
static const char * typeNameFromTypeId (TypeId typeId)
 
static void registerType (TypeId derivedTypeId, const char *derivedTypeName, TypeId baseTypeId)
 Allows external modules to register their own type ids.
 
- Public Attributes inherited from IECore::LensModel
enum IECore::LensModel:: { ... }  DistortionMode
 
- Protected Types inherited from IECore::RunTimeTyped
typedef std::map< TypeId, TypeIdBaseTypeRegistryMap
 
typedef std::map< TypeId, std::vector< TypeId > > BaseTypesRegistryMap
 
typedef std::map< TypeId, std::set< TypeId > > DerivedTypesRegistryMap
 
typedef tbb::spin_rw_mutex Mutex
 
typedef std::map< TypeId, std::string > TypeIdsToTypeNamesMap
 
typedef std::map< std::string, TypeIdTypeNamesToTypeIdsMap
 
- Static Protected Member Functions inherited from IECore::RunTimeTyped
static BaseTypeRegistryMap & baseTypeRegistry ()
 
static DerivedTypesRegistryMap & derivedTypesRegistry ()
 
static BaseTypesRegistryMap & completeBaseTypesRegistry ()
 
static DerivedTypesRegistryMap & completeDerivedTypesRegistry ()
 
static void derivedTypeIdsWalk (TypeId typeId, std::set< TypeId > &)
 
static TypeIdsToTypeNamesMap & typeIdsToTypeNames ()
 
static TypeNamesToTypeIdsMap & typeNamesToTypeIds ()
 
- Static Protected Attributes inherited from IECore::RunTimeTyped
static Mutex g_baseTypeIdsMutex
 
static Mutex g_derivedTypeIdsMutex
 

Detailed Description

StandardRadialLensModel An implementation of a 2 degree Anamorphic or 4 degree Radial lens model. This model and it's parameters produce identical results to that of 3DE. It was implemented from a paper that is available on 3DE's website. http://www.3dequalizer.com/user_daten/tech_docs/pdf/distortion.pdf

Further information on this algorithm and others can be found freely at: Lens Distortion Plugin Kit v1.3 by Uwe Sassenberg, Science-D-Visions http://www.3dequalizer.com/index.php#?site=tech_docs&id=110216_01

Constructor & Destructor Documentation

IECore::StandardRadialLensModel::StandardRadialLensModel ( )
protected

The Default Constructor is protected and the LensModel::create() method should be used to instantiate a new LensModel instead.

Member Function Documentation

Imath::V2d IECore::StandardRadialLensModel::distort ( Imath::V2d  p)
overridevirtual

Distorts a point in UV space of the range (0-1) where the lower left corner is 0,0. Should be implemented by derived classes to return the distorted UV coordinate.

Parameters
uvThe undistorted point that will be distorted. Should be a 2D vector in pixel space.

Implements IECore::LensModel.

Imath::V2d IECore::StandardRadialLensModel::undistort ( Imath::V2d  p)
overridevirtual

Undistorts a point in UV space of the range (0-1) where the lower left corner is 0,0. Should be implemented by derived classes to return the undistorted UV coordinate.

Parameters
uvThe distorted point that will be undistorted. Should be a 2D vector in pixel space.

Implements IECore::LensModel.

void IECore::StandardRadialLensModel::validate ( )
overridevirtual

Compute should be called to set up the internal values. This method must be called before subsequent calls to distort(), undistort() and bounds() or their results are undefined.

Implements IECore::LensModel.

Friends And Related Function Documentation

friend class LensModel
friend

The LensModel baseclass needs to be a friend so that the creator can instantiate the default constructor which is protected.


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