/*
 * This is one of the header files of Dynamsoft Capture Vision SDK - Document Normalizer module.
 *
 * Copyright © Dynamsoft Corporation. All rights reserved.
 */

#import <Foundation/Foundation.h>
#import <DynamsoftCaptureVisionBundle/DSIntermediateResultUnit.h>

@class DSDetectedQuadElement;

NS_ASSUME_NONNULL_BEGIN

/**
 * DSDetectedQuadsUnit class represents an intermediate result unit whose type is detected quads. It is inherited from the DSIntermediateResultUnit class.
 */
NS_SWIFT_NAME(DetectedQuadsUnit)
@interface DSDetectedQuadsUnit : DSIntermediateResultUnit
/**
 * An array of DSDetectedQuadElement. Each DSDetectedQuadElement contains the information of a single detected quadrilateral.
 */
- (nullable NSArray<DSDetectedQuadElement *> *)getDetectedQuads;

- (NSInteger)getCount;

- (nullable DSDetectedQuadElement *)getDetectedQuad:(NSInteger)index;

- (void)removeAllDetectedQuads;

- (NSInteger)removeDetectedQuad:(NSInteger)index;

- (NSInteger)addDetectedQuad:(DSDetectedQuadElement *)element
       matrixToOriginalImage:(CGAffineTransform)matrixToOriginalImage;

- (NSInteger)setDetectedQuad:(NSInteger)index
                     element:(DSDetectedQuadElement *)element
       matrixToOriginalImage:(CGAffineTransform)matrixToOriginalImage;

@end

NS_ASSUME_NONNULL_END
