Class: ImageDatasetQualityCheckResource
- Inherits:
-
ActiveResource::Base
- Object
- ActiveResource::Base
- ImageDatasetQualityCheckResource
- Defined in:
- lib/metamri/image_dataset_quality_check_resource.rb
Overview
An ImageQualityCheckResource is a ruby object that represents a quality check pulled down from the DataPanda database. It contains notes on the quality of specific images, with a note for each possible problem, and an overall note.
Omnibus f: NA –
User: erik
Motion warning: NA –
Ghosting wrapping: Pass –
Nos concerns: NA –
Image dataset: 12136
Banding: Pass –
Fov cutoff: Pass –
Registration risk: Pass –
Field inhomogeneity: Mild – eh - it's ok.
Other issues: la la la
Incomplete series: Complete –
Spm mask: NA –
Garbled series: Pass –
Check the current schema.db file for all available fields.
Constant Summary collapse
- PASSING_STATUSES =
Set.new(%w(complete pass))
- FAILING_STATUSES =
Set.new( ["Incomplete","Mild","Moderate","Severe","Limited Activation","No activation","No pass"] )
Instance Method Summary collapse
- #attribute_names ⇒ Object
-
#failed_checks ⇒ Object
Returns an array of hashes for failed checks.
Instance Method Details
#attribute_names ⇒ Object
43 44 45 |
# File 'lib/metamri/image_dataset_quality_check_resource.rb', line 43 def attribute_names instance_values['attributes'] end |
#failed_checks ⇒ Object
Returns an array of hashes for failed checks.
30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/metamri/image_dataset_quality_check_resource.rb', line 30 def failed_checks failed_checks = Array.new self.attribute_names.each_pair do |name, value| unless name.blank? if FAILING_STATUSES.include?(value) comment = instance_values['attributes']["#{name}_comment"] failed_checks << {:name => name, :value => value, :comment => comment } end end end return failed_checks end |