2017-02-07 13:48:19 -02:00
import { OHIFError } from './OHIFError' ;
/**
* Abstract class to fetch study metadata.
*/
export class StudyMetadataSource {
/**
2017-02-13 12:57:07 -02:00
* Get study metadata for a study with given study InstanceUID.
* @param {String} studyInstanceUID Study InstanceUID.
2017-02-07 13:48:19 -02:00
*/
2017-02-13 12:57:07 -02:00
getByInstanceUID ( studyInstanceUID ) {
2017-02-07 17:44:42 -02:00
/**
* Please override this method on a specialized class.
*/
2017-02-13 12:57:07 -02:00
throw new OHIFError ( 'StudyMetadataSource::getByInstanceUID is not overriden. Please, override it in a specialized class. See OHIFStudyMetadataSource for example' );
2017-02-07 17:44:42 -02:00
}
2017-02-07 13:48:19 -02:00
/**
2017-02-13 12:57:07 -02:00
* Load study info and study metadata for a given study into the viewer.
* @param {StudySummary|StudyMetadata} study of StudySummary or StudyMetadata object.
2017-02-07 13:48:19 -02:00
*/
2017-02-13 12:57:07 -02:00
loadStudy ( study ) {
2017-02-07 17:44:42 -02:00
/**
* Please override this method on a specialized class.
*/
2017-02-13 12:57:07 -02:00
throw new OHIFError ( 'StudyMetadataSource::loadStudy is not overriden. Please, override it in a specialized class. See OHIFStudyMetadataSource for example' );
2017-02-07 17:44:42 -02:00
}
2017-02-13 12:57:07 -02:00
}