Sha256: e6a098f586342b8cddeaf171172ac3e4c3a066781bd93d7b744cbed8b6dbb075

Contents?: true

Size: 1.5 KB

Versions: 16

Compression:

Stored size: 1.5 KB

Contents

require 'helper_spec'
require 'logger'
require 'metamri/raw_image_dataset'
require 'metamri/raw_image_file'

describe RawImageDataset, "for a single valid DICOM file" do
  before(:each) do
    # Since a single, anonymized dicom is sufficiently small, provide it in fixtures for testing.
    @valid_dicom_basename = 's03_bravo.0156'
    @valid_dicom = File.join(File.dirname(__FILE__), '..', 'fixtures', @valid_dicom_basename)
    @valid_raw_image_file = RawImageFile.new(@valid_dicom)
  end
  
  it "should have scan series metadata" do
    dataset_dir = File.expand_path File.dirname(@valid_dicom)
    ds = RawImageDataset.new(dataset_dir, @valid_raw_image_file)
    
    ds.dataset_key.should == "ID::2010-11-10T00:00:00+00:00"
    ds.directory.should == dataset_dir
    ds.raw_image_files.first.should == @valid_raw_image_file
    ds.rmr_number.should == "ID"
    ds.scanned_file.should == @valid_dicom_basename
    ds.scanner_source.should == "Institution"
    ds.series_description.should == "Ax FSPGR BRAVO T1"
    ds.exam_number.should == "1405"
    ds.timestamp.should == DateTime.parse("Wed, 10 Nov 2010 00:00:00 +0000")
    ds.study_description.should == "RMRMABRAVOTEST"
    ds.dicom?.should be true
    ds.protocol_name.should == "MERIT220 + TAMI/METS 101"
    ds.operator_name.should == "Operator"
    ds.patient_name.should == "Patient"
    ds.dicom_series_uid.should == "1.2.840.113619.2.260.6945.1176948.30017.1288984188.384"
    ds.dicom_study_uid.should == "1.2.840.113619.6.260.4.1294724594.737.1289407877.724"
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
metamri-0.2.26 spec/unit/raw_image_dataset_spec.rb
metamri-0.2.25 spec/unit/raw_image_dataset_spec.rb
metamri-0.2.24 spec/unit/raw_image_dataset_spec.rb
metamri-0.2.22 spec/unit/raw_image_dataset_spec.rb
metamri-0.2.21 spec/unit/raw_image_dataset_spec.rb
metamri-0.2.20 spec/unit/raw_image_dataset_spec.rb
metamri-0.2.19 spec/unit/raw_image_dataset_spec.rb
metamri-0.2.18 spec/unit/raw_image_dataset_spec.rb
metamri-0.2.17 spec/unit/raw_image_dataset_spec.rb
metamri-0.2.16 spec/unit/raw_image_dataset_spec.rb
metamri-0.2.15 spec/unit/raw_image_dataset_spec.rb
metamri-0.2.14 spec/unit/raw_image_dataset_spec.rb
metamri-0.2.13 spec/unit/raw_image_dataset_spec.rb
metamri-0.2.12 spec/unit/raw_image_dataset_spec.rb
metamri-0.2.11 spec/unit/raw_image_dataset_spec.rb
metamri-0.2.10 spec/unit/raw_image_dataset_spec.rb