Package com.pixelmed.apps

# Class RemapUIDs

java.lang.Object
com.pixelmed.apps.RemapUIDs

public class RemapUIDs extends Object

A class to read a map of Study, Series, SOP Instance and Frame of Reference UIDs pairs, and then remap occurences in a set of DICOM files to the other member of the pair.

Useful, for example, when UIDs have been changed, annotations made, and there is a need to apply the annotations back to the originals.

See Also:
  - `UIDMapByMatchingPixelData`
  - `MergeCompositeContext`

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`protected class`
`RemapUIDs.OurMediaImporter`

## Field Summary

Fields
Modifier and Type
Field
Description
`protected String`
`ourAETitle`

## Constructor Summary

Constructors
Constructor
Description
`RemapUIDs(String uidmapFileName, String srcFolderName, String dstFolderName)`
Change UIDs based on UID map file.

## Method Summary

Modifier and Type
Method
Description
`static void`
`main(String[] arg)`
Change UIDs based on UID map file.
`static void`
`remapUIDs(AttributeList list, Set<String> setOfCanonicalUIDs, Map<String,String> mapOfOtherUIDToCanonicalUID)`
Change all non-canonical UIDs that can be mapped to a canonical UID.

### Methods inherited from class java.lang.Object

`clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### ourAETitle

protected String ourAETitle

## Constructor Details

### RemapUIDs

public RemapUIDs(String uidmapFileName, String srcFolderName, String dstFolderName) throws FileNotFoundException, IOException, DicomException

Change UIDs based on UID map file.

The order of UIDs in the map file is important, the first of tab-separated multiple UIDs in one line being the canonical UID to which the others on the line are remapped.

Parameters:
  `uidmapFileName` -
  `srcFolderName` -
  `dstFolderName` -
Throws:
  `FileNotFoundException`
  `IOException`
  `DicomException`

## Method Details

### remapUIDs

public static void remapUIDs(AttributeList list, Set<String> setOfCanonicalUIDs, Map<String,String> mapOfOtherUIDToCanonicalUID)

Change all non-canonical UIDs that can be mapped to a canonical UID.

Leaves canonical UIDs, SOP Classes and anything unrecognized alone.

Recursively descends into sequences to process nested UIDs too.

Parameters:
  `list` -
  `setOfCanonicalUIDs` -
  `mapOfOtherUIDToCanonicalUID` -

### main

public static void main(String[] arg)

Change UIDs based on UID map file.

The order of UIDs in the map file is important, the first of tab-separated multiple UIDs in one line being the canonical UID to which the others on the line are remapped.

Parameters:
  `arg` - uidmapFileName srcFolderName dstFolderName