DICOMDIR classes

ImebraDicomDir

class ImebraDicomDir : public NSObject

Represents a DICOMDIR structure.

In order to work ImebraDicomDir needs a ImebraDataSet, which embeds the DICOMDIR’s entries.

If the ImebraDicomDir’s content is modified then the method updateDataSet() has to be called to obtain a dataset that can be stored as a DICOMDIR file.

Public Functions

id init()

Construct an empty DicomDir.

id ImebraDicomDir::initWithDataSet:error:(ImebraDataSet * pDataSet, NSError ** pError)

Construct an ImebraDicomDir from an ImebraDataSet object.

Parameters
  • pDataSet: the ImebraDataSet created from reading a DICOMDIR file
  • pError: set to an NSError derived class in case of error

ImebraDicomDirEntry* ImebraDicomDir::getNewEntry:error:(ImebraDirectoryRecordType_t recordType, NSError ** pError)

Return a new ImebraDicomDirEntry record for the DICOMDIR.

Return
a new ImebraDicomDirEntry object that can be inserted into the ImebraDicomDir object or one of its children ImebraDicomDirEntry entries.
Parameters
  • recordType: the type of the new entry
  • pError: set to a NSError derived class in case of error

ImebraDicomDirEntry* ImebraDicomDir::getFirstRootEntry:(NSError ** pError)

Retrieve the first ImebraDicomDir’s root entry.

If the root entry is missing then return a null pointer.

Return
the root ImebraDicomDirEntry or a null pointer if the root ImebraDicomDirEntry does noot exist
Parameters
  • pError: set to a NSError derived class in case of error

void ImebraDicomDir::setFirstRootEntry:error:(ImebraDicomDirEntry * firstEntryRecord, (swift_error(nonnull_error)) __attribute__)

Set the specified entry as the first ImebraDicomDir’s root record.

Parameters
  • firstEntryRecord: the DicomDirEntry object to set as the first root entry

ImebraDataSet* ImebraDicomDir::updateDataSet:(NSError ** pError)

This method has to be called to update the managed DataSet after the ImebraDicomDir’s content has been updated.

It is not necessary to call updateDataSet() after every ImebraDicomDir update, just call it when the updated ImebraDataSet object is needed.

Return
the updated managed ImebraDataSet object

ImebraDicomDirEntry

class ImebraDicomDirEntry : public NSObject

Represents a single DICOMDIR entry.

Each entry can be followed by a sibling entry (on the same depth level) and/or can point to its first child entry (one level deeper).

Each ImebraDicomDirEntry object manages a ImebraDataSet which is used to store the entry’s data. The ImebraDataSet objects managed by ImebraDicomDirEntry objects are inserted as sequence items into the ImebraDicomDir’s dataSet.

Public Functions

ImebraDataSet *getEntryDataSet()

Return the ImebraDataSet managed by the ImebraDicomDirEntry object.

Return
the ImebraDataSet managed by the ImebraDicomDirEntry object

ImebraDicomDirEntry *getNextEntry()

Return the next sibling entry (on the same depth level).

If the next ImebraDicomDirEntry is missing (this is the last entry) then return a null pointer.

Return
the next sibling ImebraDicomDirEntry object, or a null pointer if the next sibling does not exist

ImebraDicomDirEntry *getFirstChildEntry()

Return the first child entry (one level deeper).

If the first child ImebraDicomDirEntry is missing then return a null pointer.

Return
the first child ImebraDicomDirEntry object, or a null pointer if there aren’t any children

void ImebraDicomDirEntry::setNextEntry:error:(ImebraDicomDirEntry * pNextEntry, (swift_error(nonnull_error)) __attribute__)

Set the next sibling entry (one the same depth level).

Parameters
  • nextEntry: the next sibling ImebraDicomDirEntry object
  • pError: set to a NSError derived class in case of error

void ImebraDicomDirEntry::setFirstChildEntry:error:(ImebraDicomDirEntry * pFirstChildEntry, (swift_error(nonnull_error)) __attribute__)

Set the first child entry (one level deeper).

Parameters
  • firstChildEntry: the first child ImebraDicomDirEntry object
  • pError: set to a NSError derived class in case of error

NSArray* ImebraDicomDirEntry::getFileParts:(NSError ** pError)

Returns the parts that form the name of the file referenced by the ImebraDicomDirEntry object.

Return
a NSArray of NSString objects that form the name of the file referenced by the ImebraDicomDirEntry object. The last item in the array is the file name, while the preceding items contain the folders names. For instance, the parts “folder0”, “folder1”, “fileName” represent the path “folder0/folder1/fileName”

void ImebraDicomDirEntry::setFileParts:error:(NSArray * pFileParts, (swift_error(nonnull_error)) __attribute__)

Set the parts that form the name of the file referenced by the DicomDirEntry object.

Parameters
  • fileParts: a NSArray of NSString objects that form the name of the file referenced by the ImebraDicomDirEntry object. The last item in the list is the file name, while the preceding items contain the folders names. For instance, the parts “folder0”, “folder1”, “fileName” represent the path “folder0/folder1/fileName”