Class: Dcm4chee::DicomFile

Inherits:
Object
  • Object
show all
Includes:
DataMapper::Resource, HasDicomObject
Defined in:
app/models/dcm4chee/dicom_file.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from HasDicomObject

#as_json, #dcm_elements

Class Method Details

.repository(name = nil, &block) ⇒ Object



58
59
60
# File 'app/models/dcm4chee/dicom_file.rb', line 58

def self.repository(name = nil, &block)
  super(Dcm4chee.config.repository_name, &block)
end

Instance Method Details

#availabilityInteger

Available values:

-4: QUERY_HSM_FAILED
-3: MD5_CHECK_FAILED
-2: VERIFY_COMPRESS_FAILED
-1: COMPRESS_FAILED
 0: DEFAULT
 1: TO_ARCHIVE
 2: ARCHIVED
 3: COMPRESSING

Returns:

  • (Integer)

    file status



41
# File 'app/models/dcm4chee/dicom_file.rb', line 41

property :availability, Enum[-4, -3, -2, -1, 0, 1, 2, 3], field: 'file_status'

#created_atDateTime

Returns created time.

Returns:

  • (DateTime)

    created time



47
# File 'app/models/dcm4chee/dicom_file.rb', line 47

property :created_at, DateTime, field: 'created_time'

#dcmDICOM::DObject

Load the dicom object

Returns:

  • (DICOM::DObject)

    DICOM object



54
55
56
# File 'app/models/dcm4chee/dicom_file.rb', line 54

def dcm
  @dcm ||= DICOM::DObject.read(File.join(file_system.path, path))
end

#file_system_idInteger

Returns foreign key of FileSystem.

Returns:



16
# File 'app/models/dcm4chee/dicom_file.rb', line 16

property :file_system_id, Integer, field: 'filesystem_fk'

#idInteger

Returns primary key.

Returns:

  • (Integer)

    primary key



10
# File 'app/models/dcm4chee/dicom_file.rb', line 10

property :id, Serial, field: 'pk'

#instance_idInteger

Returns foreign key of Instance.

Returns:



13
# File 'app/models/dcm4chee/dicom_file.rb', line 13

property :instance_id, Integer, field: 'instance_fk'

#md5String

Returns MD5 of the file.

Returns:

  • (String)

    MD5 of the file



25
# File 'app/models/dcm4chee/dicom_file.rb', line 25

property :md5, String, field: 'file_md5'

#md5_checked_atDateTime

Returns last MD5 checking time of the file.

Returns:

  • (DateTime)

    last MD5 checking time of the file



44
# File 'app/models/dcm4chee/dicom_file.rb', line 44

property :md5_checked_at, DateTime, field: 'md5_check_time'

#pathString

Returns path.

Returns:

  • (String)

    path



19
# File 'app/models/dcm4chee/dicom_file.rb', line 19

property :path, Text, field: 'filepath'

#sizeInteger

Returns file size.

Returns:

  • (Integer)

    file size



28
# File 'app/models/dcm4chee/dicom_file.rb', line 28

property :size, Integer, field: 'file_size'

#transfer_syntax_uidString

Returns DICOM transfer syntax UID(0002,0010).

Returns:

  • (String)

    DICOM transfer syntax UID(0002,0010)



22
# File 'app/models/dcm4chee/dicom_file.rb', line 22

property :transfer_syntax_uid, Text, field: 'file_tsuid'