rtp-connect 1.4 → 1.5
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.
- data/CHANGELOG.rdoc +26 -0
- data/Gemfile.lock +6 -6
- data/README.rdoc +2 -2
- data/lib/rtp-connect.rb +1 -0
- data/lib/rtp-connect/methods.rb +33 -0
- data/lib/rtp-connect/plan.rb +9 -0
- data/lib/rtp-connect/plan_to_dcm.rb +314 -282
- data/lib/rtp-connect/prescription.rb +14 -3
- data/lib/rtp-connect/record.rb +1 -1
- data/lib/rtp-connect/ruby_extensions.rb +12 -9
- data/lib/rtp-connect/simulation_field.rb +702 -0
- data/lib/rtp-connect/version.rb +1 -1
- data/rtp-connect.gemspec +12 -12
- metadata +36 -18
- checksums.yaml +0 -7
@@ -4,7 +4,7 @@ module RTP
|
|
4
4
|
#
|
5
5
|
# @note Relations:
|
6
6
|
# * Parent: Plan
|
7
|
-
# * Children: SiteSetup, Field
|
7
|
+
# * Children: SiteSetup, SimulationField, Field
|
8
8
|
#
|
9
9
|
class Prescription < Record
|
10
10
|
|
@@ -12,6 +12,8 @@ module RTP
|
|
12
12
|
attr_reader :parent
|
13
13
|
# The SiteSetup record (if any) that belongs to this Prescription.
|
14
14
|
attr_reader :site_setup
|
15
|
+
# An array of SimulationField records (if any) that belongs to this Prescription.
|
16
|
+
attr_reader :simulation_fields
|
15
17
|
# An array of Field records (if any) that belongs to this Prescription.
|
16
18
|
attr_reader :fields
|
17
19
|
attr_reader :course_id
|
@@ -66,6 +68,7 @@ module RTP
|
|
66
68
|
# Child objects:
|
67
69
|
@site_setup = nil
|
68
70
|
@fields = Array.new
|
71
|
+
@simulation_fields = Array.new
|
69
72
|
# Parent relation (may get more than one type of record here):
|
70
73
|
@parent = get_parent(parent.to_record, Plan)
|
71
74
|
@parent.add_prescription(self)
|
@@ -96,6 +99,14 @@ module RTP
|
|
96
99
|
@fields << child.to_field
|
97
100
|
end
|
98
101
|
|
102
|
+
# Adds a simulation field record to this instance.
|
103
|
+
#
|
104
|
+
# @param [Field] child a SimulationField instance which is to be associated with self
|
105
|
+
#
|
106
|
+
def add_simulation_field(child)
|
107
|
+
@simulation_fields << child.to_simulation_field
|
108
|
+
end
|
109
|
+
|
99
110
|
# Adds a site setup record to this instance.
|
100
111
|
#
|
101
112
|
# @param [SiteSetup] child a SiteSetup instance which is to be associated with self
|
@@ -106,10 +117,10 @@ module RTP
|
|
106
117
|
|
107
118
|
# Collects the child records of this instance in a properly sorted array.
|
108
119
|
#
|
109
|
-
# @return [Array<SiteSetup, Field>] a sorted array of self's child records
|
120
|
+
# @return [Array<SiteSetup, SimulationField, Field>] a sorted array of self's child records
|
110
121
|
#
|
111
122
|
def children
|
112
|
-
return [@site_setup, @fields].flatten.compact
|
123
|
+
return [@site_setup, @simulation_fields, @fields].flatten.compact
|
113
124
|
end
|
114
125
|
|
115
126
|
# Computes a hash code for this object.
|
data/lib/rtp-connect/record.rb
CHANGED
@@ -26,7 +26,7 @@ module RTP
|
|
26
26
|
# @return [String] a proper RTPConnect type CSV string
|
27
27
|
#
|
28
28
|
def encode
|
29
|
-
content = values
|
29
|
+
content = CSV.generate_line(values, force_quotes: true, row_sep: '') + ","
|
30
30
|
checksum = content.checksum
|
31
31
|
# Complete string is content + checksum (in double quotes) + carriage return + line feed
|
32
32
|
return (content + checksum.to_s.wrap + "\r\n").encode('ISO8859-1')
|
@@ -26,24 +26,27 @@ class String
|
|
26
26
|
self.split(',')
|
27
27
|
end
|
28
28
|
|
29
|
-
# Removes double quotes from a string.
|
29
|
+
# Removes leading & trailing double quotes from a string.
|
30
30
|
#
|
31
|
-
# @return [String] the string
|
31
|
+
# @return [String] the processed string
|
32
32
|
#
|
33
33
|
def value
|
34
|
-
self.gsub(
|
34
|
+
self.gsub(/\A"|"\Z/, '')
|
35
35
|
end
|
36
36
|
|
37
|
-
# Splits the elements of a CSV string (comma separated values)
|
38
|
-
# and
|
37
|
+
# Splits the elements of a CSV string (comma separated values) and removes
|
38
|
+
# quotation (leading and trailing double-quote characters) from the extracted
|
39
|
+
# string elements.
|
39
40
|
#
|
40
41
|
# @return [Array<String>] an array of the comma separated values
|
41
42
|
#
|
42
43
|
def values
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
44
|
+
begin
|
45
|
+
CSV.parse(self).first
|
46
|
+
rescue StandardError => e
|
47
|
+
RTP.logger.error("Unable to parse the given string record. Probably invalid CSV format: #{self}")
|
48
|
+
raise e
|
49
|
+
end
|
47
50
|
end
|
48
51
|
|
49
52
|
# Wraps double quotes around the string.
|
@@ -0,0 +1,702 @@
|
|
1
|
+
module RTP
|
2
|
+
|
3
|
+
# The simulation field class.
|
4
|
+
#
|
5
|
+
# @note Relations:
|
6
|
+
# * Parent: Prescription
|
7
|
+
# * Children: none
|
8
|
+
#
|
9
|
+
class SimulationField < Record
|
10
|
+
|
11
|
+
# The Record which this instance belongs to.
|
12
|
+
attr_reader :parent
|
13
|
+
attr_reader :rx_site_name
|
14
|
+
attr_reader :field_name
|
15
|
+
attr_reader :field_id
|
16
|
+
attr_reader :field_note
|
17
|
+
attr_reader :treatment_machine
|
18
|
+
attr_reader :gantry_angle
|
19
|
+
attr_reader :collimator_angle
|
20
|
+
attr_reader :field_x_mode
|
21
|
+
attr_reader :field_x
|
22
|
+
attr_reader :collimator_x1
|
23
|
+
attr_reader :collimator_x2
|
24
|
+
attr_reader :field_y_mode
|
25
|
+
attr_reader :field_y
|
26
|
+
attr_reader :collimator_y1
|
27
|
+
attr_reader :collimator_y2
|
28
|
+
attr_reader :couch_vertical
|
29
|
+
attr_reader :couch_lateral
|
30
|
+
attr_reader :couch_longitudinal
|
31
|
+
attr_reader :couch_angle
|
32
|
+
attr_reader :couch_pedestal
|
33
|
+
attr_reader :sad
|
34
|
+
attr_reader :ap_separation
|
35
|
+
attr_reader :pa_separation
|
36
|
+
attr_reader :lateral_separation
|
37
|
+
attr_reader :tangential_separation
|
38
|
+
attr_reader :other_label_1
|
39
|
+
attr_reader :ssd_1
|
40
|
+
attr_reader :sfd_1
|
41
|
+
attr_reader :other_label_2
|
42
|
+
attr_reader :other_measurement_1
|
43
|
+
attr_reader :other_measurement_2
|
44
|
+
attr_reader :other_label_3
|
45
|
+
attr_reader :other_measurement_3
|
46
|
+
attr_reader :other_measurement_4
|
47
|
+
attr_reader :other_label_4
|
48
|
+
attr_reader :other_measurement_5
|
49
|
+
attr_reader :other_measurement_6
|
50
|
+
attr_reader :blade_x_mode
|
51
|
+
attr_reader :blade_x
|
52
|
+
attr_reader :blade_x1
|
53
|
+
attr_reader :blade_x2
|
54
|
+
attr_reader :blade_y_mode
|
55
|
+
attr_reader :blade_y
|
56
|
+
attr_reader :blade_y1
|
57
|
+
attr_reader :blade_y2
|
58
|
+
attr_reader :ii_lateral
|
59
|
+
attr_reader :ii_longitudinal
|
60
|
+
attr_reader :ii_vertical
|
61
|
+
attr_reader :kvp
|
62
|
+
attr_reader :ma
|
63
|
+
attr_reader :seconds
|
64
|
+
|
65
|
+
# Creates a new SimulationField by parsing a RTPConnect string line.
|
66
|
+
#
|
67
|
+
# @param [#to_s] string the simulation field definition record string line
|
68
|
+
# @param [Record] parent a record which is used to determine the proper parent of this instance
|
69
|
+
# @return [Field] the created SimulationField instance
|
70
|
+
# @raise [ArgumentError] if given a string containing an invalid number of elements
|
71
|
+
#
|
72
|
+
def self.load(string, parent)
|
73
|
+
# Get the quote-less values:
|
74
|
+
values = string.to_s.values
|
75
|
+
low_limit = 17
|
76
|
+
high_limit = 53
|
77
|
+
raise ArgumentError, "Invalid argument 'string': Expected at least #{low_limit} elements, got #{values.length}." if values.length < low_limit
|
78
|
+
RTP.logger.warn "The number of elements (#{values.length}) for this Simulation Field record exceeds the known number of data items for this record (#{high_limit}). This may indicate an invalid record or that the RTP format has recently been expanded with new items." if values.length > high_limit
|
79
|
+
sf = self.new(parent)
|
80
|
+
# Assign the values to attributes:
|
81
|
+
sf.keyword = values[0]
|
82
|
+
sf.rx_site_name = values[1]
|
83
|
+
sf.field_name = values[2]
|
84
|
+
sf.field_id = values[3]
|
85
|
+
sf.field_note = values[4]
|
86
|
+
sf.treatment_machine = values[5]
|
87
|
+
sf.gantry_angle = values[6]
|
88
|
+
sf.collimator_angle = values[7]
|
89
|
+
sf.field_x_mode = values[8]
|
90
|
+
sf.field_x = values[9]
|
91
|
+
sf.collimator_x1 = values[10]
|
92
|
+
sf.collimator_x2 = values[11]
|
93
|
+
sf.field_y_mode = values[12]
|
94
|
+
sf.field_y = values[13]
|
95
|
+
sf.collimator_y1 = values[14]
|
96
|
+
sf.collimator_y2 = values[15]
|
97
|
+
sf.couch_vertical = values[16]
|
98
|
+
sf.couch_lateral = values[17]
|
99
|
+
sf.couch_longitudinal = values[18]
|
100
|
+
sf.couch_angle = values[19]
|
101
|
+
sf.couch_pedestal = values[20]
|
102
|
+
sf.sad = values[21]
|
103
|
+
sf.ap_separation = values[22]
|
104
|
+
sf.pa_separation = values[23]
|
105
|
+
sf.lateral_separation = values[24]
|
106
|
+
sf.tangential_separation = values[25]
|
107
|
+
sf.other_label_1 = values[26]
|
108
|
+
sf.ssd_1 = values[27]
|
109
|
+
sf.sfd_1 = values[28]
|
110
|
+
sf.other_label_2 = values[29]
|
111
|
+
sf.other_measurement_1 = values[30]
|
112
|
+
sf.other_measurement_2 = values[31]
|
113
|
+
sf.other_label_3 = values[32]
|
114
|
+
sf.other_measurement_3 = values[33]
|
115
|
+
sf.other_measurement_4 = values[34]
|
116
|
+
sf.other_label_4 = values[35]
|
117
|
+
sf.other_measurement_5 = values[36]
|
118
|
+
sf.other_measurement_6 = values[37]
|
119
|
+
sf.blade_x_mode = values[38]
|
120
|
+
sf.blade_x = values[39]
|
121
|
+
sf.blade_x1 = values[40]
|
122
|
+
sf.blade_x2 = values[41]
|
123
|
+
sf.blade_y_mode = values[42]
|
124
|
+
sf.blade_y = values[43]
|
125
|
+
sf.blade_y1 = values[44]
|
126
|
+
sf.blade_y2 = values[45]
|
127
|
+
sf.ii_lateral = values[46]
|
128
|
+
sf.ii_longitudinal = values[47]
|
129
|
+
sf.ii_vertical = values[48]
|
130
|
+
sf.kvp = values[49]
|
131
|
+
sf.ma = values[50]
|
132
|
+
sf.seconds = values[51]
|
133
|
+
sf.crc = values[-1]
|
134
|
+
return sf
|
135
|
+
end
|
136
|
+
|
137
|
+
# Creates a new SimulationField.
|
138
|
+
#
|
139
|
+
# @param [Record] parent a record which is used to determine the proper parent of this instance
|
140
|
+
#
|
141
|
+
def initialize(parent)
|
142
|
+
# Parent relation (may get more than one type of record here):
|
143
|
+
@parent = get_parent(parent.to_record, Prescription)
|
144
|
+
@parent.add_simulation_field(self)
|
145
|
+
@keyword = 'SIM_DEF'
|
146
|
+
end
|
147
|
+
|
148
|
+
# Checks for equality.
|
149
|
+
#
|
150
|
+
# Other and self are considered equivalent if they are
|
151
|
+
# of compatible types and their attributes are equivalent.
|
152
|
+
#
|
153
|
+
# @param other an object to be compared with self.
|
154
|
+
# @return [Boolean] true if self and other are considered equivalent
|
155
|
+
#
|
156
|
+
def ==(other)
|
157
|
+
if other.respond_to?(:to_simulation_field)
|
158
|
+
other.send(:state) == state
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
alias_method :eql?, :==
|
163
|
+
|
164
|
+
# Collects the child records of this instance in a properly sorted array.
|
165
|
+
#
|
166
|
+
# @return [Array] an emtpy array
|
167
|
+
#
|
168
|
+
def children
|
169
|
+
return Array.new
|
170
|
+
end
|
171
|
+
|
172
|
+
# Computes a hash code for this object.
|
173
|
+
#
|
174
|
+
# @note Two objects with the same attributes will have the same hash code.
|
175
|
+
#
|
176
|
+
# @return [Fixnum] the object's hash code
|
177
|
+
#
|
178
|
+
def hash
|
179
|
+
state.hash
|
180
|
+
end
|
181
|
+
|
182
|
+
# Collects the values (attributes) of this instance.
|
183
|
+
#
|
184
|
+
# @note The CRC is not considered part of the actual values and is excluded.
|
185
|
+
# @return [Array<String>] an array of attributes (in the same order as they appear in the RTP string)
|
186
|
+
#
|
187
|
+
def values
|
188
|
+
return [
|
189
|
+
@keyword,
|
190
|
+
@rx_site_name,
|
191
|
+
@field_name,
|
192
|
+
@field_id,
|
193
|
+
@field_note,
|
194
|
+
@treatment_machine,
|
195
|
+
@gantry_angle,
|
196
|
+
@collimator_angle,
|
197
|
+
@field_x_mode,
|
198
|
+
@field_x,
|
199
|
+
@collimator_x1,
|
200
|
+
@collimator_x2,
|
201
|
+
@field_y_mode,
|
202
|
+
@field_y,
|
203
|
+
@collimator_y1,
|
204
|
+
@collimator_y2,
|
205
|
+
@couch_vertical,
|
206
|
+
@couch_lateral,
|
207
|
+
@couch_longitudinal,
|
208
|
+
@couch_angle,
|
209
|
+
@couch_pedestal,
|
210
|
+
@sad,
|
211
|
+
@ap_separation,
|
212
|
+
@pa_separation,
|
213
|
+
@lateral_separation,
|
214
|
+
@tangential_separation,
|
215
|
+
@other_label_1,
|
216
|
+
@ssd_1,
|
217
|
+
@sfd_1,
|
218
|
+
@other_label_2,
|
219
|
+
@other_measurement_1,
|
220
|
+
@other_measurement_2,
|
221
|
+
@other_label_3,
|
222
|
+
@other_measurement_3,
|
223
|
+
@other_measurement_4,
|
224
|
+
@other_label_4,
|
225
|
+
@other_measurement_5,
|
226
|
+
@other_measurement_6,
|
227
|
+
@blade_x_mode,
|
228
|
+
@blade_x,
|
229
|
+
@blade_x1,
|
230
|
+
@blade_x2,
|
231
|
+
@blade_y_mode,
|
232
|
+
@blade_y,
|
233
|
+
@blade_y1,
|
234
|
+
@blade_y2,
|
235
|
+
@ii_lateral,
|
236
|
+
@ii_longitudinal,
|
237
|
+
@ii_vertical,
|
238
|
+
@kvp,
|
239
|
+
@ma,
|
240
|
+
@seconds
|
241
|
+
]
|
242
|
+
end
|
243
|
+
|
244
|
+
# Returns self.
|
245
|
+
#
|
246
|
+
# @return [SimulationField] self
|
247
|
+
#
|
248
|
+
def to_simulation_field
|
249
|
+
self
|
250
|
+
end
|
251
|
+
|
252
|
+
# Encodes the SimulationField object + any hiearchy of child objects,
|
253
|
+
# to a properly formatted RTPConnect ascii string.
|
254
|
+
#
|
255
|
+
# @return [String] an RTP string with a single or multiple lines/records
|
256
|
+
#
|
257
|
+
def to_s
|
258
|
+
str = encode
|
259
|
+
if children
|
260
|
+
children.each do |child|
|
261
|
+
str += child.to_s
|
262
|
+
end
|
263
|
+
end
|
264
|
+
return str
|
265
|
+
end
|
266
|
+
|
267
|
+
alias :to_str :to_s
|
268
|
+
|
269
|
+
# Sets the keyword attribute.
|
270
|
+
#
|
271
|
+
# @note Since only a specific string is accepted, this is more of an argument check than a traditional setter method
|
272
|
+
# @param [#to_s] value the new attribute value
|
273
|
+
# @raise [ArgumentError] if given an unexpected keyword
|
274
|
+
#
|
275
|
+
def keyword=(value)
|
276
|
+
value = value.to_s.upcase
|
277
|
+
raise ArgumentError, "Invalid keyword. Expected 'SIM_DEF', got #{value}." unless value == "SIM_DEF"
|
278
|
+
@keyword = value
|
279
|
+
end
|
280
|
+
|
281
|
+
# Sets the rx_site_name attribute.
|
282
|
+
#
|
283
|
+
# @param [nil, #to_s] value the new attribute value
|
284
|
+
#
|
285
|
+
def rx_site_name=(value)
|
286
|
+
@rx_site_name = value && value.to_s
|
287
|
+
end
|
288
|
+
|
289
|
+
# Sets the field_name attribute.
|
290
|
+
#
|
291
|
+
# @param [nil, #to_s] value the new attribute value
|
292
|
+
#
|
293
|
+
def field_name=(value)
|
294
|
+
@field_name = value && value.to_s
|
295
|
+
end
|
296
|
+
|
297
|
+
# Sets the field_id attribute.
|
298
|
+
#
|
299
|
+
# @param [nil, #to_s] value the new attribute value
|
300
|
+
#
|
301
|
+
def field_id=(value)
|
302
|
+
@field_id = value && value.to_s
|
303
|
+
end
|
304
|
+
|
305
|
+
# Sets the field_note attribute.
|
306
|
+
#
|
307
|
+
# @param [nil, #to_s] value the new attribute value
|
308
|
+
#
|
309
|
+
def field_note=(value)
|
310
|
+
@field_note = value && value.to_s
|
311
|
+
end
|
312
|
+
|
313
|
+
# Sets the treatment_machine attribute.
|
314
|
+
#
|
315
|
+
# @param [nil, #to_s] value the new attribute value
|
316
|
+
#
|
317
|
+
def treatment_machine=(value)
|
318
|
+
@treatment_machine = value && value.to_s
|
319
|
+
end
|
320
|
+
|
321
|
+
# Sets the gantry_angle attribute.
|
322
|
+
#
|
323
|
+
# @param [nil, #to_s] value the new attribute value
|
324
|
+
#
|
325
|
+
def gantry_angle=(value)
|
326
|
+
@gantry_angle = value && value.to_s.strip
|
327
|
+
end
|
328
|
+
|
329
|
+
# Sets the collimator_angle attribute.
|
330
|
+
#
|
331
|
+
# @param [nil, #to_s] value the new attribute value
|
332
|
+
#
|
333
|
+
def collimator_angle=(value)
|
334
|
+
@collimator_angle = value && value.to_s.strip
|
335
|
+
end
|
336
|
+
|
337
|
+
# Sets the field_x_mode attribute.
|
338
|
+
#
|
339
|
+
# @param [nil, #to_s] value the new attribute value
|
340
|
+
#
|
341
|
+
def field_x_mode=(value)
|
342
|
+
@field_x_mode = value && value.to_s
|
343
|
+
end
|
344
|
+
|
345
|
+
# Sets the field_x attribute.
|
346
|
+
#
|
347
|
+
# @param [nil, #to_s] value the new attribute value
|
348
|
+
#
|
349
|
+
def field_x=(value)
|
350
|
+
@field_x = value && value.to_s.strip
|
351
|
+
end
|
352
|
+
|
353
|
+
# Sets the collimator_x1 attribute.
|
354
|
+
#
|
355
|
+
# @param [nil, #to_s] value the new attribute value
|
356
|
+
#
|
357
|
+
def collimator_x1=(value)
|
358
|
+
@collimator_x1 = value && value.to_s.strip
|
359
|
+
end
|
360
|
+
|
361
|
+
# Sets the collimator_x2 attribute.
|
362
|
+
#
|
363
|
+
# @param [nil, #to_s] value the new attribute value
|
364
|
+
#
|
365
|
+
def collimator_x2=(value)
|
366
|
+
@collimator_x2 = value && value.to_s.strip
|
367
|
+
end
|
368
|
+
|
369
|
+
# Sets the field_y_mode attribute.
|
370
|
+
#
|
371
|
+
# @param [nil, #to_s] value the new attribute value
|
372
|
+
#
|
373
|
+
def field_y_mode=(value)
|
374
|
+
@field_y_mode = value && value.to_s
|
375
|
+
end
|
376
|
+
|
377
|
+
# Sets the field_y attribute.
|
378
|
+
#
|
379
|
+
# @param [nil, #to_s] value the new attribute value
|
380
|
+
#
|
381
|
+
def field_y=(value)
|
382
|
+
@field_y = value && value.to_s.strip
|
383
|
+
end
|
384
|
+
|
385
|
+
# Sets the collimator_y1 attribute.
|
386
|
+
#
|
387
|
+
# @param [nil, #to_s] value the new attribute value
|
388
|
+
#
|
389
|
+
def collimator_y1=(value)
|
390
|
+
@collimator_y1 = value && value.to_s.strip
|
391
|
+
end
|
392
|
+
|
393
|
+
# Sets the collimator_y2 attribute.
|
394
|
+
#
|
395
|
+
# @param [nil, #to_s] value the new attribute value
|
396
|
+
#
|
397
|
+
def collimator_y2=(value)
|
398
|
+
@collimator_y2 = value && value.to_s.strip
|
399
|
+
end
|
400
|
+
|
401
|
+
# Sets the couch_vertical attribute.
|
402
|
+
#
|
403
|
+
# @param [nil, #to_s] value the new attribute value
|
404
|
+
#
|
405
|
+
def couch_vertical=(value)
|
406
|
+
@couch_vertical = value && value.to_s.strip
|
407
|
+
end
|
408
|
+
|
409
|
+
# Sets the couch_lateral attribute.
|
410
|
+
#
|
411
|
+
# @param [nil, #to_s] value the new attribute value
|
412
|
+
#
|
413
|
+
def couch_lateral=(value)
|
414
|
+
@couch_lateral = value && value.to_s.strip
|
415
|
+
end
|
416
|
+
|
417
|
+
# Sets the couch_longitudinal attribute.
|
418
|
+
#
|
419
|
+
# @param [nil, #to_s] value the new attribute value
|
420
|
+
#
|
421
|
+
def couch_longitudinal=(value)
|
422
|
+
@couch_longitudinal = value && value.to_s.strip
|
423
|
+
end
|
424
|
+
|
425
|
+
# Sets the couch_angle attribute.
|
426
|
+
#
|
427
|
+
# @param [nil, #to_s] value the new attribute value
|
428
|
+
#
|
429
|
+
def couch_angle=(value)
|
430
|
+
@couch_angle = value && value.to_s.strip.strip
|
431
|
+
end
|
432
|
+
|
433
|
+
# Sets the couch_pedestal attribute.
|
434
|
+
#
|
435
|
+
# @param [nil, #to_s] value the new attribute value
|
436
|
+
#
|
437
|
+
def couch_pedestal=(value)
|
438
|
+
@couch_pedestal = value && value.to_s.strip
|
439
|
+
end
|
440
|
+
|
441
|
+
# Sets the sad attribute.
|
442
|
+
#
|
443
|
+
# @param [nil, #to_s] value the new attribute value
|
444
|
+
#
|
445
|
+
def sad=(value)
|
446
|
+
@sad = value && value.to_s.strip
|
447
|
+
end
|
448
|
+
|
449
|
+
# Sets the ap_separation attribute.
|
450
|
+
#
|
451
|
+
# @param [nil, #to_s] value the new attribute value
|
452
|
+
#
|
453
|
+
def ap_separation=(value)
|
454
|
+
@ap_separation = value && value.to_s
|
455
|
+
end
|
456
|
+
|
457
|
+
# Sets the pa_separation attribute.
|
458
|
+
#
|
459
|
+
# @param [nil, #to_s] value the new attribute value
|
460
|
+
#
|
461
|
+
def pa_separation=(value)
|
462
|
+
@pa_separation = value && value.to_s.strip
|
463
|
+
end
|
464
|
+
|
465
|
+
# Sets the lateral_separation attribute.
|
466
|
+
#
|
467
|
+
# @param [nil, #to_s] value the new attribute value
|
468
|
+
#
|
469
|
+
def lateral_separation=(value)
|
470
|
+
@lateral_separation = value && value.to_s.strip
|
471
|
+
end
|
472
|
+
|
473
|
+
# Sets the tangential_separation attribute.
|
474
|
+
#
|
475
|
+
# @param [nil, #to_s] value the new attribute value
|
476
|
+
#
|
477
|
+
def tangential_separation=(value)
|
478
|
+
@tangential_separation = value && value.to_s.strip
|
479
|
+
end
|
480
|
+
|
481
|
+
# Sets the other_label_1 attribute.
|
482
|
+
#
|
483
|
+
# @param [nil, #to_s] value the new attribute value
|
484
|
+
#
|
485
|
+
def other_label_1=(value)
|
486
|
+
@other_label_1 = value && value.to_s
|
487
|
+
end
|
488
|
+
|
489
|
+
# Sets the ssd_1 attribute.
|
490
|
+
#
|
491
|
+
# @param [nil, #to_s] value the new attribute value
|
492
|
+
#
|
493
|
+
def ssd_1=(value)
|
494
|
+
@ssd_1 = value && value.to_s
|
495
|
+
end
|
496
|
+
|
497
|
+
# Sets the sfd_1 attribute.
|
498
|
+
#
|
499
|
+
# @param [nil, #to_s] value the new attribute value
|
500
|
+
#
|
501
|
+
def sfd_1=(value)
|
502
|
+
@sfd_1 = value && value.to_s
|
503
|
+
end
|
504
|
+
|
505
|
+
# Sets the other_label_2 attribute.
|
506
|
+
#
|
507
|
+
# @param [nil, #to_s] value the new attribute value
|
508
|
+
#
|
509
|
+
def other_label_2=(value)
|
510
|
+
@other_label_2 = value && value.to_s
|
511
|
+
end
|
512
|
+
|
513
|
+
# Sets the other_measurement_1 attribute.
|
514
|
+
#
|
515
|
+
# @param [nil, #to_s] value the new attribute value
|
516
|
+
#
|
517
|
+
def other_measurement_1=(value)
|
518
|
+
@other_measurement_1 = value && value.to_s
|
519
|
+
end
|
520
|
+
|
521
|
+
# Sets the other_measurement_2 attribute.
|
522
|
+
#
|
523
|
+
# @param [nil, #to_s] value the new attribute value
|
524
|
+
#
|
525
|
+
def other_measurement_2=(value)
|
526
|
+
@other_measurement_2 = value && value.to_s
|
527
|
+
end
|
528
|
+
|
529
|
+
# Sets the other_label_3 attribute.
|
530
|
+
#
|
531
|
+
# @param [nil, #to_s] value the new attribute value
|
532
|
+
#
|
533
|
+
def other_label_3=(value)
|
534
|
+
@other_label_3 = value && value.to_s
|
535
|
+
end
|
536
|
+
|
537
|
+
# Sets the other_measurement_3 attribute.
|
538
|
+
#
|
539
|
+
# @param [nil, #to_s] value the new attribute value
|
540
|
+
#
|
541
|
+
def other_measurement_3=(value)
|
542
|
+
@other_measurement_3 = value && value.to_s
|
543
|
+
end
|
544
|
+
|
545
|
+
# Sets the other_measurement_4 attribute.
|
546
|
+
#
|
547
|
+
# @param [nil, #to_s] value the new attribute value
|
548
|
+
#
|
549
|
+
def other_measurement_4=(value)
|
550
|
+
@other_measurement_4 = value && value.to_s
|
551
|
+
end
|
552
|
+
|
553
|
+
# Sets the other_label_4 attribute.
|
554
|
+
#
|
555
|
+
# @param [nil, #to_s] value the new attribute value
|
556
|
+
#
|
557
|
+
def other_label_4=(value)
|
558
|
+
@other_label_4 = value && value.to_s
|
559
|
+
end
|
560
|
+
|
561
|
+
# Sets the other_measurement_5 attribute.
|
562
|
+
#
|
563
|
+
# @param [nil, #to_s] value the new attribute value
|
564
|
+
#
|
565
|
+
def other_measurement_5=(value)
|
566
|
+
@other_measurement_5 = value && value.to_s
|
567
|
+
end
|
568
|
+
|
569
|
+
# Sets the other_measurement_6 attribute.
|
570
|
+
#
|
571
|
+
# @param [nil, #to_s] value the new attribute value
|
572
|
+
#
|
573
|
+
def other_measurement_6=(value)
|
574
|
+
@other_measurement_6 = value && value.to_s
|
575
|
+
end
|
576
|
+
|
577
|
+
# Sets the blade_x_mode attribute.
|
578
|
+
#
|
579
|
+
# @param [nil, #to_s] value the new attribute value
|
580
|
+
#
|
581
|
+
def blade_x_mode=(value)
|
582
|
+
@blade_x_mode = value && value.to_s
|
583
|
+
end
|
584
|
+
|
585
|
+
# Sets the blade_x attribute.
|
586
|
+
#
|
587
|
+
# @param [nil, #to_s] value the new attribute value
|
588
|
+
#
|
589
|
+
def blade_x=(value)
|
590
|
+
@blade_x = value && value.to_s
|
591
|
+
end
|
592
|
+
|
593
|
+
# Sets the blade_x1 attribute.
|
594
|
+
#
|
595
|
+
# @param [nil, #to_s] value the new attribute value
|
596
|
+
#
|
597
|
+
def blade_x1=(value)
|
598
|
+
@blade_x1 = value && value.to_s
|
599
|
+
end
|
600
|
+
|
601
|
+
# Sets the blade_x2 attribute.
|
602
|
+
#
|
603
|
+
# @param [nil, #to_s] value the new attribute value
|
604
|
+
#
|
605
|
+
def blade_x2=(value)
|
606
|
+
@blade_x2 = value && value.to_s
|
607
|
+
end
|
608
|
+
|
609
|
+
# Sets the blade_y_mode attribute.
|
610
|
+
#
|
611
|
+
# @param [nil, #to_s] value the new attribute value
|
612
|
+
#
|
613
|
+
def blade_y_mode=(value)
|
614
|
+
@blade_y_mode = value && value.to_s
|
615
|
+
end
|
616
|
+
|
617
|
+
# Sets the blade_y attribute.
|
618
|
+
#
|
619
|
+
# @param [nil, #to_s] value the new attribute value
|
620
|
+
#
|
621
|
+
def blade_y=(value)
|
622
|
+
@blade_y = value && value.to_s
|
623
|
+
end
|
624
|
+
|
625
|
+
# Sets the blade_y1 attribute.
|
626
|
+
#
|
627
|
+
# @param [nil, #to_s] value the new attribute value
|
628
|
+
#
|
629
|
+
def blade_y1=(value)
|
630
|
+
@blade_y1 = value && value.to_s
|
631
|
+
end
|
632
|
+
|
633
|
+
# Sets the blade_y2 attribute.
|
634
|
+
#
|
635
|
+
# @param [nil, #to_s] value the new attribute value
|
636
|
+
#
|
637
|
+
def blade_y2=(value)
|
638
|
+
@blade_y2 = value && value.to_s
|
639
|
+
end
|
640
|
+
|
641
|
+
# Sets the ii_lateral attribute.
|
642
|
+
#
|
643
|
+
# @param [nil, #to_s] value the new attribute value
|
644
|
+
#
|
645
|
+
def ii_lateral=(value)
|
646
|
+
@ii_lateral = value && value.to_s
|
647
|
+
end
|
648
|
+
|
649
|
+
# Sets the ii_longitudinal attribute.
|
650
|
+
#
|
651
|
+
# @param [nil, #to_s] value the new attribute value
|
652
|
+
#
|
653
|
+
def ii_longitudinal=(value)
|
654
|
+
@ii_longitudinal = value && value.to_s
|
655
|
+
end
|
656
|
+
|
657
|
+
# Sets the ii_vertical attribute.
|
658
|
+
#
|
659
|
+
# @param [nil, #to_s] value the new attribute value
|
660
|
+
#
|
661
|
+
def ii_vertical=(value)
|
662
|
+
@ii_vertical = value && value.to_s
|
663
|
+
end
|
664
|
+
|
665
|
+
# Sets the kvp attribute.
|
666
|
+
#
|
667
|
+
# @param [nil, #to_s] value the new attribute value
|
668
|
+
#
|
669
|
+
def kvp=(value)
|
670
|
+
@kvp = value && value.to_s
|
671
|
+
end
|
672
|
+
|
673
|
+
# Sets the ma attribute.
|
674
|
+
#
|
675
|
+
# @param [nil, #to_s] value the new attribute value
|
676
|
+
#
|
677
|
+
def ma=(value)
|
678
|
+
@ma = value && value.to_s
|
679
|
+
end
|
680
|
+
|
681
|
+
# Sets the seconds attribute.
|
682
|
+
#
|
683
|
+
# @param [nil, #to_s] value the new attribute value
|
684
|
+
#
|
685
|
+
def seconds=(value)
|
686
|
+
@seconds = value && value.to_s
|
687
|
+
end
|
688
|
+
|
689
|
+
|
690
|
+
private
|
691
|
+
|
692
|
+
|
693
|
+
# Collects the attributes of this instance.
|
694
|
+
#
|
695
|
+
# @note The CRC is not considered part of the attributes of interest and is excluded
|
696
|
+
# @return [Array<String>] an array of attributes
|
697
|
+
#
|
698
|
+
alias_method :state, :values
|
699
|
+
|
700
|
+
end
|
701
|
+
|
702
|
+
end
|