ImFusion SDK 4.3
InteractiveCroppingBox Class Reference
+ Inheritance diagram for InteractiveCroppingBox:

Classes

struct  CropBox
 Helper struct for storing the size and center of the box in pixel coordinates. More...
 
struct  CropOffsets
 Helper struct for storing the offsets of the lower and upper corner points of the box. More...
 

Public Member Functions

 InteractiveCroppingBox (const SharedImage &image, const vec3i &lower, const vec3i &upper)
 Initialize the Cropping for the given image with the given lower and upper crop offsets.
 
void reset ()
 Clear the existing size parameters and prepare the manipulator for drawing a new box.
 
void update (const SharedImage &image)
 Update the InteractiveCroppingBox based on the orientation of the image and the current cropping box.
 
void update (const SharedImage &image, const vec3i &lower, const vec3i &upper)
 Update the InteractiveCroppingBox based on the given cropping offsets and state of the image, including its orientation.
 
CropOffsets cropOffsets (const SharedImage &img) const
 Calculate the corner points for given image given the current box's center and size.
 
double outlineWidth () const
 Returns the width of the outline rendered in MPR views in px.
 
void setOutlineWidth (double value)
 Sets the width of the outline rendered in MPR views in px.
 
- Public Member Functions inherited from TypedViewObject< GlBox, GUI::BoxAnnotationEventHandler >
 TypedViewObject (std::unique_ptr< GlBox > glObject, std::unique_ptr< GUI::BoxAnnotationEventHandler > eventHandler=nullptr)
 
const GlBoxglObject () const
 Get the underlying typed GlObject.
 
GlBoxglObject ()
 
const GUI::BoxAnnotationEventHandlereventHandler () const
 Get the optionally attached EventHandler.
 
GUI::BoxAnnotationEventHandlereventHandler ()
 
EventResult handleInputEvent (const InputEvent &event, const View &view) override
 Gets called by the parent view in order to handle user input events.
 
- Public Member Functions inherited from ViewObject
 ViewObject (std::unique_ptr< GlObject > glObject)
 Instantiate a new ViewObject taking ownership of the underlying GlObject which must not be null.
 
const GlObjectglObject () const
 Get the underlying abstract GlObject.
 
GlObjectglObject ()
 
const GlObjectgl () const
 Original API methods for the underlying abstract GlObject.
 
GlObjectgl ()
 

Static Public Member Functions

static bool imageCanBeCropped (const SharedImage &image)
 Whether or not cropping will work for the given image.
 
static CropBox cropBox (const CropOffsets &offsets, const vec3i &dim)
 Calculate size and center of the box from its upper and lower border sizes and the image size.
 
static CropOffsets cropOffsets (const CropBox &box, const vec3i &dim)
 Calculate upper and lower border sizes of the box from its size and center and the image size.
 

Public Attributes

Signal boxChanged
 Emitted every time the center or size changes.
 

Additional Inherited Members

- Protected Attributes inherited from TypedViewObject< GlBox, GUI::BoxAnnotationEventHandler >
std::unique_ptr< GUI::BoxAnnotationEventHandlerm_eventHandler
 
- Protected Attributes inherited from ViewObject
std::unique_ptr< GlObjectm_glObject
 

Member Function Documentation

◆ imageCanBeCropped()

static bool imageCanBeCropped ( const SharedImage & image)
static

Whether or not cropping will work for the given image.

Cropping is currently not supported for images with non-rigid transformations, including shearing and scaling.


The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close