objc2_vision/generated/
VNImageRegistrationRequest.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-graphics")]
6use objc2_core_graphics::*;
7#[cfg(feature = "objc2-core-image")]
8use objc2_core_image::*;
9#[cfg(feature = "objc2-core-media")]
10use objc2_core_media::*;
11#[cfg(feature = "objc2-core-video")]
12use objc2_core_video::*;
13use objc2_foundation::*;
14
15use crate::*;
16
17extern_class!(
18    /// A request that will calculate a transformation for morphing a "floating" image onto an unchanging "reference" image.
19    ///
20    ///
21    /// The request is created with the targeted image acting as the floating image. Processing the request will calculate the transformations that morph the floating image onto the reference image.
22    ///
23    /// See also [Apple's documentation](https://developer.apple.com/documentation/vision/vnimageregistrationrequest?language=objc)
24    #[unsafe(super(VNTargetedImageRequest, VNImageBasedRequest, VNRequest, NSObject))]
25    #[derive(Debug, PartialEq, Eq, Hash)]
26    #[cfg(all(feature = "VNRequest", feature = "VNTargetedImageRequest"))]
27    pub struct VNImageRegistrationRequest;
28);
29
30#[cfg(all(feature = "VNRequest", feature = "VNTargetedImageRequest"))]
31extern_conformance!(
32    unsafe impl NSCopying for VNImageRegistrationRequest {}
33);
34
35#[cfg(all(feature = "VNRequest", feature = "VNTargetedImageRequest"))]
36unsafe impl CopyingHelper for VNImageRegistrationRequest {
37    type Result = Self;
38}
39
40#[cfg(all(feature = "VNRequest", feature = "VNTargetedImageRequest"))]
41extern_conformance!(
42    unsafe impl NSObjectProtocol for VNImageRegistrationRequest {}
43);
44
45#[cfg(all(feature = "VNRequest", feature = "VNTargetedImageRequest"))]
46impl VNImageRegistrationRequest {
47    extern_methods!();
48}
49
50/// Methods declared on superclass `VNTargetedImageRequest`.
51#[cfg(all(feature = "VNRequest", feature = "VNTargetedImageRequest"))]
52impl VNImageRegistrationRequest {
53    extern_methods!(
54        #[unsafe(method(init))]
55        #[unsafe(method_family = init)]
56        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
57
58        #[cfg(feature = "block2")]
59        #[unsafe(method(initWithCompletionHandler:))]
60        #[unsafe(method_family = init)]
61        pub unsafe fn initWithCompletionHandler(
62            this: Allocated<Self>,
63            completion_handler: VNRequestCompletionHandler,
64        ) -> Retained<Self>;
65
66        #[cfg(all(feature = "VNRequestHandler", feature = "objc2-core-video"))]
67        /// Create a new request that targets an image in a pixel buffer.
68        ///
69        ///
70        /// Parameter `pixelBuffer`: The pixel buffer containing the targeted image.
71        ///
72        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
73        #[unsafe(method(initWithTargetedCVPixelBuffer:options:))]
74        #[unsafe(method_family = init)]
75        pub unsafe fn initWithTargetedCVPixelBuffer_options(
76            this: Allocated<Self>,
77            pixel_buffer: &CVPixelBuffer,
78            options: &NSDictionary<VNImageOption, AnyObject>,
79        ) -> Retained<Self>;
80
81        #[cfg(all(
82            feature = "VNRequestHandler",
83            feature = "block2",
84            feature = "objc2-core-video"
85        ))]
86        /// Create a new request that targets an image in a pixel buffer.
87        ///
88        ///
89        /// Parameter `pixelBuffer`: The pixel buffer containing the targeted image.
90        ///
91        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
92        ///
93        /// Parameter `completionHandler`: The block that is invoked when the request has been performed.
94        #[unsafe(method(initWithTargetedCVPixelBuffer:options:completionHandler:))]
95        #[unsafe(method_family = init)]
96        pub unsafe fn initWithTargetedCVPixelBuffer_options_completionHandler(
97            this: Allocated<Self>,
98            pixel_buffer: &CVPixelBuffer,
99            options: &NSDictionary<VNImageOption, AnyObject>,
100            completion_handler: VNRequestCompletionHandler,
101        ) -> Retained<Self>;
102
103        #[cfg(all(feature = "VNRequestHandler", feature = "objc2-core-graphics"))]
104        /// Create a new request with a targeted CGImage.
105        ///
106        ///
107        /// Parameter `cgImage`: The CGImageRef of the targeted image.
108        ///
109        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
110        #[unsafe(method(initWithTargetedCGImage:options:))]
111        #[unsafe(method_family = init)]
112        pub unsafe fn initWithTargetedCGImage_options(
113            this: Allocated<Self>,
114            cg_image: &CGImage,
115            options: &NSDictionary<VNImageOption, AnyObject>,
116        ) -> Retained<Self>;
117
118        #[cfg(all(
119            feature = "VNRequestHandler",
120            feature = "block2",
121            feature = "objc2-core-graphics"
122        ))]
123        /// Create a new request with a targeted CGImage.
124        ///
125        ///
126        /// Parameter `cgImage`: The CGImageRef of the targeted image.
127        ///
128        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
129        ///
130        /// Parameter `completionHandler`: The block that is invoked when the request has been performed.
131        #[unsafe(method(initWithTargetedCGImage:options:completionHandler:))]
132        #[unsafe(method_family = init)]
133        pub unsafe fn initWithTargetedCGImage_options_completionHandler(
134            this: Allocated<Self>,
135            cg_image: &CGImage,
136            options: &NSDictionary<VNImageOption, AnyObject>,
137            completion_handler: VNRequestCompletionHandler,
138        ) -> Retained<Self>;
139
140        #[cfg(all(feature = "VNRequestHandler", feature = "objc2-core-image"))]
141        /// Create a new request with a targeted CIImage.
142        ///
143        ///
144        /// Parameter `ciImage`: The CIImage of the targeted image.
145        ///
146        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
147        #[unsafe(method(initWithTargetedCIImage:options:))]
148        #[unsafe(method_family = init)]
149        pub unsafe fn initWithTargetedCIImage_options(
150            this: Allocated<Self>,
151            ci_image: &CIImage,
152            options: &NSDictionary<VNImageOption, AnyObject>,
153        ) -> Retained<Self>;
154
155        #[cfg(all(
156            feature = "VNRequestHandler",
157            feature = "block2",
158            feature = "objc2-core-image"
159        ))]
160        /// Create a new request with a targeted CIImage.
161        ///
162        ///
163        /// Parameter `ciImage`: The CIImage of the targeted image.
164        ///
165        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
166        ///
167        /// Parameter `completionHandler`: The block that is invoked when the request has been performed.
168        #[unsafe(method(initWithTargetedCIImage:options:completionHandler:))]
169        #[unsafe(method_family = init)]
170        pub unsafe fn initWithTargetedCIImage_options_completionHandler(
171            this: Allocated<Self>,
172            ci_image: &CIImage,
173            options: &NSDictionary<VNImageOption, AnyObject>,
174            completion_handler: VNRequestCompletionHandler,
175        ) -> Retained<Self>;
176
177        #[cfg(feature = "VNRequestHandler")]
178        /// Create a new request with a targeted image URL.
179        ///
180        ///
181        /// Parameter `imageURL`: The URL of the targeted image.
182        ///
183        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
184        #[unsafe(method(initWithTargetedImageURL:options:))]
185        #[unsafe(method_family = init)]
186        pub unsafe fn initWithTargetedImageURL_options(
187            this: Allocated<Self>,
188            image_url: &NSURL,
189            options: &NSDictionary<VNImageOption, AnyObject>,
190        ) -> Retained<Self>;
191
192        #[cfg(all(feature = "VNRequestHandler", feature = "block2"))]
193        /// Create a new request with a targeted image URL.
194        ///
195        ///
196        /// Parameter `imageURL`: The URL of the targeted image.
197        ///
198        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
199        ///
200        /// Parameter `completionHandler`: The block that is invoked when the request has been performed.
201        #[unsafe(method(initWithTargetedImageURL:options:completionHandler:))]
202        #[unsafe(method_family = init)]
203        pub unsafe fn initWithTargetedImageURL_options_completionHandler(
204            this: Allocated<Self>,
205            image_url: &NSURL,
206            options: &NSDictionary<VNImageOption, AnyObject>,
207            completion_handler: VNRequestCompletionHandler,
208        ) -> Retained<Self>;
209
210        #[cfg(feature = "VNRequestHandler")]
211        /// Create a new request with a targeted image data.
212        ///
213        ///
214        /// Parameter `imageData`: The data of the targeted image.
215        ///
216        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
217        #[unsafe(method(initWithTargetedImageData:options:))]
218        #[unsafe(method_family = init)]
219        pub unsafe fn initWithTargetedImageData_options(
220            this: Allocated<Self>,
221            image_data: &NSData,
222            options: &NSDictionary<VNImageOption, AnyObject>,
223        ) -> Retained<Self>;
224
225        #[cfg(all(feature = "VNRequestHandler", feature = "block2"))]
226        /// Create a new request with a targeted image data.
227        ///
228        ///
229        /// Parameter `imageData`: The data of the targeted image.
230        ///
231        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
232        ///
233        /// Parameter `completionHandler`: The block that is invoked when the request has been performed.
234        #[unsafe(method(initWithTargetedImageData:options:completionHandler:))]
235        #[unsafe(method_family = init)]
236        pub unsafe fn initWithTargetedImageData_options_completionHandler(
237            this: Allocated<Self>,
238            image_data: &NSData,
239            options: &NSDictionary<VNImageOption, AnyObject>,
240            completion_handler: VNRequestCompletionHandler,
241        ) -> Retained<Self>;
242
243        #[cfg(all(feature = "VNRequestHandler", feature = "objc2-core-media"))]
244        /// Create a new request with a targeted CMSampleBuffer.
245        ///
246        ///
247        /// Parameter `sampleBuffer`: The CMSampleBuffer containing the CVImageBuffer to be used by the request.
248        ///
249        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
250        #[unsafe(method(initWithTargetedCMSampleBuffer:options:))]
251        #[unsafe(method_family = init)]
252        pub unsafe fn initWithTargetedCMSampleBuffer_options(
253            this: Allocated<Self>,
254            sample_buffer: &CMSampleBuffer,
255            options: &NSDictionary<VNImageOption, AnyObject>,
256        ) -> Retained<Self>;
257
258        #[cfg(all(
259            feature = "VNRequestHandler",
260            feature = "block2",
261            feature = "objc2-core-media"
262        ))]
263        /// Create a new request with a targeted CMSampleBuffer.
264        ///
265        ///
266        /// Parameter `sampleBuffer`: The CMSampleBuffer containing the CVImageBuffer to be used by the request.
267        ///
268        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
269        ///
270        /// Parameter `completionHandler`: The block that is invoked after the request has been performed.
271        #[unsafe(method(initWithTargetedCMSampleBuffer:options:completionHandler:))]
272        #[unsafe(method_family = init)]
273        pub unsafe fn initWithTargetedCMSampleBuffer_options_completionHandler(
274            this: Allocated<Self>,
275            sample_buffer: &CMSampleBuffer,
276            options: &NSDictionary<VNImageOption, AnyObject>,
277            completion_handler: VNRequestCompletionHandler,
278        ) -> Retained<Self>;
279    );
280}
281
282/// Methods declared on superclass `NSObject`.
283#[cfg(all(feature = "VNRequest", feature = "VNTargetedImageRequest"))]
284impl VNImageRegistrationRequest {
285    extern_methods!(
286        #[unsafe(method(new))]
287        #[unsafe(method_family = new)]
288        pub unsafe fn new() -> Retained<Self>;
289    );
290}
291
292extern_class!(
293    /// An image registration request that will calculate a translational transformation for morphing a "floating" image onto an unchanging "reference" image.
294    ///
295    ///
296    /// The request is created with the targeted image acting as the floating image. Processing the request will calculate the affine transformations that morph the floating image onto the reference image.
297    ///
298    /// See also [Apple's documentation](https://developer.apple.com/documentation/vision/vntranslationalimageregistrationrequest?language=objc)
299    #[unsafe(super(
300        VNImageRegistrationRequest,
301        VNTargetedImageRequest,
302        VNImageBasedRequest,
303        VNRequest,
304        NSObject
305    ))]
306    #[derive(Debug, PartialEq, Eq, Hash)]
307    #[cfg(all(feature = "VNRequest", feature = "VNTargetedImageRequest"))]
308    pub struct VNTranslationalImageRegistrationRequest;
309);
310
311#[cfg(all(feature = "VNRequest", feature = "VNTargetedImageRequest"))]
312extern_conformance!(
313    unsafe impl NSCopying for VNTranslationalImageRegistrationRequest {}
314);
315
316#[cfg(all(feature = "VNRequest", feature = "VNTargetedImageRequest"))]
317unsafe impl CopyingHelper for VNTranslationalImageRegistrationRequest {
318    type Result = Self;
319}
320
321#[cfg(all(feature = "VNRequest", feature = "VNTargetedImageRequest"))]
322extern_conformance!(
323    unsafe impl NSObjectProtocol for VNTranslationalImageRegistrationRequest {}
324);
325
326#[cfg(all(feature = "VNRequest", feature = "VNTargetedImageRequest"))]
327impl VNTranslationalImageRegistrationRequest {
328    extern_methods!(
329        #[cfg(feature = "VNObservation")]
330        /// VNImageTranslationAlignmentObservation results.
331        #[unsafe(method(results))]
332        #[unsafe(method_family = none)]
333        pub unsafe fn results(
334            &self,
335        ) -> Option<Retained<NSArray<VNImageTranslationAlignmentObservation>>>;
336    );
337}
338
339/// Methods declared on superclass `VNTargetedImageRequest`.
340#[cfg(all(feature = "VNRequest", feature = "VNTargetedImageRequest"))]
341impl VNTranslationalImageRegistrationRequest {
342    extern_methods!(
343        #[unsafe(method(init))]
344        #[unsafe(method_family = init)]
345        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
346
347        #[cfg(feature = "block2")]
348        #[unsafe(method(initWithCompletionHandler:))]
349        #[unsafe(method_family = init)]
350        pub unsafe fn initWithCompletionHandler(
351            this: Allocated<Self>,
352            completion_handler: VNRequestCompletionHandler,
353        ) -> Retained<Self>;
354
355        #[cfg(all(feature = "VNRequestHandler", feature = "objc2-core-video"))]
356        /// Create a new request that targets an image in a pixel buffer.
357        ///
358        ///
359        /// Parameter `pixelBuffer`: The pixel buffer containing the targeted image.
360        ///
361        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
362        #[unsafe(method(initWithTargetedCVPixelBuffer:options:))]
363        #[unsafe(method_family = init)]
364        pub unsafe fn initWithTargetedCVPixelBuffer_options(
365            this: Allocated<Self>,
366            pixel_buffer: &CVPixelBuffer,
367            options: &NSDictionary<VNImageOption, AnyObject>,
368        ) -> Retained<Self>;
369
370        #[cfg(all(
371            feature = "VNRequestHandler",
372            feature = "block2",
373            feature = "objc2-core-video"
374        ))]
375        /// Create a new request that targets an image in a pixel buffer.
376        ///
377        ///
378        /// Parameter `pixelBuffer`: The pixel buffer containing the targeted image.
379        ///
380        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
381        ///
382        /// Parameter `completionHandler`: The block that is invoked when the request has been performed.
383        #[unsafe(method(initWithTargetedCVPixelBuffer:options:completionHandler:))]
384        #[unsafe(method_family = init)]
385        pub unsafe fn initWithTargetedCVPixelBuffer_options_completionHandler(
386            this: Allocated<Self>,
387            pixel_buffer: &CVPixelBuffer,
388            options: &NSDictionary<VNImageOption, AnyObject>,
389            completion_handler: VNRequestCompletionHandler,
390        ) -> Retained<Self>;
391
392        #[cfg(all(feature = "VNRequestHandler", feature = "objc2-core-graphics"))]
393        /// Create a new request with a targeted CGImage.
394        ///
395        ///
396        /// Parameter `cgImage`: The CGImageRef of the targeted image.
397        ///
398        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
399        #[unsafe(method(initWithTargetedCGImage:options:))]
400        #[unsafe(method_family = init)]
401        pub unsafe fn initWithTargetedCGImage_options(
402            this: Allocated<Self>,
403            cg_image: &CGImage,
404            options: &NSDictionary<VNImageOption, AnyObject>,
405        ) -> Retained<Self>;
406
407        #[cfg(all(
408            feature = "VNRequestHandler",
409            feature = "block2",
410            feature = "objc2-core-graphics"
411        ))]
412        /// Create a new request with a targeted CGImage.
413        ///
414        ///
415        /// Parameter `cgImage`: The CGImageRef of the targeted image.
416        ///
417        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
418        ///
419        /// Parameter `completionHandler`: The block that is invoked when the request has been performed.
420        #[unsafe(method(initWithTargetedCGImage:options:completionHandler:))]
421        #[unsafe(method_family = init)]
422        pub unsafe fn initWithTargetedCGImage_options_completionHandler(
423            this: Allocated<Self>,
424            cg_image: &CGImage,
425            options: &NSDictionary<VNImageOption, AnyObject>,
426            completion_handler: VNRequestCompletionHandler,
427        ) -> Retained<Self>;
428
429        #[cfg(all(feature = "VNRequestHandler", feature = "objc2-core-image"))]
430        /// Create a new request with a targeted CIImage.
431        ///
432        ///
433        /// Parameter `ciImage`: The CIImage of the targeted image.
434        ///
435        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
436        #[unsafe(method(initWithTargetedCIImage:options:))]
437        #[unsafe(method_family = init)]
438        pub unsafe fn initWithTargetedCIImage_options(
439            this: Allocated<Self>,
440            ci_image: &CIImage,
441            options: &NSDictionary<VNImageOption, AnyObject>,
442        ) -> Retained<Self>;
443
444        #[cfg(all(
445            feature = "VNRequestHandler",
446            feature = "block2",
447            feature = "objc2-core-image"
448        ))]
449        /// Create a new request with a targeted CIImage.
450        ///
451        ///
452        /// Parameter `ciImage`: The CIImage of the targeted image.
453        ///
454        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
455        ///
456        /// Parameter `completionHandler`: The block that is invoked when the request has been performed.
457        #[unsafe(method(initWithTargetedCIImage:options:completionHandler:))]
458        #[unsafe(method_family = init)]
459        pub unsafe fn initWithTargetedCIImage_options_completionHandler(
460            this: Allocated<Self>,
461            ci_image: &CIImage,
462            options: &NSDictionary<VNImageOption, AnyObject>,
463            completion_handler: VNRequestCompletionHandler,
464        ) -> Retained<Self>;
465
466        #[cfg(feature = "VNRequestHandler")]
467        /// Create a new request with a targeted image URL.
468        ///
469        ///
470        /// Parameter `imageURL`: The URL of the targeted image.
471        ///
472        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
473        #[unsafe(method(initWithTargetedImageURL:options:))]
474        #[unsafe(method_family = init)]
475        pub unsafe fn initWithTargetedImageURL_options(
476            this: Allocated<Self>,
477            image_url: &NSURL,
478            options: &NSDictionary<VNImageOption, AnyObject>,
479        ) -> Retained<Self>;
480
481        #[cfg(all(feature = "VNRequestHandler", feature = "block2"))]
482        /// Create a new request with a targeted image URL.
483        ///
484        ///
485        /// Parameter `imageURL`: The URL of the targeted image.
486        ///
487        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
488        ///
489        /// Parameter `completionHandler`: The block that is invoked when the request has been performed.
490        #[unsafe(method(initWithTargetedImageURL:options:completionHandler:))]
491        #[unsafe(method_family = init)]
492        pub unsafe fn initWithTargetedImageURL_options_completionHandler(
493            this: Allocated<Self>,
494            image_url: &NSURL,
495            options: &NSDictionary<VNImageOption, AnyObject>,
496            completion_handler: VNRequestCompletionHandler,
497        ) -> Retained<Self>;
498
499        #[cfg(feature = "VNRequestHandler")]
500        /// Create a new request with a targeted image data.
501        ///
502        ///
503        /// Parameter `imageData`: The data of the targeted image.
504        ///
505        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
506        #[unsafe(method(initWithTargetedImageData:options:))]
507        #[unsafe(method_family = init)]
508        pub unsafe fn initWithTargetedImageData_options(
509            this: Allocated<Self>,
510            image_data: &NSData,
511            options: &NSDictionary<VNImageOption, AnyObject>,
512        ) -> Retained<Self>;
513
514        #[cfg(all(feature = "VNRequestHandler", feature = "block2"))]
515        /// Create a new request with a targeted image data.
516        ///
517        ///
518        /// Parameter `imageData`: The data of the targeted image.
519        ///
520        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
521        ///
522        /// Parameter `completionHandler`: The block that is invoked when the request has been performed.
523        #[unsafe(method(initWithTargetedImageData:options:completionHandler:))]
524        #[unsafe(method_family = init)]
525        pub unsafe fn initWithTargetedImageData_options_completionHandler(
526            this: Allocated<Self>,
527            image_data: &NSData,
528            options: &NSDictionary<VNImageOption, AnyObject>,
529            completion_handler: VNRequestCompletionHandler,
530        ) -> Retained<Self>;
531
532        #[cfg(all(feature = "VNRequestHandler", feature = "objc2-core-media"))]
533        /// Create a new request with a targeted CMSampleBuffer.
534        ///
535        ///
536        /// Parameter `sampleBuffer`: The CMSampleBuffer containing the CVImageBuffer to be used by the request.
537        ///
538        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
539        #[unsafe(method(initWithTargetedCMSampleBuffer:options:))]
540        #[unsafe(method_family = init)]
541        pub unsafe fn initWithTargetedCMSampleBuffer_options(
542            this: Allocated<Self>,
543            sample_buffer: &CMSampleBuffer,
544            options: &NSDictionary<VNImageOption, AnyObject>,
545        ) -> Retained<Self>;
546
547        #[cfg(all(
548            feature = "VNRequestHandler",
549            feature = "block2",
550            feature = "objc2-core-media"
551        ))]
552        /// Create a new request with a targeted CMSampleBuffer.
553        ///
554        ///
555        /// Parameter `sampleBuffer`: The CMSampleBuffer containing the CVImageBuffer to be used by the request.
556        ///
557        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
558        ///
559        /// Parameter `completionHandler`: The block that is invoked after the request has been performed.
560        #[unsafe(method(initWithTargetedCMSampleBuffer:options:completionHandler:))]
561        #[unsafe(method_family = init)]
562        pub unsafe fn initWithTargetedCMSampleBuffer_options_completionHandler(
563            this: Allocated<Self>,
564            sample_buffer: &CMSampleBuffer,
565            options: &NSDictionary<VNImageOption, AnyObject>,
566            completion_handler: VNRequestCompletionHandler,
567        ) -> Retained<Self>;
568    );
569}
570
571/// Methods declared on superclass `NSObject`.
572#[cfg(all(feature = "VNRequest", feature = "VNTargetedImageRequest"))]
573impl VNTranslationalImageRegistrationRequest {
574    extern_methods!(
575        #[unsafe(method(new))]
576        #[unsafe(method_family = new)]
577        pub unsafe fn new() -> Retained<Self>;
578    );
579}
580
581/// [Apple's documentation](https://developer.apple.com/documentation/vision/vntranslationalimageregistrationrequestrevision1?language=objc)
582pub static VNTranslationalImageRegistrationRequestRevision1: NSUInteger = 1;
583
584extern_class!(
585    /// An image registration request that will calculate a homographic transformation for morphing a "floating" image onto an unchanging "reference" image.
586    ///
587    ///
588    /// The request is created with the targeted image acting as the floating image. Processing the request will calculate the matrix warp transform that morph the floating image onto the reference image.
589    /// Note that the request will fail unless the pixel dimensions of the reference image do not exactly match the resolved region of interest of the floating image.
590    ///
591    /// See also [Apple's documentation](https://developer.apple.com/documentation/vision/vnhomographicimageregistrationrequest?language=objc)
592    #[unsafe(super(
593        VNImageRegistrationRequest,
594        VNTargetedImageRequest,
595        VNImageBasedRequest,
596        VNRequest,
597        NSObject
598    ))]
599    #[derive(Debug, PartialEq, Eq, Hash)]
600    #[cfg(all(feature = "VNRequest", feature = "VNTargetedImageRequest"))]
601    pub struct VNHomographicImageRegistrationRequest;
602);
603
604#[cfg(all(feature = "VNRequest", feature = "VNTargetedImageRequest"))]
605extern_conformance!(
606    unsafe impl NSCopying for VNHomographicImageRegistrationRequest {}
607);
608
609#[cfg(all(feature = "VNRequest", feature = "VNTargetedImageRequest"))]
610unsafe impl CopyingHelper for VNHomographicImageRegistrationRequest {
611    type Result = Self;
612}
613
614#[cfg(all(feature = "VNRequest", feature = "VNTargetedImageRequest"))]
615extern_conformance!(
616    unsafe impl NSObjectProtocol for VNHomographicImageRegistrationRequest {}
617);
618
619#[cfg(all(feature = "VNRequest", feature = "VNTargetedImageRequest"))]
620impl VNHomographicImageRegistrationRequest {
621    extern_methods!(
622        #[cfg(feature = "VNObservation")]
623        /// VNImageHomographicAlignmentObservation results.
624        #[unsafe(method(results))]
625        #[unsafe(method_family = none)]
626        pub unsafe fn results(
627            &self,
628        ) -> Option<Retained<NSArray<VNImageHomographicAlignmentObservation>>>;
629    );
630}
631
632/// Methods declared on superclass `VNTargetedImageRequest`.
633#[cfg(all(feature = "VNRequest", feature = "VNTargetedImageRequest"))]
634impl VNHomographicImageRegistrationRequest {
635    extern_methods!(
636        #[unsafe(method(init))]
637        #[unsafe(method_family = init)]
638        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
639
640        #[cfg(feature = "block2")]
641        #[unsafe(method(initWithCompletionHandler:))]
642        #[unsafe(method_family = init)]
643        pub unsafe fn initWithCompletionHandler(
644            this: Allocated<Self>,
645            completion_handler: VNRequestCompletionHandler,
646        ) -> Retained<Self>;
647
648        #[cfg(all(feature = "VNRequestHandler", feature = "objc2-core-video"))]
649        /// Create a new request that targets an image in a pixel buffer.
650        ///
651        ///
652        /// Parameter `pixelBuffer`: The pixel buffer containing the targeted image.
653        ///
654        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
655        #[unsafe(method(initWithTargetedCVPixelBuffer:options:))]
656        #[unsafe(method_family = init)]
657        pub unsafe fn initWithTargetedCVPixelBuffer_options(
658            this: Allocated<Self>,
659            pixel_buffer: &CVPixelBuffer,
660            options: &NSDictionary<VNImageOption, AnyObject>,
661        ) -> Retained<Self>;
662
663        #[cfg(all(
664            feature = "VNRequestHandler",
665            feature = "block2",
666            feature = "objc2-core-video"
667        ))]
668        /// Create a new request that targets an image in a pixel buffer.
669        ///
670        ///
671        /// Parameter `pixelBuffer`: The pixel buffer containing the targeted image.
672        ///
673        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
674        ///
675        /// Parameter `completionHandler`: The block that is invoked when the request has been performed.
676        #[unsafe(method(initWithTargetedCVPixelBuffer:options:completionHandler:))]
677        #[unsafe(method_family = init)]
678        pub unsafe fn initWithTargetedCVPixelBuffer_options_completionHandler(
679            this: Allocated<Self>,
680            pixel_buffer: &CVPixelBuffer,
681            options: &NSDictionary<VNImageOption, AnyObject>,
682            completion_handler: VNRequestCompletionHandler,
683        ) -> Retained<Self>;
684
685        #[cfg(all(feature = "VNRequestHandler", feature = "objc2-core-graphics"))]
686        /// Create a new request with a targeted CGImage.
687        ///
688        ///
689        /// Parameter `cgImage`: The CGImageRef of the targeted image.
690        ///
691        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
692        #[unsafe(method(initWithTargetedCGImage:options:))]
693        #[unsafe(method_family = init)]
694        pub unsafe fn initWithTargetedCGImage_options(
695            this: Allocated<Self>,
696            cg_image: &CGImage,
697            options: &NSDictionary<VNImageOption, AnyObject>,
698        ) -> Retained<Self>;
699
700        #[cfg(all(
701            feature = "VNRequestHandler",
702            feature = "block2",
703            feature = "objc2-core-graphics"
704        ))]
705        /// Create a new request with a targeted CGImage.
706        ///
707        ///
708        /// Parameter `cgImage`: The CGImageRef of the targeted image.
709        ///
710        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
711        ///
712        /// Parameter `completionHandler`: The block that is invoked when the request has been performed.
713        #[unsafe(method(initWithTargetedCGImage:options:completionHandler:))]
714        #[unsafe(method_family = init)]
715        pub unsafe fn initWithTargetedCGImage_options_completionHandler(
716            this: Allocated<Self>,
717            cg_image: &CGImage,
718            options: &NSDictionary<VNImageOption, AnyObject>,
719            completion_handler: VNRequestCompletionHandler,
720        ) -> Retained<Self>;
721
722        #[cfg(all(feature = "VNRequestHandler", feature = "objc2-core-image"))]
723        /// Create a new request with a targeted CIImage.
724        ///
725        ///
726        /// Parameter `ciImage`: The CIImage of the targeted image.
727        ///
728        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
729        #[unsafe(method(initWithTargetedCIImage:options:))]
730        #[unsafe(method_family = init)]
731        pub unsafe fn initWithTargetedCIImage_options(
732            this: Allocated<Self>,
733            ci_image: &CIImage,
734            options: &NSDictionary<VNImageOption, AnyObject>,
735        ) -> Retained<Self>;
736
737        #[cfg(all(
738            feature = "VNRequestHandler",
739            feature = "block2",
740            feature = "objc2-core-image"
741        ))]
742        /// Create a new request with a targeted CIImage.
743        ///
744        ///
745        /// Parameter `ciImage`: The CIImage of the targeted image.
746        ///
747        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
748        ///
749        /// Parameter `completionHandler`: The block that is invoked when the request has been performed.
750        #[unsafe(method(initWithTargetedCIImage:options:completionHandler:))]
751        #[unsafe(method_family = init)]
752        pub unsafe fn initWithTargetedCIImage_options_completionHandler(
753            this: Allocated<Self>,
754            ci_image: &CIImage,
755            options: &NSDictionary<VNImageOption, AnyObject>,
756            completion_handler: VNRequestCompletionHandler,
757        ) -> Retained<Self>;
758
759        #[cfg(feature = "VNRequestHandler")]
760        /// Create a new request with a targeted image URL.
761        ///
762        ///
763        /// Parameter `imageURL`: The URL of the targeted image.
764        ///
765        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
766        #[unsafe(method(initWithTargetedImageURL:options:))]
767        #[unsafe(method_family = init)]
768        pub unsafe fn initWithTargetedImageURL_options(
769            this: Allocated<Self>,
770            image_url: &NSURL,
771            options: &NSDictionary<VNImageOption, AnyObject>,
772        ) -> Retained<Self>;
773
774        #[cfg(all(feature = "VNRequestHandler", feature = "block2"))]
775        /// Create a new request with a targeted image URL.
776        ///
777        ///
778        /// Parameter `imageURL`: The URL of the targeted image.
779        ///
780        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
781        ///
782        /// Parameter `completionHandler`: The block that is invoked when the request has been performed.
783        #[unsafe(method(initWithTargetedImageURL:options:completionHandler:))]
784        #[unsafe(method_family = init)]
785        pub unsafe fn initWithTargetedImageURL_options_completionHandler(
786            this: Allocated<Self>,
787            image_url: &NSURL,
788            options: &NSDictionary<VNImageOption, AnyObject>,
789            completion_handler: VNRequestCompletionHandler,
790        ) -> Retained<Self>;
791
792        #[cfg(feature = "VNRequestHandler")]
793        /// Create a new request with a targeted image data.
794        ///
795        ///
796        /// Parameter `imageData`: The data of the targeted image.
797        ///
798        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
799        #[unsafe(method(initWithTargetedImageData:options:))]
800        #[unsafe(method_family = init)]
801        pub unsafe fn initWithTargetedImageData_options(
802            this: Allocated<Self>,
803            image_data: &NSData,
804            options: &NSDictionary<VNImageOption, AnyObject>,
805        ) -> Retained<Self>;
806
807        #[cfg(all(feature = "VNRequestHandler", feature = "block2"))]
808        /// Create a new request with a targeted image data.
809        ///
810        ///
811        /// Parameter `imageData`: The data of the targeted image.
812        ///
813        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
814        ///
815        /// Parameter `completionHandler`: The block that is invoked when the request has been performed.
816        #[unsafe(method(initWithTargetedImageData:options:completionHandler:))]
817        #[unsafe(method_family = init)]
818        pub unsafe fn initWithTargetedImageData_options_completionHandler(
819            this: Allocated<Self>,
820            image_data: &NSData,
821            options: &NSDictionary<VNImageOption, AnyObject>,
822            completion_handler: VNRequestCompletionHandler,
823        ) -> Retained<Self>;
824
825        #[cfg(all(feature = "VNRequestHandler", feature = "objc2-core-media"))]
826        /// Create a new request with a targeted CMSampleBuffer.
827        ///
828        ///
829        /// Parameter `sampleBuffer`: The CMSampleBuffer containing the CVImageBuffer to be used by the request.
830        ///
831        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
832        #[unsafe(method(initWithTargetedCMSampleBuffer:options:))]
833        #[unsafe(method_family = init)]
834        pub unsafe fn initWithTargetedCMSampleBuffer_options(
835            this: Allocated<Self>,
836            sample_buffer: &CMSampleBuffer,
837            options: &NSDictionary<VNImageOption, AnyObject>,
838        ) -> Retained<Self>;
839
840        #[cfg(all(
841            feature = "VNRequestHandler",
842            feature = "block2",
843            feature = "objc2-core-media"
844        ))]
845        /// Create a new request with a targeted CMSampleBuffer.
846        ///
847        ///
848        /// Parameter `sampleBuffer`: The CMSampleBuffer containing the CVImageBuffer to be used by the request.
849        ///
850        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
851        ///
852        /// Parameter `completionHandler`: The block that is invoked after the request has been performed.
853        #[unsafe(method(initWithTargetedCMSampleBuffer:options:completionHandler:))]
854        #[unsafe(method_family = init)]
855        pub unsafe fn initWithTargetedCMSampleBuffer_options_completionHandler(
856            this: Allocated<Self>,
857            sample_buffer: &CMSampleBuffer,
858            options: &NSDictionary<VNImageOption, AnyObject>,
859            completion_handler: VNRequestCompletionHandler,
860        ) -> Retained<Self>;
861    );
862}
863
864/// Methods declared on superclass `NSObject`.
865#[cfg(all(feature = "VNRequest", feature = "VNTargetedImageRequest"))]
866impl VNHomographicImageRegistrationRequest {
867    extern_methods!(
868        #[unsafe(method(new))]
869        #[unsafe(method_family = new)]
870        pub unsafe fn new() -> Retained<Self>;
871    );
872}
873
874/// [Apple's documentation](https://developer.apple.com/documentation/vision/vnhomographicimageregistrationrequestrevision1?language=objc)
875pub static VNHomographicImageRegistrationRequestRevision1: NSUInteger = 1;