Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
sf::ipj::LineScanMethod Class Referencefinal

Implementation of a scan method moving in a straight line. More...

#include <LineScanMethod.h>

Inheritance diagram for sf::ipj::LineScanMethod:
Collaboration diagram for sf::ipj::LineScanMethod:

Public Member Functions

 LineScanMethod (const Parameters &)
 Class factory constructor type.
 
 ~LineScanMethod () override
 Virtual overridden destructor.
 
void StateChange (EState prev, EState cur) override
 Overridden from base class.
 
bool Initialize () override
 Overridden from base class.
 
void AddPropertyPages (PropertySheetDialog *sheet) override
 Overridden from base class.
 
bool HandleCommand (ECommand cmd) override
 Overridden from base class.
 
bool createViewer () override
 Overridden from base class.
 
void Read (IniProfile *inifile) override
 Overridden from base class.
 
void Write (IniProfile *inifile) override
 Overridden from base class.
 
bool GetIndexVel (gmi::AxesCoord &vel, int index) override
 Overridden from base class.
 
bool GetSurface (Matrix44 &surface, int index, double frac) override
 Overridden from base class.
 
bool SetAcqParams (int index, double frac) override
 Overridden from base class.
 
virtual bool Sustain (clock_t)
 Overridden from base class.
 
bool GetGenericInfoList (StringList &) override
 Overridden from base class.
 
bool GetTriggerValue (gmi::AxisValue &value) override
 Overridden from base class.
 
gmi::EAxisLocation GetScanAxis () override
 Overridden from base class.
 
void handleVariableEvent (Variable::EEvent event, const Variable &caller, Variable &link, bool same_inst) override
 Overridden abstract event handler for local variables.
 
std::ostream & cout () override
 Get the output stream which is attached the log listing in the viewer.
 
void HandleCursorEvent (bool btn_down, Qt::KeyboardModifiers shift, int index, double frac) override
 Overridden from base class.
 
LineScanMethodViewergetLineViewer ()
 Gets the pointer to the viewer of this instance.
 
- Public Member Functions inherited from sf::ipj::ToolBaseScanMethod
bool InitializeBase ()
 Reads the tool and element information and returns true on succes.
 
bool GetGenericInfoList (StringList &) override
 Overridden from base class.
 
const ElementInformationGetElement () const
 Gets the element information.
 
const ToolInformationGetTool () const
 Gets the tool information.
 
bool ConvertPosition (gmi::AxesCoord &dest, const gmi::AxesCoord &src, bool to_focus) const override
 Overridden from base class.
 
bool GetIndexPos (gmi::AxesCoord &pos, int index, double frac, bool perp) override
 Overridden from base class.
 
bool GetFocusPos (gmi::AxesCoord &dest, int index, double frac) override
 Overridden from base class.
 
bool GetMeasureOffset (Vector3D &vector, int index, double frac, bool perp) override
 Overridden from base class.
 
void Read (IniProfile *inifile) override
 Overridden from base class.
 
void Write (IniProfile *inifile) override
 Overridden from base class.
 
std::string GetParamSection () const
 Gets the parameter section name.
 
void AddVar (Variable *var)
 Adds the given variable to the list.
 
Variable::PtrVectorGetVars ()
 Gets the variable list reference.
 
void AddPropertyPages (PropertySheetDialog *sheet) override
 Overridden from base class.
 
bool GetSurfaceWithAngles (Matrix44 &angle, int index, double frac)
 Gets the combined surface matrix with applied angles. calls the overridden method GetSurface().
 
Value GetInterfacePosition () const
 Gets the interface position where it should be.
 
bool SetAscanAndGates (double distance=-1.0)
 Apply UT settings for the passed material distance. When negative use the depth variable value.
 
void ExportVariables (bool exported)
 Export or revokes exported variables in the variable list.
 
QString GetAnimationPath (const QString &filename) const
 Gets the animation file path of the given filename.
 
- Public Member Functions inherited from sf::ScanMethod
 ScanMethod (const Parameters &)
 Constructor for passing general structure for derived classes create by the class factory.
 
 ~ScanMethod () override
 Virtual destructor for derived classes.
 
void SetAreaName (const QString &name)
 Changes the area name so it is saved by the project under this new name.
 
QString GetAreaName () const
 Gets the area name of the scan entry.
 
bool DoInitialize ()
 Initializes the class after the constructor is called. Final virtual functions are only valid after full construction of a scan method. This function actually calls virtual function Initialize.
 
virtual void DestroyViewer ()
 Called before a scan method is deleted.
 
bool Execute (ECommand cmd)
 Calls HandleCommand() after several checks.
 
ECommand GetCommand ()
 Gets the last Issued command.
 
void DoAddPropertyPages (PropertySheetDialog *sheet)
 Calls AddPropertyPages if the state allows it.
 
void SetIndexFracRange (double start, double stop)
 Sets the new scan range for defined surface.
 
int GetIndexCount () const
 Gets the amount of indices in the scan method.
 
int GetIndexStart () const
 Gets the clipped start value of the set range.
 
int GetIndexStop () const
 Gets the clipped stop value of the set range.
 
int GetScanListIndex () const
 Returns the scan list index of this instance in the project.
 
bool Reinitialize ()
 When the state is ready the scan method can be reinitialize. After changes are made to the settings for example.
 
void DoRead (IniEnvelope ini)
 Reads the settings of the scan method. Calls eventually the overridden Read() method.
 
void DoWrite (IniEnvelope ini)
 Writes the settings of the scan method. Calls eventually the overridden Write() method.
 
void LoadSystemSettings (const QString &settings={})
 Loads the system setting associated with the scan method overriding the settings from the selected calibration set.
 
bool SaveSystemSettings (const QString &settings)
 Saves the system setting associated with the scan method.
 
bool IsActivated () const
 Check if the scan method was activated.
 
bool DoSustain (const timespec &)
 Called by the inspection project to enable the derived class to do some background processing.
 
bool DoCreateFrame ()
 Creates a scan method UI frame if possible. Calls the overridden #CreateFrame() method.
 
bool DoConvertPosition (gmi::AxesCoord &dest, const gmi::AxesCoord &src, bool to_focus) const
 Converts a physical position to or from a focus position using the scan's configuration. Actually calls the overridden ConvertPosition() method.
 
bool DoGetIndexPos (gmi::AxesCoord &pos, int index, double frac, bool perp) const
 Gets the axes position calculated by the derived scan mode. Actually calls the overridden GetIndexPos() method.
 
bool DoGetFocusPos (gmi::AxesCoord &dest, int index, double frac) const
 Gets the focus position calculated by the derived scan mode. Actually calls the overridden GetFocusPos() method.
 
bool DoGetIndexVel (gmi::AxesCoord &dest, int index) const
 Gets the velocity calculated by the derived scan mode.
 
bool DoGetMeasureOffset (Vector3D &vector, int index, double frac, bool perp) const
 Gets the vector caused by changing measurement offsets. This means the offset caused by the A-scan delay change.
 
bool DoSetAcqParams (int index, double frac)
 Calls the overridden SetAcqParams() method on the derived class.
 
bool DoGetTriggerValue (gmi::AxisValue &value) const
 Gets the axis used for triggering measurements or when the axis location is #sf::EAxisLocation::alNA the internal generation is to be used. Calls the overridden GetTriggerValue() method.
 
gmi::EAxisLocation DoGetScanAxis () const
 Gets the scan and index axis for position calculations. Calls the overridden GetScanAxis() method.
 
bool GetScanStart (gmi::AxesCoord &ac) const
 Gets the position coordinate where the project passes control to the scan method.
 
bool GetScanStop (gmi::AxesCoord &ac) const
 Gets the position where the scan method passes control to the project.
 
const gmi::AxesCoordGetScanVelocity () const
 Gets the velocity for the scan method to move. Actually calls the scan binder method sf::ScanBinder::GetVelocity().
 
const gmi::AxesCoordGetScanAcceleration () const
 Gets the acceleration for the scan method to move. Actually calls the scan binder method sf::ScanBinder::GetVelocity().
 
const ScanBinder::InfoBaseGetScanInfo () const
 Gets the binder information of this scan method instance. Actually calls #sf::ScanBinder::GetScanInfo().
 
const Vector3D & GetScanOffset () const
 Gets the offset of the part to its programmed position.
 
Vector3D GetOffset () const
 Gets the total offsets added.
 
const VariableGetMediumVelocity () const
 Gets the medium sound velocity system variable.
 
const VariableGetMaterialVelocity () const
 Gets the material sound velocity system variable.
 
bool GetRefractionAngle (double &dest, double src, bool to_medium=true)
 Gets the refracted angle.
 
TDataFilterLinks & GetFilterLinks ()
 Gets the analysis filter links.
 
bool ExecuteFilters (TDataFilterEntry::EAction action=TDataFilterEntry::feaSTART)
 Execute the referenced filters.
 
const std::vector< int > & GetUsedDevices () const
 Gets the acquisition devices used.
 
bool IsCalibReady ()
 Checks if the calibration is complete.
 
void SetAcqState (InformationServer::EState sel_state, InformationServer::EState unsel_state=InformationServer::issOff)
 Sets the state on all acquisition devices.
 
EState GetState () const
 Gets the state of the instance.
 
ProjectDataGetProjectData ()
 Gets the project this instance is part of.
 
const std::string & GetMethodName () const
 Gets this methods name.
 
QString GetDirectiveText () const
 Gets the directive text.
 
bool GetDirectiveEnabled () const
 Gets the flag weather the directive is enabled.
 
ESystemPosition GetDirectivePosition ()
 ??
 
QString GetElementName ()
 Gets the element name.
 
QString GetToolName ()
 Gets the tool name.
 
QString GetMaterialName ()
 Gets the material name.
 
QString GetSettingsName () const
 Gets the settings name.
 
std::string GetNamePrefix () const
 Gets the name prefix.
 
ECalibrationType GetCalibrationType ()
 Gets the calibration type name.
 
QString GetCalibrationSetName () const
 Gets the calibration set name.
 
InformationTypes::IdVectorGetCalibrationIds ()
 Gets the calibration ids.
 
std::string GetFilterConfigs ()
 Gets the comma separated string of filter configuration names.
 
Variable::PtrVectorGetLocalVars ()
 Gets the local variables in a pointer vector.
 
QWidget * getViewer ()
 Called by a derived class to get its UI widget pointer.
 
- Public Member Functions inherited from sf::ProjectScriptObject
 ProjectScriptObject (const char *type_name)
 Constructor.
 
 ~ProjectScriptObject () override
 Virtual overridden destructor.
 
void AddScriptParam (const std::string &name, Variable *variable)
 Adds the passed variable as a parameter in the script.
 
- Public Member Functions inherited from sf::ScriptObject
 ScriptObject (const char *type_name, ScriptObject *parent=nullptr)
 
virtual ~ScriptObject ()=default
 Virtual destructor which can be overridden to clean up objects.
 
virtual std::string getStatusText ()
 Gets the status text of this object for debugging purposes.
 
int getRefCount () const
 Gets the reference count.
 
 operator Value () const
 Cast operator to be able to return this instance as a Value.
 
std::string getTypeName () const
 Returns the type name Set at the constructor.
 
ScriptObjectgetParent ()
 Gets the script object owner.
 
const ScriptObjectgetParent () const
 Gets the script object owner.
 
ScriptObjectcastToObject (const Value &value)
 Casts a sf::Value::vitCustom typed sf::Value to a ScriptObject typed pointer.
 

Public Attributes

Vector3D _originVector
 
Vector3D _stepVector
 
Vector3D _scanVector
 
LocalVariable _vScanLength
 
LocalVariable _vScanVelocity
 
LocalVariable _vScanAxis
 
LocalVariable _vScanDensity
 
LocalVariable _vIndexCount
 
LocalVariable _vIndexDensity
 
LocalVariable _vBackSide
 
LocalVariable _vSurfaceRotate
 
ECommand _command
 Holds the current command being executed.
 
IntervalTimer _debugDelayTimer
 Timer for debugging.
 
int _lastScanIndex
 Last requested surface index.
 
double _lastScanFrac
 Last requested surface fraction.
 

Friends

class LineScanMethodViewer
 

Additional Inherited Members

- Public Types inherited from sf::ScanMethod
enum  EDefaultParamIndex {
  dpiINDEXCOUNT = 0 , dpiINDEXDENS = 1 , dpiSCANDENS = 2 , dpiSCANLEN = 3 ,
  dpiDENSMODE = 4 , dpiANGLE_A = 5 , dpiANGLE_B = 6 , dpiSURFACEANGLE_A = 7 ,
  dpiSURFACEANGLE_B = 8 , dpiGATEMODE = 10 , dpiDEPTH = 23 , dpiDEPTHFACTOR = 24 ,
  dpiLAST = 0x100
}
 Default parameter ID indices for derived scan methods. More...
 
enum  ECommand : int {
  smcINIT , smcACTIVATE , smcDEACTIVATE , smcCHECK ,
  smcSCAN , smcEVALUATE , smcSTOP , smcOFFSETCHANGE
}
 Available commands. More...
 
enum  EState {
  smsCFGERR = -2 , smsERROR = -1 , smsNOINIT = 0 , smsREADY ,
  smsACTIVE , smsCHECKING , smsSCANNING , smsEVALUATING ,
  smsLASTENTRY
}
 States of operation. More...
 
- Public Types inherited from sf::ScriptObject
enum  EIdentifier {
  idUnknown = 0 , idConstant , idVariable , idFunction ,
  idTypedef , idKeyword
}
 Keyword identifiers. More...
 
typedef std::string::size_type pos_type
 Source position type.
 
typedef ssize_t ip_type
 Instruction pointer type.
 
- Static Public Member Functions inherited from sf::ScanMethod
static const char * GetStateName (EState)
 Gets the state name of the given state value.
 
static const char * GetCommandName (ECommand)
 Gets the command name of the given command value.
 
- Static Public Member Functions inherited from sf::ScriptObject
static const IdInfogetInfoUnknown ()
 Returns the static Info structure for unknowns.
 
- Protected Member Functions inherited from sf::ipj::ToolBaseScanMethod
 ToolBaseScanMethod (const Parameters &)
 Constructor.
 
 ~ToolBaseScanMethod () override
 Destructor.
 
- Protected Member Functions inherited from sf::ScanMethod
ConfigStoreGetSaveState ()
 Gets the config store for saving and restoring the state of a frame. It is probably in the projects ini-profile.
 
const IdInfogetInfo (const std::string &name) const override
 Overridden from base class sf::ProjectScriptObject.
 
bool getSetValue (const IdInfo *info, Value *value, Value::vector_type *params, bool flag_set) override
 Overridden from base class sf::ProjectScriptObject.
 
virtual ScriptLinkGetScriptLink ()
 Gets the script link when one is associated. Can be overridden by a derived class.
 
virtual bool Sustain (const timespec &ts)
 Can be overridden to do background processing.
 
bool FilterHandler (TDataFilterLink *, EFilterNotifyCode fnc)
 Event handler for filter events which are passed to the scan method script.
 
bool UpdatePositionsData ()
 Refills the positions result.
 
bool SetState (EState state)
 Sets the state.
 
void setViewer (QWidget *viewer)
 Called by a derived class to set its frame pointer.
 
gmi::ControllerGetController ()
 Gets the allocated controller.
 
bool ClipTriggerValue (gmi::AxisValue &trigger_value)
 Clips a trigger value to a value which is allowed by the controller. Is to be used by property pages to fill in the correct values.
 
void SetIndexCount (int idx_count)
 A derived classes uses this function to set the index count for the scan method initialization.
 
InformationTypes::id_type GetIdOffset ()
 Gets Offset used to create the local ID's with for exporting.
 
- Protected Member Functions inherited from sf::ProjectScriptObject
void destroyObject (bool &should_delete) override
 Overridden from base class.
 
- Protected Member Functions inherited from sf::ScriptObject
void makeParent (ScriptObject *so)
 Makes this object the owner of the other object.
 
void setParent (ScriptObject *parent)
 Sets the owner to the pass script object.
 
- Protected Attributes inherited from sf::ipj::ToolBaseScanMethod
LocalVariable VGateMode
 Determines the way the gates are positioned.
 
LocalVariable VAngleCalculation
 Determines the way the given angles are used in the calculations.
 
LocalVariable VSurfaceAngleA
 Material angle A from the surface normal.
 
LocalVariable VSurfaceAngleB
 Material angle B from the surface normal.
 
LocalVariable VMaterialAngleA
 Material angle A from the surface normal in the material.
 
LocalVariable VMaterialAngleB
 Material angle B from the surface normal in the material.
 
Variable VAscanDelay
 Linked A-scan position delay variable.
 
Variable VAscanRange
 Linked A-scan position range variable.
 
Variable VIfDelay
 Linked Gate position delay variable.
 
Variable VIfRange
 Linked Gate position range variable.
 
Variable VGate1Slaved
 Linked Gate 1 slaved variable.
 
Variable VGate1Delay
 Linked Gate 1 delay variable.
 
Variable VGate1Range
 Linked Gate 1 range variable.
 
Variable VGate2Slaved
 Linked Gate 2 slaved variable.
 
Variable VGate2Delay
 Linked Gate 2 delay variable.
 
Variable VGate2Range
 Linked Gate 2 range variable.
 
LocalVariable VDepthMax
 Holds the depth of the measurement. This is the length in meters from the surface to the end of the signal gate.
 
LocalVariable VDepthOffset
 Holds the offset which is subtracted from the retrieved depth.
 
LocalVariable VDepthFactor
 Holds the depth correction factor for when angles are used.
 
LocalVariable VDepth
 Holds the actual depth after calculation.
 
bool FControlAscan
 Holds the flag telling the A-scan is controlled by the scan method.
 
TVariableHandler< ToolBaseScanMethod_variableHandler
 Handle allowing linkage of the $handleVariableEvent() virtual method.
 

Detailed Description

Implementation of a scan method moving in a straight line.

Constructor & Destructor Documentation

◆ LineScanMethod()

sf::ipj::LineScanMethod::LineScanMethod ( const Parameters )
explicit

Class factory constructor type.

◆ ~LineScanMethod()

sf::ipj::LineScanMethod::~LineScanMethod ( )
override

Virtual overridden destructor.

Member Function Documentation

◆ AddPropertyPages()

void sf::ipj::LineScanMethod::AddPropertyPages ( PropertySheetDialog sheet)
overridevirtual

Overridden from base class.

Reimplemented from sf::ScanMethod.

◆ cout()

std::ostream & sf::ipj::LineScanMethod::cout ( )
overridevirtual

Get the output stream which is attached the log listing in the viewer.

Returns
Incase the viewer is not there yet std::cout is returned.

Reimplemented from sf::ScanMethod.

◆ createViewer()

bool sf::ipj::LineScanMethod::createViewer ( )
overridevirtual

Overridden from base class.

Reimplemented from sf::ScanMethod.

◆ GetGenericInfoList()

bool sf::ipj::LineScanMethod::GetGenericInfoList ( StringList )
overridevirtual

Overridden from base class.

Implements sf::ScanMethod.

◆ GetIndexVel()

bool sf::ipj::LineScanMethod::GetIndexVel ( gmi::AxesCoord vel,
int  index 
)
overridevirtual

Overridden from base class.

Implements sf::ScanMethod.

◆ getLineViewer()

LineScanMethodViewer * sf::ipj::LineScanMethod::getLineViewer ( )

Gets the pointer to the viewer of this instance.

◆ GetScanAxis()

gmi::EAxisLocation sf::ipj::LineScanMethod::GetScanAxis ( )
overridevirtual

Overridden from base class.

Implements sf::ScanMethod.

◆ GetSurface()

bool sf::ipj::LineScanMethod::GetSurface ( Matrix44 &  surface,
int  index,
double  frac 
)
overridevirtual

Overridden from base class.

Implements sf::ipj::ToolBaseScanMethod.

◆ GetTriggerValue()

bool sf::ipj::LineScanMethod::GetTriggerValue ( gmi::AxisValue value)
overridevirtual

Overridden from base class.

Implements sf::ScanMethod.

◆ HandleCommand()

bool sf::ipj::LineScanMethod::HandleCommand ( ECommand  cmd)
overridevirtual

Overridden from base class.

Implements sf::ScanMethod.

◆ HandleCursorEvent()

void sf::ipj::LineScanMethod::HandleCursorEvent ( bool  btn_down,
Qt::KeyboardModifiers  shift,
int  index,
double  frac 
)
overridevirtual

Overridden from base class.

Reimplemented from sf::ScanMethod.

◆ handleVariableEvent()

void sf::ipj::LineScanMethod::handleVariableEvent ( Variable::EEvent  event,
const Variable caller,
Variable link,
bool  same_inst 
)
overridevirtual

Overridden abstract event handler for local variables.

Implements sf::ipj::ToolBaseScanMethod.

◆ Initialize()

bool sf::ipj::LineScanMethod::Initialize ( )
overridevirtual

Overridden from base class.

Implements sf::ScanMethod.

◆ Read()

void sf::ipj::LineScanMethod::Read ( IniProfile inifile)
overridevirtual

Overridden from base class.

Implements sf::ScanMethod.

◆ SetAcqParams()

bool sf::ipj::LineScanMethod::SetAcqParams ( int  index,
double  frac 
)
overridevirtual

Overridden from base class.

Implements sf::ScanMethod.

◆ StateChange()

void sf::ipj::LineScanMethod::StateChange ( EState  prev,
EState  cur 
)
overridevirtual

Overridden from base class.

Implements sf::ScanMethod.

◆ Sustain()

virtual bool sf::ipj::LineScanMethod::Sustain ( clock_t  )
virtual

Overridden from base class.

◆ Write()

void sf::ipj::LineScanMethod::Write ( IniProfile inifile)
overridevirtual

Overridden from base class.

Implements sf::ScanMethod.

Friends And Related Symbol Documentation

◆ LineScanMethodViewer

friend class LineScanMethodViewer
friend

Member Data Documentation

◆ _command

ECommand sf::ipj::LineScanMethod::_command

Holds the current command being executed.

◆ _debugDelayTimer

IntervalTimer sf::ipj::LineScanMethod::_debugDelayTimer

Timer for debugging.

◆ _lastScanFrac

double sf::ipj::LineScanMethod::_lastScanFrac

Last requested surface fraction.

◆ _lastScanIndex

int sf::ipj::LineScanMethod::_lastScanIndex

Last requested surface index.

◆ _originVector

Vector3D sf::ipj::LineScanMethod::_originVector

◆ _scanVector

Vector3D sf::ipj::LineScanMethod::_scanVector

◆ _stepVector

Vector3D sf::ipj::LineScanMethod::_stepVector

◆ _vBackSide

LocalVariable sf::ipj::LineScanMethod::_vBackSide

◆ _vIndexCount

LocalVariable sf::ipj::LineScanMethod::_vIndexCount

◆ _vIndexDensity

LocalVariable sf::ipj::LineScanMethod::_vIndexDensity

◆ _vScanAxis

LocalVariable sf::ipj::LineScanMethod::_vScanAxis

◆ _vScanDensity

LocalVariable sf::ipj::LineScanMethod::_vScanDensity

◆ _vScanLength

LocalVariable sf::ipj::LineScanMethod::_vScanLength

◆ _vScanVelocity

LocalVariable sf::ipj::LineScanMethod::_vScanVelocity

◆ _vSurfaceRotate

LocalVariable sf::ipj::LineScanMethod::_vSurfaceRotate

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