objc2_vision/generated/
VNTrackTranslationalImageRegistrationRequest.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-core-media")]
6use objc2_core_media::*;
7use objc2_foundation::*;
8
9use crate::*;
10
11extern_class!(
12    /// An image registration request that will produce a translational transformation which will morph one image to another.
13    ///
14    /// Because this is a stateful request, it must be performed on at least two images in order to produce an observation.
15    ///
16    /// See also [Apple's documentation](https://developer.apple.com/documentation/vision/vntracktranslationalimageregistrationrequest?language=objc)
17    #[unsafe(super(VNStatefulRequest, VNImageBasedRequest, VNRequest, NSObject))]
18    #[derive(Debug, PartialEq, Eq, Hash)]
19    #[cfg(all(feature = "VNRequest", feature = "VNStatefulRequest"))]
20    pub struct VNTrackTranslationalImageRegistrationRequest;
21);
22
23#[cfg(all(feature = "VNRequest", feature = "VNStatefulRequest"))]
24unsafe impl NSCopying for VNTrackTranslationalImageRegistrationRequest {}
25
26#[cfg(all(feature = "VNRequest", feature = "VNStatefulRequest"))]
27unsafe impl CopyingHelper for VNTrackTranslationalImageRegistrationRequest {
28    type Result = Self;
29}
30
31#[cfg(all(feature = "VNRequest", feature = "VNStatefulRequest"))]
32unsafe impl NSObjectProtocol for VNTrackTranslationalImageRegistrationRequest {}
33
34#[cfg(all(feature = "VNRequest", feature = "VNStatefulRequest"))]
35impl VNTrackTranslationalImageRegistrationRequest {
36    extern_methods!(
37        /// Create a new request that can statefully track the translational registration of two images.
38        ///
39        /// This is a convenience initializer for a frame analysis spacing of kCMTimeZero and a nil completion handler.
40        #[unsafe(method(init))]
41        #[unsafe(method_family = init)]
42        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
43
44        #[cfg(feature = "block2")]
45        /// Create a new request that can statefully track the translational registration of two images.
46        ///
47        /// This is a convenience initializer for a frame analysis spacing of kCMTimeZero.
48        #[unsafe(method(initWithCompletionHandler:))]
49        #[unsafe(method_family = init)]
50        pub unsafe fn initWithCompletionHandler(
51            this: Allocated<Self>,
52            completion_handler: VNRequestCompletionHandler,
53        ) -> Retained<Self>;
54
55        #[cfg(feature = "VNObservation")]
56        /// VNImageTranslationAlignmentObservation results.
57        #[unsafe(method(results))]
58        #[unsafe(method_family = none)]
59        pub unsafe fn results(
60            &self,
61        ) -> Option<Retained<NSArray<VNImageTranslationAlignmentObservation>>>;
62    );
63}
64
65/// Methods declared on superclass `VNStatefulRequest`.
66#[cfg(all(feature = "VNRequest", feature = "VNStatefulRequest"))]
67impl VNTrackTranslationalImageRegistrationRequest {
68    extern_methods!(
69        #[unsafe(method(new))]
70        #[unsafe(method_family = new)]
71        pub unsafe fn new() -> Retained<Self>;
72
73        #[cfg(all(feature = "block2", feature = "objc2-core-media"))]
74        /// Create a new video-based stateful request.
75        ///
76        ///
77        /// Parameter `frameAnalysisSpacing`: The reciprocal of maximum rate at which buffers will be processed. The request will not process buffers that fall within the frameAnalysisSpacing after it has performed the analysis. The analysis is not done by wall time but by analysis of of the time stamps of the samplebuffers being processed.
78        ///
79        /// Parameter `completionHandler`: The block to be invoked after the request has completed its processing. The completion handler gets executed on the same dispatch queue as the request being executed.
80        #[unsafe(method(initWithFrameAnalysisSpacing:completionHandler:))]
81        #[unsafe(method_family = init)]
82        pub unsafe fn initWithFrameAnalysisSpacing_completionHandler(
83            this: Allocated<Self>,
84            frame_analysis_spacing: CMTime,
85            completion_handler: VNRequestCompletionHandler,
86        ) -> Retained<Self>;
87    );
88}
89
90/// [Apple's documentation](https://developer.apple.com/documentation/vision/vntracktranslationalimageregistrationrequestrevision1?language=objc)
91pub static VNTrackTranslationalImageRegistrationRequestRevision1: NSUInteger = 1;