Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DicoogleAccess

Client and main entrypoint to the Dicoogle web API.

Obtain an instance of this type by calling the default export or the export named dicoogleClient.

Hierarchy

  • DicoogleAccess

Index

Properties

Endpoints

Endpoints: Readonly<{ DIC2PNG: string; DICOM_AETITLE_SETTINGS: string; DICOM_QUERY_SETTINGS: string; DICOM_STORAGE_SETTINGS: string; DICTAGS: string; DUMP: string; EXPORT: string; INDEX: string; INDEXER_SETTINGS: string; LOGGER: string; LOGIN: string; LOGOUT: string; PLUGINS: string; PRESETS: string; PROVIDERS: string; QR_SERVICE: string; REMOVE: string; SEARCH: string; SEARCH_DIM: string; STORAGE_SERVICE: string; TASKS: string; TRANSFER_SETTINGS: string; UNINDEX: string; USER: string; VERSION: string; WEBUI: string }> = Endpoints

IndexerSettings

IndexerSettings: Readonly<{ EFFORT: string; INDEX_THUMBNAIL: string; PATH: string; THUMBNAIL_SIZE: string; WATCHER: string; ZIP: string }> = IndexerSettings

ServiceSettings

ServiceSettings: Readonly<{ AUTOSTART: string; PORT: string }> = ServiceSettings

presets

presets: Presets

Export presets namespace

queryRetrieve

queryRetrieve: QueryRetrieveService

Query/Retrieve service namespace

storage

Storage service namespace

tasks

tasks: Tasks

Task namespace

users

users service namespace

Methods

disablePlugin

  • disablePlugin(type: PluginType, name: string, callback?: (error?: Error) => void): Promise<void>
  • Disable a plugin.

    Note: Requires Dicoogle 3.

    Parameters

    • type: PluginType

      the type of plugin

    • name: string

      the name of the plugin

    • Optional callback: (error?: Error) => void

      the callback function

        • (error?: Error): void
        • Parameters

          • Optional error: Error

          Returns void

    Returns Promise<void>

dump

  • dump(uid: string, callback?: (error: any, outcome?: DumpOutcome) => void): Promise<DumpOutcome>
  • dump(uid: string, provider: string | string[], callback?: (error: any, outcome?: DumpOutcome) => void): Promise<DumpOutcome>
  • Retrieve an image's meta-data (perform an information dump)

    Parameters

    • uid: string

      the SOP instance UID

    • Optional callback: (error: any, outcome?: DumpOutcome) => void

      the callback function

    Returns Promise<DumpOutcome>

  • Retrieve an image's meta-data (perform an information dump)

    Parameters

    • uid: string

      the SOP instance UID

    • provider: string | string[]

      a list of provider plugins

    • Optional callback: (error: any, outcome?: DumpOutcome) => void

      the callback function

    Returns Promise<DumpOutcome>

enablePlugin

  • enablePlugin(type: PluginType, name: string, callback?: (error?: Error) => void): Promise<void>
  • Enable a plugin.

    Note: Requires Dicoogle 3.

    Parameters

    • type: PluginType

      the type of plugin

    • name: string

      the name of the plugin

    • Optional callback: (error?: Error) => void

      the callback function

        • (error?: Error): void
        • Parameters

          • Optional error: Error

          Returns void

    Returns Promise<void>

getAETitle

  • getAETitle(callback?: (error: any, aetitle?: string) => void): Promise<string>
  • Retrieve the AE title of the Dicoogle archive.

    Parameters

    • Optional callback: (error: any, aetitle?: string) => void

      the callback function

        • (error: any, aetitle?: string): void
        • Parameters

          • error: any
          • Optional aetitle: string

          Returns void

    Returns Promise<string>

getBase

  • getBase(): string
  • Obtain the base URL of all Dicoogle services. This method is synchronous.

    Returns string

    the currently configured base endpoint of Dicoogle

getIndexProviders

  • getIndexProviders(callback?: (error: any, result?: string[]) => void): Promise<string[]>
  • Retrieve a list of index provider plugins

    Parameters

    • Optional callback: (error: any, result?: string[]) => void

      the callback function

        • (error: any, result?: string[]): void
        • Parameters

          • error: any
          • Optional result: string[]

          Returns void

    Returns Promise<string[]>

getIndexerSettings

  • getIndexerSettings(callback?: (error: any, outcome?: IndexerSettings) => void): Promise<IndexerSettings>
  • getIndexerSettings<T>(field: string, callback?: (error: any, outcome?: T) => void): Promise<T>
  • Get the current Indexer settings. Unless a specific field is mentioned, all indexer settings will be provided. The type of the given outcome depends on whether a particular field was chosen or all of them were requested.

    Parameters

    Returns Promise<IndexerSettings>

  • Type parameters

    • T

    Parameters

    • field: string
    • Optional callback: (error: any, outcome?: T) => void
        • (error: any, outcome?: T): void
        • Parameters

          • error: any
          • Optional outcome: T

          Returns void

    Returns Promise<T>

getPlugins

  • Obtain a detailed description of all plugins installed.

    Note: Requires Dicoogle 3.

    Parameters

    Returns Promise<PluginsResponse>

  • Obtain a detailed description of plugins of the given type or category.

    Note: Requires Dicoogle 3.

    Parameters

    • type: PluginInfoType

      the type of plugins or information to include in the response

    • Optional callback: (error: any, response?: Partial<PluginsResponse>) => void

      the callback function

    Returns Promise<Partial<PluginsResponse>>

getPreviewUrl

  • getPreviewUrl(id: string, frame?: number): string
  • Obtain a URL pointing to an item's quick preview of the image. This function is synchronous.

    Parameters

    • id: string

      a SOPInstanceUID or URI of the item

    • Optional frame: number

      the frame number, if applicable

    Returns string

    the full URL to the preview

getProviders

  • getProviders(callback?: (error: any, result?: string[]) => void): Promise<string[]>
  • getProviders(type: string, callback?: (error: any, result?: string[]) => void): Promise<string[]>
  • Retrieve a list of query provider plugins

    Parameters

    • Optional callback: (error: any, result?: string[]) => void

      the callback function

        • (error: any, result?: string[]): void
        • Parameters

          • error: any
          • Optional result: string[]

          Returns void

    Returns Promise<string[]>

  • Retrieve a list of provider plugins

    Parameters

    • type: string

      the type of provider ("query", "index", ...) - defaults to "query"

    • Optional callback: (error: any, result?: string[]) => void

      the callback function

        • (error: any, result?: string[]): void
        • Parameters

          • error: any
          • Optional result: string[]

          Returns void

    Returns Promise<string[]>

getQueryProviders

  • getQueryProviders(callback?: (error: any, result?: string[]) => void): Promise<string[]>
  • Retrieve a list of query provider plugins

    Parameters

    • Optional callback: (error: any, result?: string[]) => void

      the callback function

        • (error: any, result?: string[]): void
        • Parameters

          • error: any
          • Optional result: string[]

          Returns void

    Returns Promise<string[]>

getRawLog

  • getRawLog(callback?: (error: any, text?: string) => void): Promise<string>
  • Retrieve the Dicoogle server's log text.

    Parameters

    • Optional callback: (error: any, text?: string) => void

      the callback function

        • (error: any, text?: string): void
        • Parameters

          • error: any
          • Optional text: string

          Returns void

    Returns Promise<string>

getRoles

  • getRoles(): string[] | null
  • Get the names of the roles assigned to this user.

    Returns string[] | null

    an array of role names, null if the user is not authenticated

getStorageProviders

  • getStorageProviders(callback?: (error: any, result?: string[]) => void): Promise<string[]>
  • Retrieve a list of storage interface plugins

    Parameters

    • Optional callback: (error: any, result?: string[]) => void

      the callback function

        • (error: any, result?: string[]): void
        • Parameters

          • error: any
          • Optional result: string[]

          Returns void

    Returns Promise<string[]>

getThumbnailUrl

  • getThumbnailUrl(id: string, frame?: number): string
  • Obtain a URL pointing to an item's thumbnail. This function is synchronous.

    Parameters

    • id: string

      a SOPInstanceUID or URI of the item

    • Optional frame: number

      the frame number, if applicable

    Returns string

    the full URL to the thumbnail

getToken

  • getToken(): string | null
  • [EXPERTS] Retrieve the authentication token. This token is ephemeral and may expire after some time. This method is synchronous. Use it only when you know what you are doing.

    Returns string | null

    the user's current authentication token, null if the user is not authenticated

getTransferSyntaxSettings

getUsername

  • getUsername(): string | null
  • Get the user name of the currently authenticated user.

    Returns string | null

    the unique user name, null if the use is not authenticated

getVersion

  • getVersion(callback?: (error: any, outcome: { version: string }) => void): Promise<{ version: string }>
  • Retrieve the running Dicoogle version.

    Parameters

    • Optional callback: (error: any, outcome: { version: string }) => void

      the callback function

        • (error: any, outcome: { version: string }): void
        • Parameters

          • error: any
          • outcome: { version: string }
            • version: string

          Returns void

    Returns Promise<{ version: string }>

getWebUIPlugins

  • getWebUIPlugins(slotId?: string | null, callback?: (error: any, plugins?: WebUIPlugin[]) => void): Promise<WebUIPlugin[]>
  • Retrieve information about currently installed web UI plugins.

    Parameters

    • Optional slotId: string | null

      the identifiers of slots to contemplate, retrieve all kinds if empty or null

    • Optional callback: (error: any, plugins?: WebUIPlugin[]) => void

      the callback function

        • Parameters

          Returns void

    Returns Promise<WebUIPlugin[]>

index

  • index(uri: string | string[], callback?: (error: any) => void): Promise<void>
  • index(uri: string | string[], provider: string | string[], callback?: (error: any) => void): Promise<void>
  • Request a new indexing task over a given URI. The operation is recursive, indexing anything in the URI's endpoint.

    Parameters

    • uri: string | string[]

      a URI or array of URIs representing the root resource of the files to be indexed

    • Optional callback: (error: any) => void

      the function to call when the task is successfully issued

        • (error: any): void
        • Parameters

          • error: any

          Returns void

    Returns Promise<void>

  • Request a new indexation task over a given URI. The operation is recursive, indexing anything in the URI's endpoint.

    Parameters

    • uri: string | string[]

      a URI or array of URIs representing the root resource of the files to be indexed

    • provider: string | string[]

      a provider or array of provider names in which the indexation will carry out, all by default

    • Optional callback: (error: any) => void

      the function to call when the task is successfully issued

        • (error: any): void
        • Parameters

          • error: any

          Returns void

    Returns Promise<void>

isAuthenticated

  • isAuthenticated(): boolean
  • Check whether the user is authenticated to the server. Authenticated clients will hold an authentication token.

    Returns boolean

    whether the user is authenticated or not.

issueExport

  • issueExport(query: string, fields: string | string[], callback?: (error: any, uid?: string) => void): Promise<string>
  • issueExport(query: string, fields: string | string[], options: ExportOptions, callback?: (error: any, uid?: string) => void): Promise<string>
  • Request a CSV file of the results.

    Parameters

    • query: string

      the query to perform

    • fields: string | string[]

      a set of field names to be passed to the query providers when requesting the query. The same fields will be provided in the resulting CSV file, in the given order.

    • Optional callback: (error: any, uid?: string) => void

      the callback function providing the UID of the file

        • (error: any, uid?: string): void
        • Parameters

          • error: any
          • Optional uid: string

          Returns void

    Returns Promise<string>

  • Parameters

    • query: string
    • fields: string | string[]
    • options: ExportOptions
    • Optional callback: (error: any, uid?: string) => void
        • (error: any, uid?: string): void
        • Parameters

          • error: any
          • Optional uid: string

          Returns void

    Returns Promise<string>

login

  • Manually log in to Dicoogle using the given credentials.

    Parameters

    • username: string

      the unique user name for the client

    • password: password

      the user's password for authentication

    • Optional callback: (error: any, outcome?: LoginOutcome) => void

      the callback function providing the authentication token and user information

    Returns Promise<LoginOutcome>

logout

  • logout(callback?: (error: any) => void): Promise<void>
  • Log out from the server.

    Parameters

    • Optional callback: (error: any) => void

      the callback function

        • (error: any): void
        • Parameters

          • error: any

          Returns void

    Returns Promise<void>

remove

  • remove(uri: string | string[], callback?: (error: any) => void): Promise<void>
  • Request that the file at the given URI is permanently removed. The operation, unlike index(), is not recursive. Indices will not be updated, hence the files should be unindexed manually if so is intended.

    Parameters

    • uri: string | string[]

      a URI or array of URIs representing the files to be removed

    • Optional callback: (error: any) => void

      the function to call on completion

        • (error: any): void
        • Parameters

          • error: any

          Returns void

    Returns Promise<void>

request

  • request(uri: string | string[]): SuperAgentRequest
  • request(method: string, uri: string | string[]): SuperAgentRequest
  • Perform a generic GET request to Dicoogle's services. Users of this method can invoke any REST service exposed by Dicoogle, including those from plugins. The resulting object is the start of a SuperAgent request.

    Parameters

    • uri: string | string[]

      a URI or array of resource sequences to the service, relative to Dicoogle's base URL. There should be no leading slash ('/').

    Returns SuperAgentRequest

    a superagent request object

  • Perform a generic request to Dicoogle's services. Users of this method can invoke any REST service exposed by Dicoogle, including those from plugins. The resulting object is the start of a SuperAgent request.

    Parameters

    • method: string

      the kind of HTTP method to make, defaults to "GET"

    • uri: string | string[]

      a URI or array of resource sequences to the service, relative to Dicoogle's base URL. There should be no leading slash ('/').

    Returns SuperAgentRequest

    a superagent request object

reset

  • reset(): void
  • [EXPERTS] Clear this object's user session information. This method is synchronous. Use it only when you know what you are doing.

    Returns void

restoreSession

  • restoreSession(token: string, callback?: (error: any, outcome?: UserInfo) => void): Promise<UserInfo>
  • Restore a living Dicoogle session identified by the given token.

    Parameters

    • token: string

      the same user's token of a previous session

    • Optional callback: (error: any, outcome?: UserInfo) => void

      the callback function providing user information

        • (error: any, outcome?: UserInfo): void
        • Parameters

          Returns void

    Returns Promise<UserInfo>

search

  • Perform a text query.

    Parameters

    • query: string

      text query

    • Optional callback: (error: any, outcome: SearchOutcome) => void

      the callback function providing the outcome

    Returns Promise<SearchOutcome>

  • Perform a text query.

    Parameters

    • query: string

      text query

    • options: SearchOptions

      a set of options related to the search

    • Optional callback: (error: any, outcome: SearchOutcome) => void

      the callback function providing the outcome

    Returns Promise<SearchOutcome>

searchDIM

  • Perform a text query with DIM-formatted outcome.

    Parameters

    • query: string

      text query

    • Optional callback: (error: Error | null, outcome?: SearchDIMOutcome) => void

      the callback function providing the outcome

    Returns Promise<SearchDIMOutcome>

  • Perform a text query with DIM-formatted outcome.

    Parameters

    • query: string

      text query

    • options: SearchDIMOptions

      a hash of options related to the search

    • Optional callback: (error: Error | null, outcome?: SearchDIMOutcome) => void

      the callback function providing the outcome

    Returns Promise<SearchDIMOutcome>

setAETitle

  • setAETitle(aetitle: string, callback?: (error: any) => void): Promise<void>
  • Redefine the AE title of the Dicoogle archive.

    Parameters

    • aetitle: string

      a valid AE title for the PACS archive

    • Optional callback: (error: any) => void

      the callback function

        • (error: any): void
        • Parameters

          • error: any

          Returns void

    Returns Promise<void>

setIndexerSettings

  • setIndexerSettings(fields: {}, callback?: (error: any) => void): Promise<void>
  • setIndexerSettings(fieldName: string, value: any, callback?: (error: any) => void): Promise<void>
  • Set a portions of the Indexer settings.

    Parameters

    • fields: {}

      a dictionary of settings and their respective values

      • [fieldName: string]: any
    • Optional callback: (error: any) => void

      the callback function

        • (error: any): void
        • Parameters

          • error: any

          Returns void

    Returns Promise<void>

  • Set a particular Indexer setting. A valid field and value is required.

    Parameters

    • fieldName: string

      either a dictionary of settings or the name of a particular field to set

    • value: any

      the value to assign to the field, required the first argument is a string

    • Optional callback: (error: any) => void

      the callback function

        • (error: any): void
        • Parameters

          • error: any

          Returns void

    Returns Promise<void>

setToken

  • setToken(token: string): void
  • [EXPERTS] Assign the module's session token internally. This method is synchronous. Use it only when you know what you are doing. When restoring a previous (but still living) session, please prefer [@link restoreSession] instead.

    Parameters

    • token: string

      the same user's token of a previous session

    Returns void

setTransferSyntaxOption

  • setTransferSyntaxOption(uid: string, option: string, value: boolean, callback?: (error: any) => void): Promise<void>
  • Set (or reset) an option of a particular transfer syntax.

    Parameters

    • uid: string

      the unique identifier of the transfer syntax

    • option: string

      the name of the option to modify

    • value: boolean

      whether to set (true) or reset (false) the option

    • Optional callback: (error: any) => void

      the callback function

        • (error: any): void
        • Parameters

          • error: any

          Returns void

    Returns Promise<void>

unindex

  • unindex(uri: string | string[], callback?: (error: any) => void): Promise<void>
  • unindex(uri: string | string[], provider: string | string[], callback?: (error: any) => void): Promise<void>
  • Request that the file at the given URI is unindexed. The operation, unlike index(), is not recursive.

    Parameters

    • uri: string | string[]

      a URI or array of URIs representing the files to be unindexed

    • Optional callback: (error: any) => void

      the function to call on completion

        • (error: any): void
        • Parameters

          • error: any

          Returns void

    Returns Promise<void>

  • Request that the file at the given URI is unindexed. The operation, unlike index(), is not recursive.

    Parameters

    • uri: string | string[]

      a URI or array of URIs representing the files to be unindexed

    • provider: string | string[]

      a provider or array of provider names in which the unindexation will carry out, all by default

    • Optional callback: (error: any) => void

      the function to call on completion

        • (error: any): void
        • Parameters

          • error: any

          Returns void

    Returns Promise<void>

Generated using TypeDoc