aspose_imaging_cloud 1.0.0 → 19.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (161) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +224 -61
  3. data/lib/aspose-imaging-cloud.rb +161 -0
  4. data/lib/aspose-imaging-cloud/api/imaging_api.rb +684 -0
  5. data/lib/aspose-imaging-cloud/api_client.rb +357 -0
  6. data/lib/aspose-imaging-cloud/api_error.rb +42 -0
  7. data/lib/{aspose_imaging_cloud → aspose-imaging-cloud}/configuration.rb +236 -166
  8. data/lib/aspose-imaging-cloud/models/big_rectangular_filter_properties.rb +206 -0
  9. data/lib/aspose-imaging-cloud/models/bilateral_smoothing_filter_properties.rb +281 -0
  10. data/lib/aspose-imaging-cloud/models/bmp_properties.rb +202 -0
  11. data/lib/aspose-imaging-cloud/models/convolution_filter_properties.rb +236 -0
  12. data/lib/aspose-imaging-cloud/models/deconvolution_filter_properties.rb +266 -0
  13. data/lib/aspose-imaging-cloud/models/dicom_properties.rb +584 -0
  14. data/lib/aspose-imaging-cloud/models/disc_usage.rb +222 -0
  15. data/lib/aspose-imaging-cloud/models/djvu_properties.rb +232 -0
  16. data/lib/aspose-imaging-cloud/models/dng_properties.rb +329 -0
  17. data/lib/aspose-imaging-cloud/models/error.rb +232 -0
  18. data/lib/aspose-imaging-cloud/models/error_details.rb +217 -0
  19. data/lib/aspose-imaging-cloud/models/exif_data.rb +1560 -0
  20. data/lib/aspose-imaging-cloud/models/file_version.rb +277 -0
  21. data/lib/aspose-imaging-cloud/models/file_versions.rb +204 -0
  22. data/lib/aspose-imaging-cloud/models/files_list.rb +204 -0
  23. data/lib/aspose-imaging-cloud/models/files_upload_result.rb +216 -0
  24. data/lib/aspose-imaging-cloud/models/filter_properties_base.rb +206 -0
  25. data/lib/aspose-imaging-cloud/models/gauss_wiener_filter_properties.rb +296 -0
  26. data/lib/aspose-imaging-cloud/models/gaussian_blur_filter_properties.rb +266 -0
  27. data/lib/aspose-imaging-cloud/models/gif_properties.rb +247 -0
  28. data/lib/aspose-imaging-cloud/models/image_duplicates.rb +204 -0
  29. data/lib/aspose-imaging-cloud/models/image_duplicates_set.rb +204 -0
  30. data/lib/aspose-imaging-cloud/models/image_features.rb +257 -0
  31. data/lib/aspose-imaging-cloud/models/imaging_response.rb +412 -0
  32. data/lib/aspose-imaging-cloud/models/jfif_data.rb +247 -0
  33. data/lib/aspose-imaging-cloud/models/jpeg2000_properties.rb +214 -0
  34. data/lib/aspose-imaging-cloud/models/jpeg_exif_data.rb +1738 -0
  35. data/lib/aspose-imaging-cloud/models/jpeg_properties.rb +222 -0
  36. data/lib/aspose-imaging-cloud/models/median_filter_properties.rb +221 -0
  37. data/lib/aspose-imaging-cloud/models/motion_wiener_filter_properties.rb +311 -0
  38. data/lib/aspose-imaging-cloud/models/object_exist.rb +222 -0
  39. data/lib/aspose-imaging-cloud/models/odg_metadata.rb +372 -0
  40. data/lib/aspose-imaging-cloud/models/odg_page.rb +222 -0
  41. data/lib/aspose-imaging-cloud/models/odg_properties.rb +229 -0
  42. data/lib/aspose-imaging-cloud/models/png_properties.rb +192 -0
  43. data/lib/aspose-imaging-cloud/models/psd_properties.rb +242 -0
  44. data/lib/aspose-imaging-cloud/models/requests/add_search_image_request.rb +91 -0
  45. data/lib/aspose-imaging-cloud/models/requests/append_tiff_request.rb +88 -0
  46. data/lib/aspose-imaging-cloud/models/requests/compare_images_request.rb +94 -0
  47. data/lib/aspose-imaging-cloud/models/requests/convert_tiff_to_fax_request.rb +80 -0
  48. data/lib/aspose-imaging-cloud/models/requests/copy_file_request.rb +91 -0
  49. data/lib/aspose-imaging-cloud/models/requests/copy_folder_request.rb +88 -0
  50. data/lib/aspose-imaging-cloud/models/requests/create_cropped_image_request.rb +121 -0
  51. data/lib/aspose-imaging-cloud/models/requests/create_folder_request.rb +77 -0
  52. data/lib/aspose-imaging-cloud/models/requests/create_image_features_request.rb +89 -0
  53. data/lib/aspose-imaging-cloud/models/requests/create_image_frame_request.rb +112 -0
  54. data/lib/aspose-imaging-cloud/models/requests/create_image_search_request.rb +79 -0
  55. data/lib/aspose-imaging-cloud/models/requests/create_image_tag_request.rb +96 -0
  56. data/lib/aspose-imaging-cloud/models/requests/create_modified_bmp_request.rb +108 -0
  57. data/lib/aspose-imaging-cloud/models/requests/create_modified_emf_request.rb +127 -0
  58. data/lib/aspose-imaging-cloud/models/requests/create_modified_gif_request.rb +102 -0
  59. data/lib/aspose-imaging-cloud/models/requests/create_modified_jpeg2000_request.rb +95 -0
  60. data/lib/aspose-imaging-cloud/models/requests/create_modified_jpeg_request.rb +90 -0
  61. data/lib/aspose-imaging-cloud/models/requests/create_modified_psd_request.rb +90 -0
  62. data/lib/aspose-imaging-cloud/models/requests/create_modified_svg_request.rb +114 -0
  63. data/lib/aspose-imaging-cloud/models/requests/create_modified_tiff_request.rb +104 -0
  64. data/lib/aspose-imaging-cloud/models/requests/create_modified_web_p_request.rb +116 -0
  65. data/lib/aspose-imaging-cloud/models/requests/create_modified_wmf_request.rb +127 -0
  66. data/lib/aspose-imaging-cloud/models/requests/create_resized_image_request.rb +105 -0
  67. data/lib/aspose-imaging-cloud/models/requests/create_rotate_flipped_image_request.rb +97 -0
  68. data/lib/aspose-imaging-cloud/models/requests/create_saved_image_as_request.rb +89 -0
  69. data/lib/aspose-imaging-cloud/models/requests/create_updated_image_request.rb +145 -0
  70. data/lib/aspose-imaging-cloud/models/requests/create_web_site_image_features_request.rb +88 -0
  71. data/lib/aspose-imaging-cloud/models/requests/crop_image_request.rb +120 -0
  72. data/lib/aspose-imaging-cloud/models/requests/delete_file_request.rb +80 -0
  73. data/lib/aspose-imaging-cloud/models/requests/delete_folder_request.rb +80 -0
  74. data/lib/aspose-imaging-cloud/models/requests/delete_image_features_request.rb +88 -0
  75. data/lib/aspose-imaging-cloud/models/requests/delete_image_search_request.rb +80 -0
  76. data/lib/aspose-imaging-cloud/models/requests/delete_search_image_request.rb +88 -0
  77. data/lib/aspose-imaging-cloud/models/requests/download_file_request.rb +80 -0
  78. data/lib/aspose-imaging-cloud/models/requests/extract_image_features_request.rb +91 -0
  79. data/lib/aspose-imaging-cloud/models/requests/extract_image_frame_properties_request.rb +82 -0
  80. data/lib/aspose-imaging-cloud/models/requests/extract_image_properties_request.rb +75 -0
  81. data/lib/aspose-imaging-cloud/models/requests/filter_effect_image_request.rb +103 -0
  82. data/lib/aspose-imaging-cloud/models/requests/find_image_duplicates_request.rb +88 -0
  83. data/lib/aspose-imaging-cloud/models/requests/find_images_by_tags_request.rb +104 -0
  84. data/lib/aspose-imaging-cloud/models/requests/find_similar_images_request.rb +102 -0
  85. data/lib/aspose-imaging-cloud/models/requests/get_disc_usage_request.rb +70 -0
  86. data/lib/aspose-imaging-cloud/models/requests/get_file_versions_request.rb +77 -0
  87. data/lib/aspose-imaging-cloud/models/requests/get_files_list_request.rb +77 -0
  88. data/lib/aspose-imaging-cloud/models/requests/get_image_features_request.rb +88 -0
  89. data/lib/aspose-imaging-cloud/models/requests/get_image_frame_properties_request.rb +87 -0
  90. data/lib/aspose-imaging-cloud/models/requests/get_image_frame_request.rb +111 -0
  91. data/lib/aspose-imaging-cloud/models/requests/get_image_properties_request.rb +80 -0
  92. data/lib/aspose-imaging-cloud/models/requests/get_image_search_status_request.rb +80 -0
  93. data/lib/aspose-imaging-cloud/models/requests/get_search_image_request.rb +88 -0
  94. data/lib/aspose-imaging-cloud/models/requests/http_request.rb +50 -0
  95. data/lib/aspose-imaging-cloud/models/requests/imaging_request.rb +101 -0
  96. data/lib/aspose-imaging-cloud/models/requests/modify_bmp_request.rb +107 -0
  97. data/lib/aspose-imaging-cloud/models/requests/modify_emf_request.rb +126 -0
  98. data/lib/aspose-imaging-cloud/models/requests/modify_gif_request.rb +101 -0
  99. data/lib/aspose-imaging-cloud/models/requests/modify_jpeg2000_request.rb +94 -0
  100. data/lib/aspose-imaging-cloud/models/requests/modify_jpeg_request.rb +89 -0
  101. data/lib/aspose-imaging-cloud/models/requests/modify_psd_request.rb +89 -0
  102. data/lib/aspose-imaging-cloud/models/requests/modify_svg_request.rb +113 -0
  103. data/lib/aspose-imaging-cloud/models/requests/modify_tiff_request.rb +103 -0
  104. data/lib/aspose-imaging-cloud/models/requests/modify_web_p_request.rb +115 -0
  105. data/lib/aspose-imaging-cloud/models/requests/modify_wmf_request.rb +126 -0
  106. data/lib/aspose-imaging-cloud/models/requests/move_file_request.rb +91 -0
  107. data/lib/aspose-imaging-cloud/models/requests/move_folder_request.rb +88 -0
  108. data/lib/aspose-imaging-cloud/models/requests/object_exists_request.rb +80 -0
  109. data/lib/aspose-imaging-cloud/models/requests/resize_image_request.rb +104 -0
  110. data/lib/aspose-imaging-cloud/models/requests/rotate_flip_image_request.rb +96 -0
  111. data/lib/aspose-imaging-cloud/models/requests/save_image_as_request.rb +88 -0
  112. data/lib/aspose-imaging-cloud/models/requests/storage_exists_request.rb +74 -0
  113. data/lib/aspose-imaging-cloud/models/requests/update_image_features_request.rb +91 -0
  114. data/lib/aspose-imaging-cloud/models/requests/update_image_request.rb +144 -0
  115. data/lib/aspose-imaging-cloud/models/requests/update_search_image_request.rb +91 -0
  116. data/lib/aspose-imaging-cloud/models/requests/upload_file_request.rb +86 -0
  117. data/lib/aspose-imaging-cloud/models/search_context_status.rb +212 -0
  118. data/lib/aspose-imaging-cloud/models/search_result.rb +217 -0
  119. data/lib/aspose-imaging-cloud/models/search_results_set.rb +204 -0
  120. data/lib/aspose-imaging-cloud/models/sharpen_filter_properties.rb +266 -0
  121. data/lib/aspose-imaging-cloud/models/small_rectangular_filter_properties.rb +206 -0
  122. data/lib/aspose-imaging-cloud/models/storage_exist.rb +207 -0
  123. data/lib/aspose-imaging-cloud/models/storage_file.rb +252 -0
  124. data/lib/aspose-imaging-cloud/models/svg_properties.rb +202 -0
  125. data/lib/aspose-imaging-cloud/models/tiff_frame.rb +242 -0
  126. data/lib/aspose-imaging-cloud/models/tiff_options.rb +734 -0
  127. data/lib/aspose-imaging-cloud/models/tiff_properties.rb +224 -0
  128. data/lib/aspose-imaging-cloud/models/web_p_properties.rb +252 -0
  129. data/lib/aspose-imaging-cloud/version.rb +15 -0
  130. metadata +149 -129
  131. data/LICENSE +0 -22
  132. data/aspose_imaging_cloud.gemspec +0 -26
  133. data/lib/aspose_imaging_cloud.rb +0 -43
  134. data/lib/aspose_imaging_cloud/api/imaging_api.rb +0 -1776
  135. data/lib/aspose_imaging_cloud/api_client.rb +0 -335
  136. data/lib/aspose_imaging_cloud/api_error.rb +0 -24
  137. data/lib/aspose_imaging_cloud/models/base_object.rb +0 -86
  138. data/lib/aspose_imaging_cloud/models/base_response.rb +0 -53
  139. data/lib/aspose_imaging_cloud/models/bmp_properties.rb +0 -37
  140. data/lib/aspose_imaging_cloud/models/exif_data.rb +0 -855
  141. data/lib/aspose_imaging_cloud/models/gif_properties.rb +0 -53
  142. data/lib/aspose_imaging_cloud/models/imaging_response.rb +0 -149
  143. data/lib/aspose_imaging_cloud/models/jfif_data.rb +0 -61
  144. data/lib/aspose_imaging_cloud/models/jpeg_exif_data.rb +0 -991
  145. data/lib/aspose_imaging_cloud/models/jpeg_properties.rb +0 -53
  146. data/lib/aspose_imaging_cloud/models/psd_properties.rb +0 -61
  147. data/lib/aspose_imaging_cloud/models/tiff_frame.rb +0 -61
  148. data/lib/aspose_imaging_cloud/models/tiff_options.rb +0 -419
  149. data/lib/aspose_imaging_cloud/models/tiff_properties.rb +0 -55
  150. data/lib/aspose_imaging_cloud/version.rb +0 -3
  151. data/test/data/TestDemo.tif +0 -0
  152. data/test/data/aspose.jpg +0 -0
  153. data/test/data/aspose_imaging_for_cloud.png +0 -0
  154. data/test/data/demo.tif +0 -0
  155. data/test/data/sample-multi.tif +0 -0
  156. data/test/data/sample.bmp +0 -0
  157. data/test/data/sample.gif +0 -0
  158. data/test/data/sample.psd +0 -0
  159. data/test/data/sample.tif +0 -0
  160. data/test/data/test.bmp +0 -0
  161. data/test/imaging_tests.rb +0 -291
@@ -0,0 +1,584 @@
1
+ # ----------------------------------------------------------------------------
2
+ # <copyright company="Aspose" file="dicom_properties.rb">
3
+ # Copyright (c) 2018-2019 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 'date'
28
+
29
+ module AsposeImagingCloud
30
+ # Represents information about image in dicom format.
31
+ class DicomProperties
32
+ # Gets or sets the planar configuration.
33
+ attr_accessor :planar_configuration
34
+
35
+ # Gets or sets the array of red colors.
36
+ attr_accessor :reds
37
+
38
+ # Gets or sets the array of green colors.
39
+ attr_accessor :greens
40
+
41
+ # Gets or sets the array of blue colors.
42
+ attr_accessor :blues
43
+
44
+ # Gets or sets the header information by bytes.
45
+ attr_accessor :dicom_header_info_by_bytes
46
+
47
+ # Gets or sets a value indicating whether it's a signed image.
48
+ attr_accessor :signed_image
49
+
50
+ # Gets or sets the header information of the DICOM file.
51
+ attr_accessor :dicom_info
52
+
53
+ # Gets or sets samples per pixel count.
54
+ attr_accessor :samples_per_pixel
55
+
56
+ # Gets or sets allocated bits count.
57
+ attr_accessor :bits_allocated
58
+
59
+ # Gets or sets the photo interpretation.
60
+ attr_accessor :photo_interpretation
61
+
62
+ # Gets or sets a value indicating whether width tag found.
63
+ attr_accessor :width_tag_found
64
+
65
+ # Gets or sets a value indicating whether height tag found.
66
+ attr_accessor :height_tag_found
67
+
68
+ # Gets or sets the width.
69
+ attr_accessor :width
70
+
71
+ # Gets or sets the height.
72
+ attr_accessor :height
73
+
74
+ # Gets or sets the window centre.
75
+ attr_accessor :window_centre
76
+
77
+ # Gets or sets the width of the window.
78
+ attr_accessor :window_width
79
+
80
+ # Gets or sets data representation of the pixel samples.
81
+ attr_accessor :pixel_representation
82
+
83
+ # Gets or sets a value of the rescale intercept.
84
+ attr_accessor :rescale_intercept
85
+
86
+ # Gets or sets a value of the rescale slope.
87
+ attr_accessor :rescale_slope
88
+
89
+ # Gets or sets the number of frames.
90
+ attr_accessor :number_of_frames
91
+
92
+ # Gets or sets the length of element.
93
+ attr_accessor :length_value
94
+
95
+ # Indicates if DICOM image has little endian byte order.
96
+ attr_accessor :is_little_endian
97
+
98
+ # Gets or sets the offset.
99
+ attr_accessor :offset
100
+
101
+ # Gets or sets a value indicating whether \"DICOM\" data is found.
102
+ attr_accessor :dicom_found
103
+
104
+ # Attribute mapping from ruby-style variable name to JSON key.
105
+ def self.attribute_map
106
+ {
107
+ :'planar_configuration' => :'PlanarConfiguration',
108
+ :'reds' => :'Reds',
109
+ :'greens' => :'Greens',
110
+ :'blues' => :'Blues',
111
+ :'dicom_header_info_by_bytes' => :'DicomHeaderInfoByBytes',
112
+ :'signed_image' => :'SignedImage',
113
+ :'dicom_info' => :'DicomInfo',
114
+ :'samples_per_pixel' => :'SamplesPerPixel',
115
+ :'bits_allocated' => :'BitsAllocated',
116
+ :'photo_interpretation' => :'PhotoInterpretation',
117
+ :'width_tag_found' => :'WidthTagFound',
118
+ :'height_tag_found' => :'HeightTagFound',
119
+ :'width' => :'Width',
120
+ :'height' => :'Height',
121
+ :'window_centre' => :'WindowCentre',
122
+ :'window_width' => :'WindowWidth',
123
+ :'pixel_representation' => :'PixelRepresentation',
124
+ :'rescale_intercept' => :'RescaleIntercept',
125
+ :'rescale_slope' => :'RescaleSlope',
126
+ :'number_of_frames' => :'NumberOfFrames',
127
+ :'length_value' => :'LengthValue',
128
+ :'is_little_endian' => :'IsLittleEndian',
129
+ :'offset' => :'Offset',
130
+ :'dicom_found' => :'DicomFound'
131
+ }
132
+ end
133
+
134
+ # Attribute type mapping.
135
+ def self.swagger_types
136
+ {
137
+ :'planar_configuration' => :'Integer',
138
+ :'reds' => :'String',
139
+ :'greens' => :'String',
140
+ :'blues' => :'String',
141
+ :'dicom_header_info_by_bytes' => :'String',
142
+ :'signed_image' => :'BOOLEAN',
143
+ :'dicom_info' => :'Array<String>',
144
+ :'samples_per_pixel' => :'Integer',
145
+ :'bits_allocated' => :'Integer',
146
+ :'photo_interpretation' => :'String',
147
+ :'width_tag_found' => :'BOOLEAN',
148
+ :'height_tag_found' => :'BOOLEAN',
149
+ :'width' => :'Integer',
150
+ :'height' => :'Integer',
151
+ :'window_centre' => :'Float',
152
+ :'window_width' => :'Float',
153
+ :'pixel_representation' => :'Integer',
154
+ :'rescale_intercept' => :'Float',
155
+ :'rescale_slope' => :'Float',
156
+ :'number_of_frames' => :'Integer',
157
+ :'length_value' => :'Integer',
158
+ :'is_little_endian' => :'BOOLEAN',
159
+ :'offset' => :'Integer',
160
+ :'dicom_found' => :'BOOLEAN'
161
+ }
162
+ end
163
+
164
+ # Initializes the object
165
+ # @param [Hash] attributes Model attributes in the form of hash
166
+ def initialize(attributes = {})
167
+ return unless attributes.is_a?(Hash)
168
+
169
+ # convert string to symbol for hash key
170
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
171
+
172
+ if attributes.has_key?(:'PlanarConfiguration')
173
+ self.planar_configuration = attributes[:'PlanarConfiguration']
174
+ end
175
+
176
+ if attributes.has_key?(:'Reds')
177
+ self.reds = attributes[:'Reds']
178
+ end
179
+
180
+ if attributes.has_key?(:'Greens')
181
+ self.greens = attributes[:'Greens']
182
+ end
183
+
184
+ if attributes.has_key?(:'Blues')
185
+ self.blues = attributes[:'Blues']
186
+ end
187
+
188
+ if attributes.has_key?(:'DicomHeaderInfoByBytes')
189
+ self.dicom_header_info_by_bytes = attributes[:'DicomHeaderInfoByBytes']
190
+ end
191
+
192
+ if attributes.has_key?(:'SignedImage')
193
+ self.signed_image = attributes[:'SignedImage']
194
+ end
195
+
196
+ if attributes.has_key?(:'DicomInfo')
197
+ if (value = attributes[:'DicomInfo']).is_a?(Array)
198
+ self.dicom_info = value
199
+ end
200
+ end
201
+
202
+ if attributes.has_key?(:'SamplesPerPixel')
203
+ self.samples_per_pixel = attributes[:'SamplesPerPixel']
204
+ end
205
+
206
+ if attributes.has_key?(:'BitsAllocated')
207
+ self.bits_allocated = attributes[:'BitsAllocated']
208
+ end
209
+
210
+ if attributes.has_key?(:'PhotoInterpretation')
211
+ self.photo_interpretation = attributes[:'PhotoInterpretation']
212
+ end
213
+
214
+ if attributes.has_key?(:'WidthTagFound')
215
+ self.width_tag_found = attributes[:'WidthTagFound']
216
+ end
217
+
218
+ if attributes.has_key?(:'HeightTagFound')
219
+ self.height_tag_found = attributes[:'HeightTagFound']
220
+ end
221
+
222
+ if attributes.has_key?(:'Width')
223
+ self.width = attributes[:'Width']
224
+ end
225
+
226
+ if attributes.has_key?(:'Height')
227
+ self.height = attributes[:'Height']
228
+ end
229
+
230
+ if attributes.has_key?(:'WindowCentre')
231
+ self.window_centre = attributes[:'WindowCentre']
232
+ end
233
+
234
+ if attributes.has_key?(:'WindowWidth')
235
+ self.window_width = attributes[:'WindowWidth']
236
+ end
237
+
238
+ if attributes.has_key?(:'PixelRepresentation')
239
+ self.pixel_representation = attributes[:'PixelRepresentation']
240
+ end
241
+
242
+ if attributes.has_key?(:'RescaleIntercept')
243
+ self.rescale_intercept = attributes[:'RescaleIntercept']
244
+ end
245
+
246
+ if attributes.has_key?(:'RescaleSlope')
247
+ self.rescale_slope = attributes[:'RescaleSlope']
248
+ end
249
+
250
+ if attributes.has_key?(:'NumberOfFrames')
251
+ self.number_of_frames = attributes[:'NumberOfFrames']
252
+ end
253
+
254
+ if attributes.has_key?(:'LengthValue')
255
+ self.length_value = attributes[:'LengthValue']
256
+ end
257
+
258
+ if attributes.has_key?(:'IsLittleEndian')
259
+ self.is_little_endian = attributes[:'IsLittleEndian']
260
+ end
261
+
262
+ if attributes.has_key?(:'Offset')
263
+ self.offset = attributes[:'Offset']
264
+ end
265
+
266
+ if attributes.has_key?(:'DicomFound')
267
+ self.dicom_found = attributes[:'DicomFound']
268
+ end
269
+ end
270
+
271
+ # Show invalid properties with the reasons. Usually used together with valid?
272
+ # @return Array for valid properties with the reasons
273
+ def list_invalid_properties
274
+ invalid_properties = Array.new
275
+ if @planar_configuration.nil?
276
+ invalid_properties.push('invalid value for "planar_configuration", planar_configuration cannot be nil.')
277
+ end
278
+
279
+ if !@reds.nil? && @reds !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
280
+ invalid_properties.push('invalid value for "reds", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.')
281
+ end
282
+
283
+ if !@greens.nil? && @greens !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
284
+ invalid_properties.push('invalid value for "greens", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.')
285
+ end
286
+
287
+ if !@blues.nil? && @blues !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
288
+ invalid_properties.push('invalid value for "blues", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.')
289
+ end
290
+
291
+ if !@dicom_header_info_by_bytes.nil? && @dicom_header_info_by_bytes !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
292
+ invalid_properties.push('invalid value for "dicom_header_info_by_bytes", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.')
293
+ end
294
+
295
+ if @signed_image.nil?
296
+ invalid_properties.push('invalid value for "signed_image", signed_image cannot be nil.')
297
+ end
298
+
299
+ if @samples_per_pixel.nil?
300
+ invalid_properties.push('invalid value for "samples_per_pixel", samples_per_pixel cannot be nil.')
301
+ end
302
+
303
+ if @bits_allocated.nil?
304
+ invalid_properties.push('invalid value for "bits_allocated", bits_allocated cannot be nil.')
305
+ end
306
+
307
+ if @width_tag_found.nil?
308
+ invalid_properties.push('invalid value for "width_tag_found", width_tag_found cannot be nil.')
309
+ end
310
+
311
+ if @height_tag_found.nil?
312
+ invalid_properties.push('invalid value for "height_tag_found", height_tag_found cannot be nil.')
313
+ end
314
+
315
+ if @width.nil?
316
+ invalid_properties.push('invalid value for "width", width cannot be nil.')
317
+ end
318
+
319
+ if @height.nil?
320
+ invalid_properties.push('invalid value for "height", height cannot be nil.')
321
+ end
322
+
323
+ if @window_centre.nil?
324
+ invalid_properties.push('invalid value for "window_centre", window_centre cannot be nil.')
325
+ end
326
+
327
+ if @window_width.nil?
328
+ invalid_properties.push('invalid value for "window_width", window_width cannot be nil.')
329
+ end
330
+
331
+ if @pixel_representation.nil?
332
+ invalid_properties.push('invalid value for "pixel_representation", pixel_representation cannot be nil.')
333
+ end
334
+
335
+ if @rescale_intercept.nil?
336
+ invalid_properties.push('invalid value for "rescale_intercept", rescale_intercept cannot be nil.')
337
+ end
338
+
339
+ if @rescale_slope.nil?
340
+ invalid_properties.push('invalid value for "rescale_slope", rescale_slope cannot be nil.')
341
+ end
342
+
343
+ if @number_of_frames.nil?
344
+ invalid_properties.push('invalid value for "number_of_frames", number_of_frames cannot be nil.')
345
+ end
346
+
347
+ if @length_value.nil?
348
+ invalid_properties.push('invalid value for "length_value", length_value cannot be nil.')
349
+ end
350
+
351
+ if @is_little_endian.nil?
352
+ invalid_properties.push('invalid value for "is_little_endian", is_little_endian cannot be nil.')
353
+ end
354
+
355
+ if @offset.nil?
356
+ invalid_properties.push('invalid value for "offset", offset cannot be nil.')
357
+ end
358
+
359
+ if @dicom_found.nil?
360
+ invalid_properties.push('invalid value for "dicom_found", dicom_found cannot be nil.')
361
+ end
362
+
363
+ invalid_properties
364
+ end
365
+
366
+ # Check to see if the all the properties in the model are valid
367
+ # @return true if the model is valid
368
+ def valid?
369
+ return false if @planar_configuration.nil?
370
+ return false if !@reds.nil? && @reds !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
371
+ return false if !@greens.nil? && @greens !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
372
+ return false if !@blues.nil? && @blues !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
373
+ return false if !@dicom_header_info_by_bytes.nil? && @dicom_header_info_by_bytes !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
374
+ return false if @signed_image.nil?
375
+ return false if @samples_per_pixel.nil?
376
+ return false if @bits_allocated.nil?
377
+ return false if @width_tag_found.nil?
378
+ return false if @height_tag_found.nil?
379
+ return false if @width.nil?
380
+ return false if @height.nil?
381
+ return false if @window_centre.nil?
382
+ return false if @window_width.nil?
383
+ return false if @pixel_representation.nil?
384
+ return false if @rescale_intercept.nil?
385
+ return false if @rescale_slope.nil?
386
+ return false if @number_of_frames.nil?
387
+ return false if @length_value.nil?
388
+ return false if @is_little_endian.nil?
389
+ return false if @offset.nil?
390
+ return false if @dicom_found.nil?
391
+ true
392
+ end
393
+
394
+ # Custom attribute writer method with validation
395
+ # @param [Object] reds Value to be assigned
396
+ def reds=(reds)
397
+ if !reds.nil? && reds !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
398
+ fail ArgumentError, 'invalid value for "reds", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.'
399
+ end
400
+
401
+ @reds = reds
402
+ end
403
+
404
+ # Custom attribute writer method with validation
405
+ # @param [Object] greens Value to be assigned
406
+ def greens=(greens)
407
+ if !greens.nil? && greens !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
408
+ fail ArgumentError, 'invalid value for "greens", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.'
409
+ end
410
+
411
+ @greens = greens
412
+ end
413
+
414
+ # Custom attribute writer method with validation
415
+ # @param [Object] blues Value to be assigned
416
+ def blues=(blues)
417
+ if !blues.nil? && blues !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
418
+ fail ArgumentError, 'invalid value for "blues", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.'
419
+ end
420
+
421
+ @blues = blues
422
+ end
423
+
424
+ # Custom attribute writer method with validation
425
+ # @param [Object] dicom_header_info_by_bytes Value to be assigned
426
+ def dicom_header_info_by_bytes=(dicom_header_info_by_bytes)
427
+ if !dicom_header_info_by_bytes.nil? && dicom_header_info_by_bytes !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
428
+ fail ArgumentError, 'invalid value for "dicom_header_info_by_bytes", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.'
429
+ end
430
+
431
+ @dicom_header_info_by_bytes = dicom_header_info_by_bytes
432
+ end
433
+
434
+ # Checks equality by comparing each attribute.
435
+ # @param [Object] Object to be compared
436
+ def ==(o)
437
+ return true if self.equal?(o)
438
+ self.class == o.class &&
439
+ planar_configuration == o.planar_configuration &&
440
+ reds == o.reds &&
441
+ greens == o.greens &&
442
+ blues == o.blues &&
443
+ dicom_header_info_by_bytes == o.dicom_header_info_by_bytes &&
444
+ signed_image == o.signed_image &&
445
+ dicom_info == o.dicom_info &&
446
+ samples_per_pixel == o.samples_per_pixel &&
447
+ bits_allocated == o.bits_allocated &&
448
+ photo_interpretation == o.photo_interpretation &&
449
+ width_tag_found == o.width_tag_found &&
450
+ height_tag_found == o.height_tag_found &&
451
+ width == o.width &&
452
+ height == o.height &&
453
+ window_centre == o.window_centre &&
454
+ window_width == o.window_width &&
455
+ pixel_representation == o.pixel_representation &&
456
+ rescale_intercept == o.rescale_intercept &&
457
+ rescale_slope == o.rescale_slope &&
458
+ number_of_frames == o.number_of_frames &&
459
+ length_value == o.length_value &&
460
+ is_little_endian == o.is_little_endian &&
461
+ offset == o.offset &&
462
+ dicom_found == o.dicom_found
463
+ end
464
+
465
+ # @see the `==` method
466
+ # @param [Object] Object to be compared
467
+ def eql?(o)
468
+ self == o
469
+ end
470
+
471
+ # Calculates hash code according to all attributes.
472
+ # @return [Fixnum] Hash code
473
+ def hash
474
+ [planar_configuration, reds, greens, blues, dicom_header_info_by_bytes, signed_image, dicom_info, samples_per_pixel, bits_allocated, photo_interpretation, width_tag_found, height_tag_found, width, height, window_centre, window_width, pixel_representation, rescale_intercept, rescale_slope, number_of_frames, length_value, is_little_endian, offset, dicom_found].hash
475
+ end
476
+
477
+ # Builds the object from hash
478
+ # @param [Hash] attributes Model attributes in the form of hash
479
+ # @return [Object] Returns the model itself
480
+ def build_from_hash(attributes)
481
+ return nil unless attributes.is_a?(Hash)
482
+ self.class.swagger_types.each_pair do |key, type|
483
+ attribute_key = self.class.attribute_map[key]
484
+ attribute_key = (attribute_key[0, 1].downcase + attribute_key[1..-1]).to_sym
485
+ if type =~ /\AArray<(.*)>/i
486
+ # check to ensure the input is an array given that the the attribute
487
+ # is documented as an array but the input is not
488
+ if attributes[attribute_key].is_a?(Array)
489
+ self.send("#{key}=", attributes[attribute_key].map { |v| _deserialize($1, v) })
490
+ end
491
+ elsif !attributes[attribute_key].nil?
492
+ self.send("#{key}=", _deserialize(type, attributes[attribute_key]))
493
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
494
+ end
495
+
496
+ self
497
+ end
498
+
499
+ # Deserializes the data based on type
500
+ # @param string type Data type
501
+ # @param string value Value to be deserialized
502
+ # @return [Object] Deserialized data
503
+ def _deserialize(type, value)
504
+ case type.to_sym
505
+ when :DateTime
506
+ DateTime.parse(value)
507
+ when :Date
508
+ Date.parse(value)
509
+ when :String
510
+ value.to_s
511
+ when :Integer
512
+ value.to_i
513
+ when :Float
514
+ value.to_f
515
+ when :BOOLEAN
516
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
517
+ true
518
+ else
519
+ false
520
+ end
521
+ when :Object
522
+ # generic object (usually a Hash), return directly
523
+ value
524
+ when /\AArray<(?<inner_type>.+)>\z/
525
+ inner_type = Regexp.last_match[:inner_type]
526
+ value.map { |v| _deserialize(inner_type, v) }
527
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
528
+ k_type = Regexp.last_match[:k_type]
529
+ v_type = Regexp.last_match[:v_type]
530
+ {}.tap do |hash|
531
+ value.each do |k, v|
532
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
533
+ end
534
+ end
535
+ else # model
536
+ temp_model = AsposeImagingCloud.const_get(type).new
537
+ temp_model.build_from_hash(value)
538
+ end
539
+ end
540
+
541
+ # Returns the string representation of the object
542
+ # @return [String] String presentation of the object
543
+ def to_s
544
+ to_hash.to_s
545
+ end
546
+
547
+ # to_body is an alias to to_hash (backward compatibility)
548
+ # @return [Hash] Returns the object in the form of hash
549
+ def to_body
550
+ to_hash
551
+ end
552
+
553
+ # Returns the object in the form of hash
554
+ # @return [Hash] Returns the object in the form of hash
555
+ def to_hash
556
+ hash = {}
557
+ self.class.attribute_map.each_pair do |attr, param|
558
+ value = self.send(attr)
559
+ next if value.nil?
560
+ hash[param] = _to_hash(value)
561
+ end
562
+ hash
563
+ end
564
+
565
+ # Outputs non-array value in the form of hash
566
+ # For object, use to_hash. Otherwise, just return the value
567
+ # @param [Object] value Any valid value
568
+ # @return [Hash] Returns the value in the form of hash
569
+ def _to_hash(value)
570
+ if value.is_a?(Array)
571
+ value.compact.map { |v| _to_hash(v) }
572
+ elsif value.is_a?(Hash)
573
+ {}.tap do |hash|
574
+ value.each { |k, v| hash[k] = _to_hash(v) }
575
+ end
576
+ elsif value.respond_to? :to_hash
577
+ value.to_hash
578
+ else
579
+ value
580
+ end
581
+ end
582
+
583
+ end
584
+ end