11#include "GUIDialogSheet.h"
20 class CInternalDialogKernel;
35 EKernelType_UserDefined = 0x0000,
41 EKernelType_Predefined = 0x0001,
50 class FL_EXPORT CGUIDialogKernel :
public CGUIDialogSheet
52 DECLARE_DYNAMIC(CGUIDialogKernel)
54 enum class EKernelSettingRow : int32_t
69 CGUIDialogKernel(CWnd* pParent =
nullptr);
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);
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);
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_u8DecimalPlaces;
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_pGridDecimalPlaces;
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 FLArray.h:71
Template type string class.
Definition FLString.h:34
FLImaging module execution result object.
Definition FLImagingBase/ResultsDef.h:1739
CGUIDialogKernel(const CGUIDialogKernel &rhs)
Copy constructor by reference.
virtual uint8_t GetDecimalPlaces() const
Gets the number of decimal places displayed for the coordinates. If set to display up to the second d...
virtual const CResult SetDecimalPlaces(uint8_t u8DecimalPlaces=3)
Sets the number of decimal places displayed for the coordinates. To display up to the second decimal ...
virtual bool AdjustLayout() override
Recalculates and applies the layout of the controls and buttons in the dialog.
virtual BOOL OnInitDialog() override
Initializes the dialog. Called before the dialog is displayed.
virtual ~CGUIDialogKernel()
Default destructor.
Definition FLImagingBase/AESCryptography.h:18
Definition D2DObject.h:12