11#include "GUIDialogSheet.h"
20 class CInternalDialogKernel;
35 EKernelType_UserDefined = 0x0000,
41 EKernelType_Predefined = 0x0001,
54 enum class EKernelSettingRow : int32_t
87 CGUIDialogKernel(int32_t i32KernelWidth, int32_t i32KernelHeight, CWnd* pParent =
nullptr);
106 static CGUIDialogKernel* CreateModelessDialog(EKernelType eKernelType, int32_t i32KernelWidth, int32_t i32KernelHeight);
118 virtual const CResult SetGUIKernelPreviewRange(int32_t i32StartPosX, int32_t i32StartPosY, int32_t i32Width, int32_t i32Height);
125 virtual int32_t GetImageChannel()
const;
134 virtual const CResult SetImageChannel(int32_t i32ImageChannel);
144 virtual const CResult SetKernelSize(int32_t i32KernelWidth, int32_t i32KernelHeight);
151 virtual int32_t GetKernelWidth()
const;
160 virtual const CResult SetKernelWidth(int32_t i32KernelWidth);
167 virtual int32_t GetKernelHeight()
const;
176 virtual const CResult SetKernelHeight(int32_t i32KernelHeight);
185 virtual const CResult SetDefaultKernelFillValue(
double f64DefaultKernelValue);
308 virtual const CResult SetKernelValue(int32_t i32SelectedChannel, int32_t i32Row, int32_t i32Col,
const double& f64Value);
320 virtual const CResult SetKernelValue(int32_t i32SelectedChannel, int32_t i32Row, int32_t i32Col,
const float& f32Value);
330 virtual double GetKernelValue(int32_t i32SelectedChannel, int32_t i32Row, int32_t i32Col);
337 virtual bool IsSameKernelOnEachChannel()
const;
344 virtual void SetSameKernelOnEachChannel(
bool bSameKernelOnEachChannel);
352 virtual EKernelType GetKernelType()
const;
360 virtual void SetKernelType(EKernelType eKernelType);
367 virtual BOOL OnInitDialog()
override;
377 virtual const CResult Load(
const wchar_t* pWcsFileNameWithPath);
387 virtual const CResult Save(
const wchar_t* pWcsFileNameWithPath);
441 DeclareGetClassType();
445 virtual BOOL PreTranslateMessage(MSG* pMsg)
override;
446 virtual void OnOK()
override;
447 virtual void OnCancel()
override;
448 virtual const CResult AddPresetLayout();
450 virtual const CResult ConvertKernelArrayToString(
454 virtual const CResult ConvertKernelArrayToString(
458 virtual const CResult ConvertStringToKernelArray(
460 int32_t& i32ImageChannelOut, int32_t& i32KernelWidthOut, int32_t& i32KernelHeightOut,
463 virtual const CResult ConvertStringToKernelArray(
465 int32_t& i32ImageChannelOut, int32_t& i32KernelWidthOut, int32_t& i32KernelHeightOut,
468 virtual const CResult InternalSetKernel(int32_t i32SelectedChannel,
470 virtual const CResult InternalSetKernel(int32_t i32SelectedChannel,
472 virtual const CResult InternalSetKernel(
474 virtual const CResult InternalSetKernel(
476 virtual const CResult InternalSetKernelValue(int32_t i32SelectedChannel, int32_t i32Row, int32_t i32Col,
const double& f64Value);
477 virtual const CResult InternalSetKernelValue(int32_t i32SelectedChannel, int32_t i32Row, int32_t i32Col,
const float& f32Value);
479 virtual const CResult InternalSetImageChannel(int32_t i32ImageChannel);
480 virtual const CResult InternalSetKernelSize(int32_t i32KernelWidth, int32_t i32KernelHeight);
481 virtual const CResult InternalSetKernelWidth(int32_t i32KernelWidth);
482 virtual const CResult InternalSetKernelHeight(int32_t i32KernelHeight);
483 virtual const CResult InternalSetSameKernelOnEachChannel(
bool bSameKernelOnEachChannel);
485 virtual bool IsKernelArrayInitialized();
486 virtual bool InitKernelArray();
487 virtual bool FillKernelArray();
488 virtual bool FillDialogKernelTable(int32_t i32SelectedChannel);
490 virtual bool SetImageChannelOnDialog(int32_t i32ImageChannel);
491 virtual bool SetKernelWidthOnDialog(int32_t i32KernelWidth);
492 virtual bool SetKernelHeightOnDialog(int32_t i32KernelHeight);
493 virtual bool SetSelectedChannelOnDialog(int32_t i32SelectedChannel);
494 virtual bool SetCheckBoxSameKernelOnEachChannelOnDialog(BOOL bCheck);
496 virtual bool OnKernelSizeChanged();
497 virtual bool OnImageChannelChanged(int32_t i32ImageChannel);
498 virtual bool OnChannelSelected(int32_t i32SelectedChannel);
499 virtual bool OnCheckBoxSameKernelClicked(BOOL bCheck);
505 virtual bool CalcLayoutSizeOfKernelValue(int32_t& i32Width, int32_t& i32Height, int32_t i32MinWidth = 576, int32_t i32MinHeight = 287);
506 virtual bool AdjustLayout()
override;
508 DECLARE_MESSAGE_MAP()
509 LRESULT OnLoadButtonClicked(WPARAM wParam, LPARAM lParam);
510 LRESULT OnSaveButtonClicked(WPARAM wParam, LPARAM lParam);
511 afx_msg
void OnSize(UINT nType,
int cx,
int cy);
512 afx_msg
void OnEndSheetInPlaceEdit(NMHDR* pNMHDR, LRESULT* pResult);
515 int32_t m_i32ImageChannel;
516 int32_t m_i32KernelWidth;
517 int32_t m_i32KernelHeight;
518 uint8_t m_u8DecimalPlace;
520 Base::CFLString<
wchar_t> m_strFormatStringFloat;
522 double m_f64DefaultKernelFillValue;
524 bool m_bKernelArrayInitialized;
525 bool m_bSameKernelOnEachChannel;
527 EKernelType m_eKernelType;
529 CGUIGridLayout* m_pGridKernelIO;
530 CGUIGridLayout* m_pGridDecimalPlace;
531 CGUIGridLayout* m_pGridKernelSetting;
532 CGUIGridLayout* m_pGridKernel;
534 Base::CFLArray< Base::CFLArray< Base::CFLArray<
double> > > m_flaKernel;
536 CInternalDialogKernel* m_pInternal;
537 friend class CInternalDialogKernel;
Template type array class.
Definition RangeTree.h:19
Template type string class.
Definition INIUtilities.h:20
FLImaging module execution result object.
Definition ResultsDef.h:1514
Definition GUIDialogKernel.h:51
virtual const CResult SetDecimalPlace(uint8_t u8DecimalPlace=3)
Sets the number of decimal places displayed for the coordinates. To display up to the second decimal ...
CGUIDialogKernel(const CGUIDialogKernel &rhs)
Copy constructor by reference.
virtual uint8_t GetDecimalPlace() const
Gets the number of decimal places displayed for the coordinates. If set to display up to the second d...
virtual ~CGUIDialogKernel()
Default destructor.