Class: DicomStudyFactory::Transformer
- Inherits:
-
Object
- Object
- DicomStudyFactory::Transformer
- Defined in:
- lib/dicom_study_factory/transformer.rb
Overview
Transforme gets all the .dcm files in one directory and apply a factory data to populate the dicom with tags
Constant Summary collapse
- SOURCE_DIR =
'tmp/source'
- OUTPUT_DIR =
'tmp/output'
Instance Method Summary collapse
- #files ⇒ Object
-
#initialize ⇒ Transformer
constructor
A new instance of Transformer.
- #output_files ⇒ Object
Constructor Details
#initialize ⇒ Transformer
Returns a new instance of Transformer.
11 12 13 14 |
# File 'lib/dicom_study_factory/transformer.rb', line 11 def initialize FileUtils.mkdir_p(SOURCE_DIR) unless Dir.exist? SOURCE_DIR FileUtils.mkdir_p(OUTPUT_DIR) unless Dir.exist? OUTPUT_DIR end |
Instance Method Details
#files ⇒ Object
16 17 18 |
# File 'lib/dicom_study_factory/transformer.rb', line 16 def files Dir.glob(File.join(SOURCE_DIR, '**/*.dcm')) end |
#output_files ⇒ Object
20 21 22 |
# File 'lib/dicom_study_factory/transformer.rb', line 20 def output_files Dir.glob(File.join(OUTPUT_DIR, '**/*.dcm')) end |