Move ohif:metadata into ohif:core
This commit is contained in:
parent
700fff763c
commit
da36c33c70
11
Packages/ohif-core/client/classes/metadata/index.js
Normal file
11
Packages/ohif-core/client/classes/metadata/index.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import { OHIFStudyMetadata } from './OHIFStudyMetadata';
|
||||||
|
import { OHIFSeriesMetadata } from './OHIFSeriesMetadata';
|
||||||
|
import { OHIFInstanceMetadata } from './OHIFInstanceMetadata';
|
||||||
|
|
||||||
|
const metadata = {
|
||||||
|
OHIFStudyMetadata,
|
||||||
|
OHIFSeriesMetadata,
|
||||||
|
OHIFInstanceMetadata
|
||||||
|
}
|
||||||
|
|
||||||
|
export default metadata;
|
||||||
11
Packages/ohif-core/client/metadata.js
Normal file
11
Packages/ohif-core/client/metadata.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import { OHIF } from 'meteor/ohif:core';
|
||||||
|
import { metadata } from '/client/classes/metadata/';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Append Metadata namespace to OHIF namespace...
|
||||||
|
*/
|
||||||
|
|
||||||
|
OHIF.metadata = metadata;
|
||||||
|
|
||||||
|
export { metadata };
|
||||||
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
import { Metadata } from '../namespace';
|
|
||||||
|
|
||||||
// OHIFStudyMetadata, OHIFSeriesMetadata, OHIFInstanceMetadata
|
|
||||||
import { OHIFStudyMetadata } from './OHIFStudyMetadata';
|
|
||||||
import { OHIFSeriesMetadata } from './OHIFSeriesMetadata';
|
|
||||||
import { OHIFInstanceMetadata } from './OHIFInstanceMetadata';
|
|
||||||
|
|
||||||
Metadata.StudyMetadata = OHIFStudyMetadata;
|
|
||||||
Metadata.SeriesMetadata = OHIFSeriesMetadata;
|
|
||||||
Metadata.InstanceMetadata = OHIFInstanceMetadata;
|
|
||||||
@ -1,39 +0,0 @@
|
|||||||
/**
|
|
||||||
* Import namespace...
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { OHIF, Metadata } from './namespace.js';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Import scripts that will populate the Metadata namespace as a side effect only import. This is effectively the public API...
|
|
||||||
*/
|
|
||||||
|
|
||||||
import './client/'; // which is actually: import './client/index.js';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Export relevant objects...
|
|
||||||
*
|
|
||||||
* With the following export it becomes possible to import "OHIF" from "ohif:core" and "Metadata"
|
|
||||||
* from "ohif:metadata" using a single import (a shorthand), like this:
|
|
||||||
*
|
|
||||||
* import { OHIF } from 'meteor/ohif:metadata';
|
|
||||||
*
|
|
||||||
* Which is equivalent to:
|
|
||||||
*
|
|
||||||
* import { OHIF } from 'meteor/ohif:core';
|
|
||||||
* import 'meteor/ohif:metadata';
|
|
||||||
*
|
|
||||||
* The second (extended) format should be used when other OHIF packages are also to be used within
|
|
||||||
* the current module. This makes it explicit that the following imports will populate their
|
|
||||||
* respective namespaces within the to "OHIF" namespace. Example:
|
|
||||||
*
|
|
||||||
* import { OHIF } from 'meteor/ohif:core';
|
|
||||||
* import 'meteor/ohif:metadata';
|
|
||||||
* import 'meteor/ohif:hanging-protocols';
|
|
||||||
* [ ... ]
|
|
||||||
* OHIF.metadata.setActiveViewport(...);
|
|
||||||
* OHIF.hangingprotocols.doSomething(...);
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
export { OHIF, Metadata };
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
/**
|
|
||||||
* Import main dependency...
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { OHIF } from 'meteor/ohif:core';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create Metadata namespace...
|
|
||||||
*/
|
|
||||||
|
|
||||||
const Metadata = {};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Append Metadata namespace to OHIF namespace...
|
|
||||||
*/
|
|
||||||
|
|
||||||
OHIF.metadata = Metadata;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Export relevant objects...
|
|
||||||
*/
|
|
||||||
|
|
||||||
export { OHIF, Metadata };
|
|
||||||
Loading…
Reference in New Issue
Block a user