| 56 | IE_CORE_DEFINERUNTIMETYPED( LensDistortOp ); |
| 57 | |
| 58 | LensDistortOp::LensDistortOp() |
| 59 | : WarpOp( |
| 60 | "Distorts an ImagePrimitive using a parametric lens model which is supplied as a .cob file. " |
| 61 | "The resulting image will have the same display window as the original with a different data window." |
| 62 | ), |
| 63 | m_mode( kUndistort ) |
| 64 | { |
| 65 | |
| 66 | IntParameter::PresetsContainer modePresets; |
| 67 | modePresets.push_back( IntParameter::Preset( "Distort", kDistort ) ); |
| 68 | modePresets.push_back( IntParameter::Preset( "Undistort", kUndistort ) ); |
| 69 | |
| 70 | m_modeParameter = new IntParameter( |
| 71 | "mode", |
| 72 | "Whether the distort the image or undistort it. An image with a lens distortion will need to be \"Undistorted\" to make it flat.", |
| 73 | kUndistort, |
| 74 | modePresets |
| 75 | ); |
| 76 | |
| 77 | m_lensParameter = new ObjectParameter( |
| 78 | "lensModel", |
| 79 | "An object parameter that describes the Lens Model to use. The compound parameter must contain a String object name \"lensModel\" that holds the name of the registered model to use.", |
| 80 | new CompoundObject(), |
| 81 | CompoundObjectTypeId |
| 82 | ); |
| 83 | |
| 84 | parameters()->addParameter( m_modeParameter ); |
| 85 | parameters()->addParameter( m_lensParameter ); |
| 86 | |
| 87 | } |
| 88 | |
| 89 | LensDistortOp::~LensDistortOp() |
| 90 | { |