|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.pixelmed.dicom.UIDGenerator
public class UIDGenerator
A class for generating new UIDs, deterministically or not, including potentially reproducible Study, Series and SOP Instance UIDs.
| Constructor Summary | |
|---|---|
UIDGenerator()
Create a UID generator. |
|
UIDGenerator(String stamp)
Create a UID generator. |
|
| Method Summary | |
|---|---|
String |
getAnotherNewUID()
Get a different new UID for any purpose. |
String |
getNewSeriesInstanceUID(String studyID,
String seriesNumber)
Get a Series Instance UID. |
String |
getNewSOPInstanceUID(String studyID,
String seriesNumber,
String instanceNumber)
Get a SOP Instance UID. |
String |
getNewStudyInstanceUID(String studyID)
Get a Study Instance UID. |
String |
getNewUID()
Get a new UID for any purpose. |
static void |
main(String[] arg)
Test generating SOP Instance UIDs. |
void |
newStamp()
Reinitialize the UID generator with a new stamp using random and installation specific elements to create a unique root. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UIDGenerator()
Create a UID generator.
This will use random and installation specific elements to create a unique root.
public UIDGenerator(String stamp)
Create a UID generator.
This will use the supplied stamp rather than generating a unique root, to create repeatable UIDs.
stamp - a String of dotted numeric values in UID form| Method Detail |
|---|
public void newStamp()
Reinitialize the UID generator with a new stamp using random and installation specific elements to create a unique root.
For example, use between invocations of getNewUID().
public String getNewUID()
throws DicomException
Get a new UID for any purpose.
This will always be the same for this instance of the UIDGenerator, unless newStamp() has been called since the last time.
DicomException - if result is too long or otherwise not a valid UID
public String getAnotherNewUID()
throws DicomException
Get a different new UID for any purpose.
This will never be the same twice, since newStamp() is called.
DicomException - if result is too long or otherwise not a valid UID
public String getNewStudyInstanceUID(String studyID)
throws DicomException
Get a Study Instance UID.
This will be the same for this instance of the UIDGenerator and the same parameter values.
Only use this if you really need reproducible UIDs; otherwise use getNewUID().
studyID - least significant 4 digits of leading numeric part is used
DicomException - if result is too long or otherwise not a valid UID
public String getNewSeriesInstanceUID(String studyID,
String seriesNumber)
throws DicomException
Get a Series Instance UID.
This will be the same for this instance of the UIDGenerator and the same parameter values.
Only use this if you really need reproducible UIDs; otherwise use getNewUID().
studyID - least significant 4 digits of leading numeric part is usedseriesNumber - least significant 4 digits of leading numeric part is used
DicomException - if result is too long or otherwise not a valid UID
public String getNewSOPInstanceUID(String studyID,
String seriesNumber,
String instanceNumber)
throws DicomException
Get a SOP Instance UID.
This will be the same for this instance of the UIDGenerator and the same parameter values.
Only use this if you really need reproducible UIDs; otherwise use getNewUID().
studyID - least significant 4 digits of leading numeric part is usedseriesNumber - least significant 4 digits of leading numeric part is usedinstanceNumber - least significant 4 digits of leading numeric part is used
DicomException - if result is too long or otherwise not a valid UIDpublic static final void main(String[] arg)
Test generating SOP Instance UIDs.
arg - a single numeric argument that is the number of UIDs to generate
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||