Tabnine Logo
UIDUtils
Code IndexAdd Tabnine to your IDE (free)

How to use
UIDUtils
in
org.dcm4che2.util

Best Java code snippets using org.dcm4che2.util.UIDUtils (Showing top 14 results out of 315)

origin: dcm4che/dcm4che-core

@Override
protected String getSOPInstanceUID() {
  return UIDUtils.createUID();
}
origin: dcm4che/dcm4che-core

public static String createUID(String root) {
  verifyUIDRoot(root);
  return doCreateUID(root);
}
origin: dcm4che/dcm4che-core

public static boolean isValidUID(String uid) {
  return isValidUID(uid, acceptLeadingZero);
}
origin: dcm4che/dcm4che-core

public static void verifyUID(String uid) {
  verifyUID(uid, acceptLeadingZero);
}
origin: dcm4che/dcm4che-core

public static void setRoot(String root) {
  verifyUIDRoot(root);
  UIDUtils.root = root;
}
origin: dcm4che/dcm4che-core

public static String createUID() {
  return doCreateUID(root);
}
origin: dcm4che/dcm4che-core

public static boolean isValidUID(String uid, boolean acceptLeadingZero) {
  int len = uid.length();
  if (len > 64)
    return false;
  int state = EXPECT_FIRST_DIGIT;
  for (int i = 0; i < len; i++) {
    state = nextState(state, uid.charAt(i), acceptLeadingZero);
    if (state == ILLEGAL_UID)
      return false;
  }
  return state != EXPECT_FIRST_DIGIT;
}
origin: dcm4che/dcm4che-core

private static String doCreateUID(String root) {
  UUID uuid = UUID.randomUUID();
  byte[] b17 = new byte[17];
  fill(b17, 1, uuid.getMostSignificantBits());
  fill(b17, 9, uuid.getLeastSignificantBits());
  return new StringBuilder(64).append(root).append('.')
      .append(new BigInteger(b17)).toString();
}
origin: dcm4che/dcm4che-core

private static void verifyUIDRoot(String root) {
  if (root.length() > 24)
    throw new IllegalArgumentException("root length > 24");
  verifyUID(root);
}
origin: bioinformatics-ua/dicoogle

public boolean commit() {
  DicomObject actionInfo = new BasicDicomObject();
  actionInfo.putString(Tag.TransactionUID, VR.UI, UIDUtils.createUID());
origin: dcm4che/dcm4che-core

public static void verifyUID(String uid, boolean acceptLeadingZero) {
  if (!isValidUID(uid, acceptLeadingZero))
    throw new IllegalArgumentException(uid);
}
origin: bioinformatics-ua/dicoogle

public boolean commit() {
  DicomObject actionInfo = new BasicDicomObject();
  actionInfo.putString(Tag.TransactionUID, VR.UI, UIDUtils.createUID());
origin: dcm4che/dcm4che-net

public void ncreate(Association as, int pcid, DicomObject rq,
    DicomObject data) throws DicomServiceException, IOException {
  DicomObject rsp = CommandUtils.mkRSP(rq, CommandUtils.SUCCESS);
  String iuid = rq.getString(Tag.AffectedSOPInstanceUID);
  if (iuid == null) {
    iuid = UIDUtils.createUID();
    rq.putString(Tag.AffectedSOPInstanceUID, VR.UI, iuid);
    rsp.putString(Tag.AffectedSOPInstanceUID, VR.UI, iuid);
  }
  as.writeDimseRSP(pcid, rsp, doNCreate(as, pcid, rq, data, rsp));
}
origin: dcm4che/dcm4che-imageio

/**
 * Get a default set of DICOM data to use in the stream meta-data.
 */
@Override
public IIOMetadata getDefaultStreamMetadata(ImageWriteParam arg0) {
  DicomStreamMetaData ret = new DicomStreamMetaData();
  DicomObject dobj = new BasicDicomObject();
  ret.setDicomObject(dobj);
  Date now = new Date();
  dobj.putString(Tag.TransferSyntaxUID, VR.UI, UID.JPEGBaseline1);
  dobj.putString(Tag.ConversionType, VR.CS, "WSD");
  dobj.putString(Tag.Modality, VR.CS, "OT");
  dobj.putInt(Tag.InstanceNumber, VR.IS, 1);
  dobj.putDate(Tag.DateOfSecondaryCapture, VR.DA, now);
  dobj.putDate(Tag.TimeOfSecondaryCapture, VR.TM, now);
  dobj
      .putString(Tag.SOPClassUID, VR.UI,
          UID.SecondaryCaptureImageStorage);
  dobj.putString(Tag.SOPInstanceUID, VR.UI, UIDUtils.createUID());
  return ret;
}
org.dcm4che2.utilUIDUtils

Most used methods

  • createUID
  • doCreateUID
  • fill
  • isValidUID
  • nextState
  • verifyUID
  • verifyUIDRoot

Popular in Java

  • Updating database using SQL prepared statement
  • getSharedPreferences (Context)
  • runOnUiThread (Activity)
  • setContentView (Activity)
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now