aspose_imaging_cloud 20.4 → 20.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +15 -8
- data/lib/aspose-imaging-cloud.rb +22 -27
- data/lib/aspose-imaging-cloud/api/imaging_api.rb +55 -15
- data/lib/aspose-imaging-cloud/api_client.rb +1 -1
- data/lib/aspose-imaging-cloud/models/available_labels_list.rb +204 -0
- data/lib/aspose-imaging-cloud/models/detected_object.rb +228 -0
- data/lib/aspose-imaging-cloud/models/detected_object_list.rb +204 -0
- data/lib/aspose-imaging-cloud/models/dicom_properties.rb +4 -64
- data/lib/aspose-imaging-cloud/models/eps_properties.rb +241 -0
- data/lib/aspose-imaging-cloud/models/imaging_response.rb +11 -1
- data/lib/aspose-imaging-cloud/models/rectangle.rb +247 -0
- data/lib/aspose-imaging-cloud/models/requests/{save_image_as_request.rb → convert_image_request.rb} +7 -7
- data/lib/aspose-imaging-cloud/models/requests/{create_saved_image_as_request.rb → create_converted_image_request.rb} +7 -7
- data/lib/aspose-imaging-cloud/models/requests/create_fax_tiff_request.rb +1 -1
- data/lib/aspose-imaging-cloud/models/requests/create_image_frame_range_request.rb +1 -1
- data/lib/aspose-imaging-cloud/models/requests/create_object_bounds_request.rb +99 -0
- data/lib/aspose-imaging-cloud/models/requests/create_visual_object_bounds_request.rb +102 -0
- data/lib/aspose-imaging-cloud/models/requests/get_available_labels_request.rb +74 -0
- data/lib/aspose-imaging-cloud/models/requests/get_object_bounds_request.rb +98 -0
- data/lib/aspose-imaging-cloud/models/requests/get_visual_object_bounds_request.rb +101 -0
- metadata +15 -5
data/lib/aspose-imaging-cloud/models/requests/{save_image_as_request.rb → convert_image_request.rb}
RENAMED
@@ -1,5 +1,5 @@
|
|
1
1
|
# ----------------------------------------------------------------------------
|
2
|
-
# <copyright company="Aspose" file="
|
2
|
+
# <copyright company="Aspose" file="convert_image_request.rb">
|
3
3
|
# Copyright (c) 2018-2020 Aspose Pty Ltd. All rights reserved.
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
@@ -28,10 +28,10 @@ require_relative './imaging_request'
|
|
28
28
|
require_relative './http_request'
|
29
29
|
|
30
30
|
module AsposeImagingCloud
|
31
|
-
# Request model for
|
32
|
-
class
|
31
|
+
# Request model for convert_image operation.
|
32
|
+
class ConvertImageRequest < ImagingRequest
|
33
33
|
|
34
|
-
#
|
34
|
+
# Convert existing image to another format.
|
35
35
|
# @param [String] name Filename of image.
|
36
36
|
# @param [String] format Resulting image format. Please, refer to https://docs.aspose.cloud/display/imagingcloud/Supported+File+Formats#SupportedFileFormats-CommonOperationsFormatSupportMap for possible use-cases.
|
37
37
|
# @param [String] folder Folder with image to process.
|
@@ -46,16 +46,16 @@ module AsposeImagingCloud
|
|
46
46
|
def to_http_info(config)
|
47
47
|
# verify the required parameter 'name' is set
|
48
48
|
if config.client_side_validation && @name.nil?
|
49
|
-
raise ArgumentError, "Missing the required parameter 'name' when calling ImagingApi.
|
49
|
+
raise ArgumentError, "Missing the required parameter 'name' when calling ImagingApi.convert_image"
|
50
50
|
end
|
51
51
|
|
52
52
|
# verify the required parameter 'format' is set
|
53
53
|
if config.client_side_validation && @format.nil?
|
54
|
-
raise ArgumentError, "Missing the required parameter 'format' when calling ImagingApi.
|
54
|
+
raise ArgumentError, "Missing the required parameter 'format' when calling ImagingApi.convert_image"
|
55
55
|
end
|
56
56
|
|
57
57
|
# resource path
|
58
|
-
local_var_path = '/imaging/{name}/
|
58
|
+
local_var_path = '/imaging/{name}/convert'.sub('{' + 'name' + '}', @name.to_s)
|
59
59
|
|
60
60
|
# query parameters
|
61
61
|
query_params = {}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# ----------------------------------------------------------------------------
|
2
|
-
# <copyright company="Aspose" file="
|
2
|
+
# <copyright company="Aspose" file="create_converted_image_request.rb">
|
3
3
|
# Copyright (c) 2018-2020 Aspose Pty Ltd. All rights reserved.
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
@@ -28,10 +28,10 @@ require_relative './imaging_request'
|
|
28
28
|
require_relative './http_request'
|
29
29
|
|
30
30
|
module AsposeImagingCloud
|
31
|
-
# Request model for
|
32
|
-
class
|
31
|
+
# Request model for create_converted_image operation.
|
32
|
+
class CreateConvertedImageRequest < ImagingRequest
|
33
33
|
|
34
|
-
#
|
34
|
+
# Convert existing image to another format. Image data is passed as zero-indexed multipart/form-data content or as raw body stream.
|
35
35
|
# @param [File] image_data Input image
|
36
36
|
# @param [String] format Resulting image format. Please, refer to https://docs.aspose.cloud/display/imagingcloud/Supported+File+Formats#SupportedFileFormats-CommonOperationsFormatSupportMap for possible use-cases.
|
37
37
|
# @param [String] out_path Path to updated file (if this is empty, response contains streamed image).
|
@@ -46,16 +46,16 @@ module AsposeImagingCloud
|
|
46
46
|
def to_http_info(config)
|
47
47
|
# verify the required parameter 'image_data' is set
|
48
48
|
if config.client_side_validation && @image_data.nil?
|
49
|
-
raise ArgumentError, "Missing the required parameter 'image_data' when calling ImagingApi.
|
49
|
+
raise ArgumentError, "Missing the required parameter 'image_data' when calling ImagingApi.create_converted_image"
|
50
50
|
end
|
51
51
|
|
52
52
|
# verify the required parameter 'format' is set
|
53
53
|
if config.client_side_validation && @format.nil?
|
54
|
-
raise ArgumentError, "Missing the required parameter 'format' when calling ImagingApi.
|
54
|
+
raise ArgumentError, "Missing the required parameter 'format' when calling ImagingApi.create_converted_image"
|
55
55
|
end
|
56
56
|
|
57
57
|
# resource path
|
58
|
-
local_var_path = '/imaging/
|
58
|
+
local_var_path = '/imaging/convert'
|
59
59
|
|
60
60
|
# query parameters
|
61
61
|
query_params = {}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# ----------------------------------------------------------------------------
|
2
2
|
# <copyright company="Aspose" file="create_fax_tiff_request.rb">
|
3
|
-
# Copyright (c) 2018-
|
3
|
+
# Copyright (c) 2018-2020 Aspose Pty Ltd. All rights reserved.
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
@@ -31,7 +31,7 @@ module AsposeImagingCloud
|
|
31
31
|
# Request model for create_image_frame_range operation.
|
32
32
|
class CreateImageFrameRangeRequest < ImagingRequest
|
33
33
|
|
34
|
-
# Get
|
34
|
+
# Get frames range from existing image. Image data is passed as zero-indexed multipart/form-data content or as raw body stream.
|
35
35
|
# @param [File] image_data Input image
|
36
36
|
# @param [Integer] start_frame_id Index of the first frame in range.
|
37
37
|
# @param [Integer] end_frame_id Index of the last frame in range.
|
@@ -0,0 +1,99 @@
|
|
1
|
+
# ----------------------------------------------------------------------------
|
2
|
+
# <copyright company="Aspose" file="create_object_bounds_request.rb">
|
3
|
+
# Copyright (c) 2018-2020 Aspose Pty Ltd. All rights reserved.
|
4
|
+
# </copyright>
|
5
|
+
# <summary>
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining a
|
7
|
+
# copy of this software and associated documentation files (the "Software"),
|
8
|
+
# to deal in the Software without restriction, including without limitation
|
9
|
+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
10
|
+
# and/or sell copies of the Software, and to permit persons to whom the
|
11
|
+
# Software is furnished to do so, subject to the following conditions:
|
12
|
+
#
|
13
|
+
# The above copyright notice and this permission notice shall be included in
|
14
|
+
# all copies or substantial portions of the Software.
|
15
|
+
#
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
21
|
+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
22
|
+
# DEALINGS IN THE SOFTWARE.
|
23
|
+
# </summary>
|
24
|
+
# ----------------------------------------------------------------------------
|
25
|
+
|
26
|
+
|
27
|
+
require_relative './imaging_request'
|
28
|
+
require_relative './http_request'
|
29
|
+
|
30
|
+
module AsposeImagingCloud
|
31
|
+
# Request model for create_object_bounds operation.
|
32
|
+
class CreateObjectBoundsRequest < ImagingRequest
|
33
|
+
|
34
|
+
# Detects objects bounds. Image data is passed as zero-indexed multipart/form-data content or as raw body stream.
|
35
|
+
# @param [File] image_data Input image
|
36
|
+
# @param [String] method Object detection method
|
37
|
+
# @param [Integer] threshold Object detection probability threshold in percents
|
38
|
+
# @param [BOOLEAN] include_label Draw detected objects labels
|
39
|
+
# @param [BOOLEAN] include_score Draw detected objects scores
|
40
|
+
# @param [String] allowed_labels Comma-separated list of allowed labels
|
41
|
+
# @param [String] blocked_labels Comma-separated list of blocked labels
|
42
|
+
# @param [String] out_path Path to updated file (if this is empty, response contains streamed image)
|
43
|
+
# @param [String] storage Your Aspose Cloud Storage name.
|
44
|
+
def initialize(image_data, method = nil, threshold = nil, include_label = nil, include_score = nil, allowed_labels = nil, blocked_labels = nil, out_path = nil, storage = nil)
|
45
|
+
@image_data = image_data
|
46
|
+
@method = method
|
47
|
+
@threshold = threshold
|
48
|
+
@include_label = include_label
|
49
|
+
@include_score = include_score
|
50
|
+
@allowed_labels = allowed_labels
|
51
|
+
@blocked_labels = blocked_labels
|
52
|
+
@out_path = out_path
|
53
|
+
@storage = storage
|
54
|
+
end
|
55
|
+
|
56
|
+
def to_http_info(config)
|
57
|
+
# verify the required parameter 'image_data' is set
|
58
|
+
if config.client_side_validation && @image_data.nil?
|
59
|
+
raise ArgumentError, "Missing the required parameter 'image_data' when calling ImagingApi.create_object_bounds"
|
60
|
+
end
|
61
|
+
|
62
|
+
# resource path
|
63
|
+
local_var_path = '/imaging/ai/objectdetection/bounds'
|
64
|
+
|
65
|
+
# query parameters
|
66
|
+
query_params = {}
|
67
|
+
query_params[:method] = @method unless @method.nil?
|
68
|
+
query_params[:threshold] = @threshold unless @threshold.nil?
|
69
|
+
query_params[:includeLabel] = @include_label unless @include_label.nil?
|
70
|
+
query_params[:includeScore] = @include_score unless @include_score.nil?
|
71
|
+
query_params[:allowedLabels] = @allowed_labels unless @allowed_labels.nil?
|
72
|
+
query_params[:blockedLabels] = @blocked_labels unless @blocked_labels.nil?
|
73
|
+
query_params[:outPath] = @out_path unless @out_path.nil?
|
74
|
+
query_params[:storage] = @storage unless @storage.nil?
|
75
|
+
|
76
|
+
# form parameters
|
77
|
+
form_params = {}
|
78
|
+
form_params['imageData'] = @image_data
|
79
|
+
|
80
|
+
# http body (model)
|
81
|
+
post_body = nil
|
82
|
+
auth_names = ['JWT']
|
83
|
+
|
84
|
+
# header parameters
|
85
|
+
header_params = {}
|
86
|
+
# HTTP header 'Accept' (if needed)
|
87
|
+
header_params['Accept'] = select_header_accept(['application/json'])
|
88
|
+
# HTTP header 'Content-Type'
|
89
|
+
header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['multipart/form-data'])
|
90
|
+
|
91
|
+
AsposeImagingCloud::HttpRequest.new(local_var_path,
|
92
|
+
header_params,
|
93
|
+
query_params,
|
94
|
+
form_params,
|
95
|
+
post_body,
|
96
|
+
auth_names)
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
@@ -0,0 +1,102 @@
|
|
1
|
+
# ----------------------------------------------------------------------------
|
2
|
+
# <copyright company="Aspose" file="create_visual_object_bounds_request.rb">
|
3
|
+
# Copyright (c) 2018-2020 Aspose Pty Ltd. All rights reserved.
|
4
|
+
# </copyright>
|
5
|
+
# <summary>
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining a
|
7
|
+
# copy of this software and associated documentation files (the "Software"),
|
8
|
+
# to deal in the Software without restriction, including without limitation
|
9
|
+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
10
|
+
# and/or sell copies of the Software, and to permit persons to whom the
|
11
|
+
# Software is furnished to do so, subject to the following conditions:
|
12
|
+
#
|
13
|
+
# The above copyright notice and this permission notice shall be included in
|
14
|
+
# all copies or substantial portions of the Software.
|
15
|
+
#
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
21
|
+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
22
|
+
# DEALINGS IN THE SOFTWARE.
|
23
|
+
# </summary>
|
24
|
+
# ----------------------------------------------------------------------------
|
25
|
+
|
26
|
+
|
27
|
+
require_relative './imaging_request'
|
28
|
+
require_relative './http_request'
|
29
|
+
|
30
|
+
module AsposeImagingCloud
|
31
|
+
# Request model for create_visual_object_bounds operation.
|
32
|
+
class CreateVisualObjectBoundsRequest < ImagingRequest
|
33
|
+
|
34
|
+
# Detects objects bounds and draw them on the original image. Image data is passed as zero-indexed multipart/form-data content or as raw body stream
|
35
|
+
# @param [File] image_data Input image
|
36
|
+
# @param [String] method Object detection method
|
37
|
+
# @param [Integer] threshold Object detection probability threshold in percents
|
38
|
+
# @param [BOOLEAN] include_label Draw detected objects classes
|
39
|
+
# @param [BOOLEAN] include_score Draw detected objects scores
|
40
|
+
# @param [String] allowed_labels Comma-separated list of allowed labels
|
41
|
+
# @param [String] blocked_labels Comma-separated list of blocked labels
|
42
|
+
# @param [String] color Bounds, labels, and scores text color
|
43
|
+
# @param [String] out_path Path to updated file (if this is empty, response contains streamed image)
|
44
|
+
# @param [String] storage Your Aspose Cloud Storage name.
|
45
|
+
def initialize(image_data, method = nil, threshold = nil, include_label = nil, include_score = nil, allowed_labels = nil, blocked_labels = nil, color = nil, out_path = nil, storage = nil)
|
46
|
+
@image_data = image_data
|
47
|
+
@method = method
|
48
|
+
@threshold = threshold
|
49
|
+
@include_label = include_label
|
50
|
+
@include_score = include_score
|
51
|
+
@allowed_labels = allowed_labels
|
52
|
+
@blocked_labels = blocked_labels
|
53
|
+
@color = color
|
54
|
+
@out_path = out_path
|
55
|
+
@storage = storage
|
56
|
+
end
|
57
|
+
|
58
|
+
def to_http_info(config)
|
59
|
+
# verify the required parameter 'image_data' is set
|
60
|
+
if config.client_side_validation && @image_data.nil?
|
61
|
+
raise ArgumentError, "Missing the required parameter 'image_data' when calling ImagingApi.create_visual_object_bounds"
|
62
|
+
end
|
63
|
+
|
64
|
+
# resource path
|
65
|
+
local_var_path = '/imaging/ai/objectdetection/visualbounds'
|
66
|
+
|
67
|
+
# query parameters
|
68
|
+
query_params = {}
|
69
|
+
query_params[:method] = @method unless @method.nil?
|
70
|
+
query_params[:threshold] = @threshold unless @threshold.nil?
|
71
|
+
query_params[:includeLabel] = @include_label unless @include_label.nil?
|
72
|
+
query_params[:includeScore] = @include_score unless @include_score.nil?
|
73
|
+
query_params[:allowedLabels] = @allowed_labels unless @allowed_labels.nil?
|
74
|
+
query_params[:blockedLabels] = @blocked_labels unless @blocked_labels.nil?
|
75
|
+
query_params[:color] = @color unless @color.nil?
|
76
|
+
query_params[:outPath] = @out_path unless @out_path.nil?
|
77
|
+
query_params[:storage] = @storage unless @storage.nil?
|
78
|
+
|
79
|
+
# form parameters
|
80
|
+
form_params = {}
|
81
|
+
form_params['imageData'] = @image_data
|
82
|
+
|
83
|
+
# http body (model)
|
84
|
+
post_body = nil
|
85
|
+
auth_names = ['JWT']
|
86
|
+
|
87
|
+
# header parameters
|
88
|
+
header_params = {}
|
89
|
+
# HTTP header 'Accept' (if needed)
|
90
|
+
header_params['Accept'] = select_header_accept(['application/json'])
|
91
|
+
# HTTP header 'Content-Type'
|
92
|
+
header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['multipart/form-data'])
|
93
|
+
|
94
|
+
AsposeImagingCloud::HttpRequest.new(local_var_path,
|
95
|
+
header_params,
|
96
|
+
query_params,
|
97
|
+
form_params,
|
98
|
+
post_body,
|
99
|
+
auth_names)
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
@@ -0,0 +1,74 @@
|
|
1
|
+
# ----------------------------------------------------------------------------
|
2
|
+
# <copyright company="Aspose" file="get_available_labels_request.rb">
|
3
|
+
# Copyright (c) 2018-2020 Aspose Pty Ltd. All rights reserved.
|
4
|
+
# </copyright>
|
5
|
+
# <summary>
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining a
|
7
|
+
# copy of this software and associated documentation files (the "Software"),
|
8
|
+
# to deal in the Software without restriction, including without limitation
|
9
|
+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
10
|
+
# and/or sell copies of the Software, and to permit persons to whom the
|
11
|
+
# Software is furnished to do so, subject to the following conditions:
|
12
|
+
#
|
13
|
+
# The above copyright notice and this permission notice shall be included in
|
14
|
+
# all copies or substantial portions of the Software.
|
15
|
+
#
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
21
|
+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
22
|
+
# DEALINGS IN THE SOFTWARE.
|
23
|
+
# </summary>
|
24
|
+
# ----------------------------------------------------------------------------
|
25
|
+
|
26
|
+
|
27
|
+
require_relative './imaging_request'
|
28
|
+
require_relative './http_request'
|
29
|
+
|
30
|
+
module AsposeImagingCloud
|
31
|
+
# Request model for get_available_labels operation.
|
32
|
+
class GetAvailableLabelsRequest < ImagingRequest
|
33
|
+
|
34
|
+
# Gets available labels for selected object detection method.
|
35
|
+
# @param [String] method Object detection method
|
36
|
+
def initialize(method)
|
37
|
+
@method = method
|
38
|
+
end
|
39
|
+
|
40
|
+
def to_http_info(config)
|
41
|
+
# verify the required parameter 'method' is set
|
42
|
+
if config.client_side_validation && @method.nil?
|
43
|
+
raise ArgumentError, "Missing the required parameter 'method' when calling ImagingApi.get_available_labels"
|
44
|
+
end
|
45
|
+
|
46
|
+
# resource path
|
47
|
+
local_var_path = '/imaging/ai/objectdetection/availablelabels/{method}'.sub('{' + 'method' + '}', @method.to_s)
|
48
|
+
|
49
|
+
# query parameters
|
50
|
+
query_params = {}
|
51
|
+
|
52
|
+
# form parameters
|
53
|
+
form_params = {}
|
54
|
+
|
55
|
+
# http body (model)
|
56
|
+
post_body = nil
|
57
|
+
auth_names = ['JWT']
|
58
|
+
|
59
|
+
# header parameters
|
60
|
+
header_params = {}
|
61
|
+
# HTTP header 'Accept' (if needed)
|
62
|
+
header_params['Accept'] = select_header_accept(['application/json'])
|
63
|
+
# HTTP header 'Content-Type'
|
64
|
+
header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['application/json'])
|
65
|
+
|
66
|
+
AsposeImagingCloud::HttpRequest.new(local_var_path,
|
67
|
+
header_params,
|
68
|
+
query_params,
|
69
|
+
form_params,
|
70
|
+
post_body,
|
71
|
+
auth_names)
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
@@ -0,0 +1,98 @@
|
|
1
|
+
# ----------------------------------------------------------------------------
|
2
|
+
# <copyright company="Aspose" file="get_object_bounds_request.rb">
|
3
|
+
# Copyright (c) 2018-2020 Aspose Pty Ltd. All rights reserved.
|
4
|
+
# </copyright>
|
5
|
+
# <summary>
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining a
|
7
|
+
# copy of this software and associated documentation files (the "Software"),
|
8
|
+
# to deal in the Software without restriction, including without limitation
|
9
|
+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
10
|
+
# and/or sell copies of the Software, and to permit persons to whom the
|
11
|
+
# Software is furnished to do so, subject to the following conditions:
|
12
|
+
#
|
13
|
+
# The above copyright notice and this permission notice shall be included in
|
14
|
+
# all copies or substantial portions of the Software.
|
15
|
+
#
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
21
|
+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
22
|
+
# DEALINGS IN THE SOFTWARE.
|
23
|
+
# </summary>
|
24
|
+
# ----------------------------------------------------------------------------
|
25
|
+
|
26
|
+
|
27
|
+
require_relative './imaging_request'
|
28
|
+
require_relative './http_request'
|
29
|
+
|
30
|
+
module AsposeImagingCloud
|
31
|
+
# Request model for get_object_bounds operation.
|
32
|
+
class GetObjectBoundsRequest < ImagingRequest
|
33
|
+
|
34
|
+
# Detects objects' bounds
|
35
|
+
# @param [String] name Image file name.
|
36
|
+
# @param [String] method Object detection method
|
37
|
+
# @param [Integer] threshold Object detection probability threshold in percents
|
38
|
+
# @param [BOOLEAN] include_label Return detected objects labels
|
39
|
+
# @param [BOOLEAN] include_score Return detected objects score
|
40
|
+
# @param [String] allowed_labels Comma-separated list of allowed labels
|
41
|
+
# @param [String] blocked_labels Comma-separated list of blocked labels
|
42
|
+
# @param [String] folder Folder
|
43
|
+
# @param [String] storage Storage
|
44
|
+
def initialize(name, method = nil, threshold = nil, include_label = nil, include_score = nil, allowed_labels = nil, blocked_labels = nil, folder = nil, storage = nil)
|
45
|
+
@name = name
|
46
|
+
@method = method
|
47
|
+
@threshold = threshold
|
48
|
+
@include_label = include_label
|
49
|
+
@include_score = include_score
|
50
|
+
@allowed_labels = allowed_labels
|
51
|
+
@blocked_labels = blocked_labels
|
52
|
+
@folder = folder
|
53
|
+
@storage = storage
|
54
|
+
end
|
55
|
+
|
56
|
+
def to_http_info(config)
|
57
|
+
# verify the required parameter 'name' is set
|
58
|
+
if config.client_side_validation && @name.nil?
|
59
|
+
raise ArgumentError, "Missing the required parameter 'name' when calling ImagingApi.get_object_bounds"
|
60
|
+
end
|
61
|
+
|
62
|
+
# resource path
|
63
|
+
local_var_path = '/imaging/ai/objectdetection/{name}/bounds'.sub('{' + 'name' + '}', @name.to_s)
|
64
|
+
|
65
|
+
# query parameters
|
66
|
+
query_params = {}
|
67
|
+
query_params[:method] = @method unless @method.nil?
|
68
|
+
query_params[:threshold] = @threshold unless @threshold.nil?
|
69
|
+
query_params[:includeLabel] = @include_label unless @include_label.nil?
|
70
|
+
query_params[:includeScore] = @include_score unless @include_score.nil?
|
71
|
+
query_params[:allowedLabels] = @allowed_labels unless @allowed_labels.nil?
|
72
|
+
query_params[:blockedLabels] = @blocked_labels unless @blocked_labels.nil?
|
73
|
+
query_params[:folder] = @folder unless @folder.nil?
|
74
|
+
query_params[:storage] = @storage unless @storage.nil?
|
75
|
+
|
76
|
+
# form parameters
|
77
|
+
form_params = {}
|
78
|
+
|
79
|
+
# http body (model)
|
80
|
+
post_body = nil
|
81
|
+
auth_names = ['JWT']
|
82
|
+
|
83
|
+
# header parameters
|
84
|
+
header_params = {}
|
85
|
+
# HTTP header 'Accept' (if needed)
|
86
|
+
header_params['Accept'] = select_header_accept(['application/json'])
|
87
|
+
# HTTP header 'Content-Type'
|
88
|
+
header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['application/json'])
|
89
|
+
|
90
|
+
AsposeImagingCloud::HttpRequest.new(local_var_path,
|
91
|
+
header_params,
|
92
|
+
query_params,
|
93
|
+
form_params,
|
94
|
+
post_body,
|
95
|
+
auth_names)
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|