3#if _MSC_VER >= 1900 && defined(_M_X64)
5#include "TensorLabels.h"
13 class FL_EXPORT CValidationImageExtractorDL;
16 class FL_EXPORT CTensorLabelsIsotropicRatio :
public CTensorLabels<T>
19 CTensorLabelsIsotropicRatio();
21 CTensorLabelsIsotropicRatio(
const CTensorLabelsIsotropicRatio<T>& tsr,
bool bDeepCopy =
true);
23 virtual ~CTensorLabelsIsotropicRatio();
25 virtual const CResult GetBinaryData(Base::CFLData& fldBinary,
bool bSuperClass =
false, int32_t i32Version = -1,
bool bDumpMode =
false)
const override;
26 virtual const CResult GetBinaryData(Base::CFLData* pFldBinary,
bool bSuperClass =
false, int32_t i32Version = -1,
bool bDumpMode =
false)
const override;
28 virtual const CResult SetBinaryData(
const Base::CFLData& fldBinary, int64_t* pI64Offset =
nullptr)
override;
29 virtual const CResult SetBinaryData(
const Base::CFLData* pFldBinary, int64_t* pI64Offset =
nullptr)
override;
31 virtual const CResult Create(
const Base::CFLImage& fli,
bool bNormalize =
true, std::atomic<int32_t>* pI32CurrentPreparingTensorIndex =
nullptr, std::atomic<int32_t>* pI32CurrentPreparingLabelIndex =
nullptr,
bool *pBAbort =
nullptr);
32 virtual const CResult Create(
const Base::CFLImage* pFli,
bool bNormalize =
true, std::atomic<int32_t>* pI32CurrentPreparingTensorIndex =
nullptr, std::atomic<int32_t>* pI32CurrentPreparingLabelIndex =
nullptr,
bool *pBAbort =
nullptr);
33 virtual const CResult Create(
const Base::CFLImage& fli,
const std::vector<int64_t>& vctNewSize, EResizeMethod eResizeMethod,
bool bROIExtraction,
bool bNormalize,
const Base::CMultiVar<T>& mvBlankColor, ImageProcessing::EInterpolationMethod eInterpolationMethod, std::atomic<int32_t>* pI32CurrentPreparingTensorIndex,
bool* pBAbort)
override;
34 virtual const CResult Create(
const Base::CFLImage* pFli,
const std::vector<int64_t>& vctNewSize, EResizeMethod eResizeMethod,
bool bROIExtraction,
bool bNormalize,
const Base::CMultiVar<T>& mvBlankColor, ImageProcessing::EInterpolationMethod eInterpolationMethod, std::atomic<int32_t>* pI32CurrentPreparingTensorIndex,
bool* pBAbort)
override;
35 virtual const CResult Create(
const Base::CFLImage& fli,
const std::vector<int64_t>& vctNewSize, EResizeMethod eResizeMethod = EResizeMethod_ScaleAllAxises,
bool bROIExtraction =
false,
bool bNormalize =
true,
const Base::CMultiVar<T>& mvBlankColor = 0., ImageProcessing::EInterpolationMethod eInterpolationMethod = ImageProcessing::EInterpolationMethod_Bilinear, std::atomic<int32_t>* pI32CurrentPreparingTensorIndex =
nullptr, std::atomic<int32_t>* pI32CurrentPreparingLabelIndex =
nullptr,
bool *pBAbort =
nullptr);
36 virtual const CResult Create(
const Base::CFLImage* pFli,
const std::vector<int64_t>& vctNewSize, EResizeMethod eResizeMethod = EResizeMethod_ScaleAllAxises,
bool bROIExtraction =
false,
bool bNormalize =
true,
const Base::CMultiVar<T>& mvBlankColor = 0., ImageProcessing::EInterpolationMethod eInterpolationMethod = ImageProcessing::EInterpolationMethod_Bilinear, std::atomic<int32_t>* pI32CurrentPreparingTensorIndex =
nullptr, std::atomic<int32_t>* pI32CurrentPreparingLabelIndex =
nullptr,
bool *pBAbort =
nullptr);
38 virtual const CResult Create(
const wchar_t* pWcFilePath,
const std::vector<int64_t>& vctNewSize, EResizeMethod eResizeMethod = EResizeMethod_ScaleAllAxises,
bool bROIExtraction =
false,
bool bNormalize =
true,
const Base::CMultiVar<T>& mvBlankColor = 0.,
bool bRecursive =
false, ImageProcessing::EInterpolationMethod eInterpolationMethod = ImageProcessing::EInterpolationMethod_Bilinear);
39 virtual const CResult Create(
const wchar_t* pWcFilePath,
const std::initializer_list<int64_t>& ilNewSize, EResizeMethod eResizeMethod = EResizeMethod_ScaleAllAxises,
bool bROIExtraction =
false,
bool bNormalize =
true,
const Base::CMultiVar<T>& mvBlankColor = 0.,
bool bRecursive =
false, ImageProcessing::EInterpolationMethod eInterpolationMethod = ImageProcessing::EInterpolationMethod_Bilinear);
41 virtual const CResult
Assign(
const CTensor<T>* pTsr,
bool bDeepCopy =
true)
override;
43 virtual const CResult
Assign(
const CTensorLabelsIsotropicRatio<T>& tsr,
bool bDeepCopy =
true);
44 virtual const CResult
Assign(
const CTensorLabelsIsotropicRatio<T>* pTsr,
bool bDeepCopy =
true);
46 virtual const CResult
Append(
const Base::CFLImage* pFli, EResizeMethod eResizeMethod = EResizeMethod_ScaleAllAxises,
bool bROIExtraction =
false,
bool bNormalize =
true,
const Base::CMultiVar<T>& mvBlankColor = 0., ImageProcessing::EInterpolationMethod eInterpolationMethod = ImageProcessing::EInterpolationMethod_Bilinear, std::atomic<int32_t>* pI32CurrentPreparingTensorIndex =
nullptr, std::atomic<int32_t>* pI32CurrentPreparingLabelIndex =
nullptr,
bool *pBAbort =
nullptr);
47 virtual const CResult
Append(
const wchar_t* pWcFilePath,
bool bRecursive =
false)
override;
49 virtual const CResult Initialize()
override;
50 virtual const CResult
Clear()
override;
52 virtual const CResult SetBatchParameters(
const CTensorImages<T>& tsr)
override;
53 virtual const CResult SetBatchParameters(
const CTensorLabelsIsotropicRatio<T>& tsr);
55 virtual const CResult SetAlignMode(EAlignMode eAlignMode = EAlignMode_Left);
56 virtual EAlignMode GetAlignMode();
58 virtual const CResult EnableAngleReflection(
bool bAngleReflection =
false);
59 virtual bool IsAngleReflectionEnable();
61 virtual const CResult EnableHorizental(
bool bHorizental =
true);
62 virtual bool IsHorizentalEnable();
64 virtual CTensorLabelsIsotropicRatio<T>& Evaluate()
override;
66 virtual CComputationalBase<T>* Clone()
const override;
67 virtual const CResult Swap(CComputationalBase<T>& cbSwap)
override;
69 virtual const CResult LoadTensor(
const std::vector<int64_t>& vctBatchIndices)
override;
72 DeclareGetClassType();
73 SupportToDuplicateObject(CTensorLabelsIsotropicRatio, *
this);
75 virtual const CResult DecodeLabels(
const wchar_t* pWcsImagePath, Base::CFLImage* pFli =
nullptr)
override;
76 virtual const CResult AddLabel(
const wchar_t* pWcsName, Foundation::CFLFigure* pFlfLabel,
bool bFile =
false);
78 virtual const CResult CropImage(
const Base::CFLImage* pFliSrc, Base::CFLImage* pFliDst, int64_t i64Width, int64_t i64Height,
const Base::CMultiVar<T>& mvBlankColor, std::atomic<int32_t>* pI32CurrentPreparingLabelIndex =
nullptr,
bool* pBAbort =
nullptr);
79 virtual const CResult CropImage(
const std::vector<int64_t>& vctBatchIndices,
const Base::CFLImage* pFliSrc, Base::CFLImage* pFliDst, int64_t i64Width, int64_t i64Height,
const Base::CMultiVar<T>& mvBlankColor, std::atomic<int32_t>* pI32CurrentPreparingLabelIndex =
nullptr,
bool* pBAbort =
nullptr);
80 virtual const CResult CropImageUnit(
const Base::CFLImage* pFliSrc, Base::CFLImage* pFliDst, int32_t i32FigureNum, int64_t i64Width, int64_t i64Height);
81 virtual const CResult CropImageUnit(
const Base::CFLImage* pFliSrc, Base::CFLImagePage* pFliDstPage, int32_t i32FigureNum, int64_t i64Width, int64_t i64Height);
85 std::vector<std::pair<int32_t, int32_t>>& m_vctPageFigureNum;
87 EAlignMode m_eAlignMode;
88 bool m_bAngleReflection;
90 bool m_bSequenceLabel;
93 friend class CValidationImageExtractorDL;
95 DeclareGetSignletonObject(CTensorLabelsIsotropicRatio);
98 #define CCGFTensorLabelsIsotropicRatio(...) (*(new CTensorLabelsIsotropicRatio<float>(__VA_ARGS__)))
99 #define CCGDTensorLabelsIsotropicRatio(...) (*(new CTensorLabelsIsotropicRatio<double>(__VA_ARGS__)))
101 typedef CTensorLabelsIsotropicRatio<float> CTensorLabelsIsotropicRatioF;
102 typedef CTensorLabelsIsotropicRatio<double> CTensorLabelsIsotropicRatioD;
@ Assign
Set the value of CGUIPropertyItemView3DFigure to the specified figure.
@ Clear
Clear all the figure objects.