MODALIZER SDK  3.2.2.34
Public Member Functions | Properties | List of all members
IDCXSR Interface Reference

The DCXSR Interface is used for quickly creating DICOM Structured Reports. More...

Inherits IDispatch.

Public Member Functions

HRESULT AddContent ([in] BSTR Code, [in] BSTR Designator, [in] BSTR Meaning, [in] VARIANT Value)
 
HRESULT AddDictContainer ([in] BSTR Code, [in] SR_CONTINUITY continuity)
 Add a container node that is defined in the dictionary file StructuredReport.dic. More...
 
HRESULT AddDictValue ([in] BSTR Code, [in] BSTR Value)
 Adds a value that is defined in the dictionary file StructuredReport.dic The Value type is determined from the dictionary. If value type is numeric, then the units has to be defined in the dictionary. More...
 
HRESULT AddDictTextValue ([in] BSTR Code, [in] BSTR TextValue)
 Adds a TEXT value that is defined in the dictionary file StructuredReport.dic. More...
 
HRESULT AddDictCodedValue ([in] BSTR Code, [in] BSTR CodedValue)
 Adds a CODE value that is defined in the dictionary file StructuredReport.dic If value type is numeric, then the units has to be defined in the dictionary. More...
 
HRESULT AddDictPersonNameValue ([in] BSTR Code, [in] BSTR PersonNameValue)
 Adds a PNAME (Person Name) node that is defined in the dictionary file StructuredReport.dic. More...
 
HRESULT AddDictDateValue ([in] BSTR Code, [in] VARIANT)
 Adds a DATE node that is defined in the dictionary file StructuredReport.dic. More...
 
HRESULT AddDictTimeValue ([in] BSTR Code, [in] VARIANT)
 Adds a TIME node that is defined in the dictionary file StructuredReport.dic. More...
 
HRESULT AddDictDateTimeValue ([in] BSTR Code, [in] VARIANT)
 Adds a DATETIME node that is defined in the dictionary file StructuredReport.dic. More...
 
HRESULT AddDictNumericValue ([in] BSTR Code, [in] float NumericValue, [in] BSTR Units)
 Adds a NUM (Numeric) node that is defined in the dictionary file StructuredReport.dic with optional units code. More...
 
HRESULT AddDictUIDREFValue ([in] BSTR Code, [in] BSTR UID)
 Adds a UIDREF (Unique Identifier Reference) node that is defined in the dictionary file StructuredReport.dic. More...
 
HRESULT AddDictCompositeValue ([in] BSTR Code, [in] BSTR SOPClassUID, [in] BSTR SOPInstanceUID)
 Adds a COMPOSITE (Unique Identifier Reference) node that is defined in the dictionary file StructuredReport.dic. More...
 
HRESULT AddDictImageValue ([in] BSTR CodeOrRelType, [in] BSTR SOPClassUID, [in] BSTR SOPInstanceUID, [in] BSTR FrameNumbers, [in] BSTR PS_SOPClassUID, [in] BSTR PS_SOPInstanceUID)
 Adds a IMAGE node that is defined in the dictionary file StructuredReport.dic. More...
 
HRESULT AddDictWaveformValue ([in] BSTR Code, [in] BSTR SOPClassUID, [in] BSTR SOPInstanceUID, [in] VARIANT WaveformCahnnels)
 Adds a WAVEFORM node that is defined in the dictionary file StructuredReport.dic. More...
 
HRESULT AddDictSCOORDValue ([in] BSTR Code, [in] SR_GRAPHIC_TYPE GraphicType, [in] VARIANT GraphicData)
 Adds a SCOORD (Spatial Coordinates) node that is defined in the dictionary file StructuredReport.dic. More...
 
HRESULT AddDictTCOORDValue ([in] BSTR Code, [in] SR_TEMPORAL_RANGE_TYPE TemporalRangeType, [in] VARIANT ReferencedTimes)
 Adds a TCOORD (Time Coordinates) node that is defined in the dictionary file StructuredReport.dic The third parameter, ReferencedTimes, is an array of time points in one of the following representations: More...
 
HRESULT CreateNewReport ([in] BSTR SOPClassUID, [in] BSTR TitleCode)
 Create a new report. More...
 
HRESULT UpOneLevel ()
 Go up one level in the tree. More...
 
HRESULT OpenDictionary (BSTR filename)
 Open dictionary for use in further calls. More...
 
HRESULT AddReferencedContentItem ([in] SR_RELATIONSHIP_TYPE RelType, [in] SR_NODE_ID Val)
 Add a referenced content item. See CurrentNodeID.
 
HRESULT AddImageValue ([in] SR_RELATIONSHIP_TYPE RelType, [in] BSTR SOPClassUID, [in] BSTR SOPInstanceUID, [in] BSTR FrameNumbers, [in] BSTR PS_SOPClassUID, [in] BSTR PS_SOPInstanceUID)
 
HRESULT ToHtml ([out, retval] BSTR *htmlString)
 Write the report content as HTML.
 

Properties

pVal Object [get, set]
 Set/Get report content as a DICOM Object.
 
pVal CurrentNodeID [get]
 
BSTR XML [get, set]
 Set/Get XML representation of the report.
 

Detailed Description

The DCXSR Interface is used for quickly creating DICOM Structured Reports.

Structured Reporting API (SR)

This feature is not part of the default license and requires R2 license. For more detailed on licening please check the relevant pages on our web site www.roniza.com Structured Reporting can be evaluated in the trial version. The SR API design is based on the tabular programming for easy creation and validation of SR Documents. The entries are defined in a text file, called StructuredReport.dic. This dictionary file should be placed in the execution directory of the program.

Member Function Documentation

◆ AddContent()

HRESULT IDCXSR::AddContent ( [in] BSTR  Code,
[in] BSTR  Designator,
[in] BSTR  Meaning,
[in] VARIANT  Value 
)
Note
Not implemented

◆ AddDictCodedValue()

HRESULT IDCXSR::AddDictCodedValue ( [in] BSTR  Code,
[in] BSTR  CodedValue 
)

Adds a CODE value that is defined in the dictionary file StructuredReport.dic If value type is numeric, then the units has to be defined in the dictionary.

Postcondition
Next item will be added after this node, as a sibling.

◆ AddDictCompositeValue()

HRESULT IDCXSR::AddDictCompositeValue ( [in] BSTR  Code,
[in] BSTR  SOPClassUID,
[in] BSTR  SOPInstanceUID 
)

Adds a COMPOSITE (Unique Identifier Reference) node that is defined in the dictionary file StructuredReport.dic.

Precondition
Both SOP Class UID and SOP Instance UID must be set and not null.
Postcondition
Next item will be added after this node, as a sibling. This method is similar to AddDictImageValue but for objects that are not images, for example presentation states or other objects.
Parameters
CodeThe code defining the concept name of the value using the dictionary. The Code may be NULL if the IMAGE node is added as a child node of a TCOORD or SCOORD. See see D. Clunie DICOM SR BOOK at http://www.pixelmed.com/srbook.html p. 102
SOPClassUIDThe SOP Class UID Value to add
SOPInstanceUIDThe SOP Class Instance Value to add

◆ AddDictContainer()

HRESULT IDCXSR::AddDictContainer ( [in] BSTR  Code,
[in] SR_CONTINUITY  continuity 
)

Add a container node that is defined in the dictionary file StructuredReport.dic.

Postcondition
Next item will be added as a child. Call UpOneLevel to go back to previous level.
Parameters
CodeThe code that uniquely identifies this entry
continuityContinuity of this container. This parameter is currently not in use and is ignored.

◆ AddDictDateTimeValue()

HRESULT IDCXSR::AddDictDateTimeValue ( [in] BSTR  Code,
[in] VARIANT   
)

Adds a DATETIME node that is defined in the dictionary file StructuredReport.dic.

Postcondition
Next item will be added after this node, as a sibling.
Parameters
CodeThe code defining the concept name of the value using the dictionary

◆ AddDictDateValue()

HRESULT IDCXSR::AddDictDateValue ( [in] BSTR  Code,
[in] VARIANT   
)

Adds a DATE node that is defined in the dictionary file StructuredReport.dic.

Postcondition
Next item will be added after this node, as a sibling.

◆ AddDictImageValue()

HRESULT IDCXSR::AddDictImageValue ( [in] BSTR  CodeOrRelType,
[in] BSTR  SOPClassUID,
[in] BSTR  SOPInstanceUID,
[in] BSTR  FrameNumbers,
[in] BSTR  PS_SOPClassUID,
[in] BSTR  PS_SOPInstanceUID 
)

Adds a IMAGE node that is defined in the dictionary file StructuredReport.dic.

Precondition
SOPClassUID and SOPInstanceUID must have value. if PS_SOPClassUID has a value then PS_SOPInstanceUID must have value as well.
Postcondition
Next item will be added after this node, as a sibling.
Note
If the Code is NULL then there is no concept mode and the relationship type is by default "SELECTED FROM"
Parameters
CodeOrRelTypeThe code defining the concept name of the value using the dictionary. The Code may be NULL if the IMAGE node is added as a child node of a TCOORD or SCOORD. See see D. Clunie DICOM SR BOOK at http://www.pixelmed.com/srbook.html p. 102
SOPClassUIDThe SOP Class UID of the referenced image
SOPInstanceUIDThe SOP Instance UID of the referenced image
FrameNumbersOptional ; separated list of referenced frame numbers (e.g. "5;8" means reference to frames 5 and 8) or NULL
PS_SOPClassUIDOptional SOP Class UID of referenced Presentation State for the referenced image or NULL
PS_SOPInstanceUIDOptional SOP Instance UID of referenced Presentation State for the referenced image or NULL

◆ AddDictNumericValue()

HRESULT IDCXSR::AddDictNumericValue ( [in] BSTR  Code,
[in] float  NumericValue,
[in] BSTR  Units 
)

Adds a NUM (Numeric) node that is defined in the dictionary file StructuredReport.dic with optional units code.

Postcondition
Next item will be added after this node, as a sibling.
Parameters
CodeThe code defining the concept name of the value using the dictionary
NumericValueThe numeric value
UnitsIf provided, overrides the units defined in the dictionary

◆ AddDictPersonNameValue()

HRESULT IDCXSR::AddDictPersonNameValue ( [in] BSTR  Code,
[in] BSTR  PersonNameValue 
)

Adds a PNAME (Person Name) node that is defined in the dictionary file StructuredReport.dic.

Postcondition
Next item will be added after this node, as a sibling.

◆ AddDictSCOORDValue()

HRESULT IDCXSR::AddDictSCOORDValue ( [in] BSTR  Code,
[in] SR_GRAPHIC_TYPE  GraphicType,
[in] VARIANT  GraphicData 
)

Adds a SCOORD (Spatial Coordinates) node that is defined in the dictionary file StructuredReport.dic.

An SCOORD content item will always have one or more children that are of IMAGE value type

Postcondition
Next item will be added as a child. Call UpOneLevel to go back to previous level. This is because an SCCORD must have an IMAGE item with relationship type "SELECTED FROM" For more information see D. Clunie DICOM SR BOOK at http://www.pixelmed.com/srbook.html
Note
The graphic data is a Nx2 array. When calling from C++ with 10 points, this means float GraphicType[10][2] but from C#
Parameters
CodeThe code defining the concept name of the value using the dictionary
GraphicTypeGraphic Type. See SR_GRAPHIC_TYPE
GraphicDataA two dimenstional array (in C++ use SAFEARRAY) with dimentions Nx2 with float data values of the graphic. First point X is GraphicData[0][0] and First Point Y is GraphicData[0][1]

◆ AddDictTCOORDValue()

HRESULT IDCXSR::AddDictTCOORDValue ( [in] BSTR  Code,
[in] SR_TEMPORAL_RANGE_TYPE  TemporalRangeType,
[in] VARIANT  ReferencedTimes 
)

Adds a TCOORD (Time Coordinates) node that is defined in the dictionary file StructuredReport.dic The third parameter, ReferencedTimes, is an array of time points in one of the following representations:

  • Float 64 (double) if the values are time offsets
  • String (BSTR) if the values are specific date-times
  • ULONG 32 (unsigne long) if the values are sample positions If other values are passed an invalid argument error is returned (or thrown)
    Postcondition
    Next item will be added as a child. Call UpOneLevel to go back to previous level.
Parameters
CodeThe code defining the concept name of the value using the dictionary
TemporalRangeTypeTemporal Range Type. See SR_TEMPORAL_RANGE_TYPE
ReferencedTimesAn array with the time values

◆ AddDictTextValue()

HRESULT IDCXSR::AddDictTextValue ( [in] BSTR  Code,
[in] BSTR  TextValue 
)

Adds a TEXT value that is defined in the dictionary file StructuredReport.dic.

Postcondition
Next item will be added after this node, as a sibling.

◆ AddDictTimeValue()

HRESULT IDCXSR::AddDictTimeValue ( [in] BSTR  Code,
[in] VARIANT   
)

Adds a TIME node that is defined in the dictionary file StructuredReport.dic.

Postcondition
Next item will be added after this node, as a sibling.

◆ AddDictUIDREFValue()

HRESULT IDCXSR::AddDictUIDREFValue ( [in] BSTR  Code,
[in] BSTR  UID 
)

Adds a UIDREF (Unique Identifier Reference) node that is defined in the dictionary file StructuredReport.dic.

Postcondition
Next item will be added after this node, as a sibling.
Parameters
CodeThe code defining the concept name of the value using the dictionary
UIDThe UID Value to add

◆ AddDictValue()

HRESULT IDCXSR::AddDictValue ( [in] BSTR  Code,
[in] BSTR  Value 
)

Adds a value that is defined in the dictionary file StructuredReport.dic The Value type is determined from the dictionary. If value type is numeric, then the units has to be defined in the dictionary.

Postcondition
Next item will be added after this node, as a sibling.
Parameters
CodeThe code that uniquely identifies this entry
ValueThe value of this entry in string representation. The value will be parsed based on the value type in the dictionary.

◆ AddDictWaveformValue()

HRESULT IDCXSR::AddDictWaveformValue ( [in] BSTR  Code,
[in] BSTR  SOPClassUID,
[in] BSTR  SOPInstanceUID,
[in] VARIANT  WaveformCahnnels 
)

Adds a WAVEFORM node that is defined in the dictionary file StructuredReport.dic.

Precondition
Waveform Channels items must be pairs of unisgned shorts (U2) for the (M,C) tuples.
Postcondition
Next item will be added after this node, as a sibling.
Parameters
CodeThe code defining the concept name of the value using the dictionary.
SOPClassUIDThe SOP Class UID of the referenced Waveform
SOPInstanceUIDThe SOP Instance UID of the referenced Waveform
WaveformCahnnelsAn array with 2 - 2n selected Waveform channel numbers (unsigned shorts)

◆ AddImageValue()

HRESULT IDCXSR::AddImageValue ( [in] SR_RELATIONSHIP_TYPE  RelType,
[in] BSTR  SOPClassUID,
[in] BSTR  SOPInstanceUID,
[in] BSTR  FrameNumbers,
[in] BSTR  PS_SOPClassUID,
[in] BSTR  PS_SOPInstanceUID 
)

Add image node with no concept name Use this method to add image node without concept name. This is usefull for key images and references.

Postcondition
Next item will be added after this node, as a sibling.
Parameters
RelTypeThe relationship with parent
SOPClassUIDThe SOP Class UID of the referenced image
SOPInstanceUIDThe SOP Instance UID of the referenced image
FrameNumbersOptional ; separated list of referenced frame numbers (e.g. "5;8" means reference to frames 5 and 8) or NULL
PS_SOPClassUIDOptional SOP Class UID of referenced Presentation State for the referenced image or NULL
PS_SOPInstanceUIDOptional SOP Instance UID of referenced Presentation State for the referenced image or NULL

◆ CreateNewReport()

HRESULT IDCXSR::CreateNewReport ( [in] BSTR  SOPClassUID,
[in] BSTR  TitleCode 
)

Create a new report.

This operation discards any prviously added data. Currently supported SOP Classes:

Parameters
SOPClassUIDA valid SR SOP Class
TitleCodeA code, predefined in the dictionary file for the document title

◆ OpenDictionary()

HRESULT IDCXSR::OpenDictionary ( BSTR  filename)

Open dictionary for use in further calls.

Precondition
This call must be made before using any entry from this dictionary.
Postcondition
The in memory represetnation of the dictionary is replaced by the content of the new dictionary. The dictionary file defines the codes, types, values and relations of and between node. By default, the dictionary filename is StructuredReport.dic and is located in the application folder. For detailed explanation of the use and format of the dictionary, see StructuredReport.dic.

◆ UpOneLevel()

HRESULT IDCXSR::UpOneLevel ( )

Go up one level in the tree.

When adding a container item, next item will be added to it. In order to add items after the container item, call this method.

Property Documentation

◆ CurrentNodeID

pVal IDCXSR::CurrentNodeID
getproperty

The ID of the current item. If an item was just added, then this is the ID of it. If UpOneLevel was called then the returned value is of the parent and so on.