congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
IOD
Code IndexAdd Tabnine to your IDE (free)

How to use
IOD
in
org.dcm4che3.data

Best Java code snippets using org.dcm4che3.data.IOD (Showing top 20 results out of 315)

origin: dcm4che/dcm4che

  public IOD get(String uri) throws IOException {
    IOD iod = map.get(uri);
    if (iod == null)
      map.put(uri, iod = IOD.load(uri));
    return iod;
  }
}
origin: dcm4che/dcm4che

@Override
protected IOD queryKeysIOD(QueryRetrieveLevel rootLevel,
    boolean relational) {
  IOD iod = new IOD();
  iod.add(new IOD.DataElement(Tag.StudyInstanceUID, VR.UI,
          IOD.DataElementType.TYPE_0, -1, -1, 0));
  iod.add(new IOD.DataElement(Tag.SeriesInstanceUID, VR.UI,
      IOD.DataElementType.TYPE_0, -1, -1, 0));
  iod.add(new IOD.DataElement(Tag.SOPInstanceUID, VR.UI,
      IOD.DataElementType.TYPE_0, -1, -1, 0));
  return iod;
}
origin: dcm4che/dcm4che

private DataElement getLastDataElement() {
  IOD iod = iodStack.getLast();
  return iod.get(iod.size()-1);
}
origin: dcm4che/dcm4che

public static IOD load(String uri) throws IOException {
  if (uri.startsWith("resource:")) {
    try {
      uri = ResourceLocator.getResource(uri.substring(9), IOD.class);
    } catch (NullPointerException npe) {
      throw new FileNotFoundException(uri);
    }
  } else if (uri.indexOf(':') < 2) {
    uri = new File(uri).toURI().toString();
  }
  IOD iod = new IOD();
  iod.parse(uri);
  iod.trimToSize();
  return iod;
}
origin: dcm4che/dcm4che

  @Override
  protected IOD retrieveKeysIOD(QueryRetrieveLevel rootLevel,
      boolean relational) {
    IOD iod = queryKeysIOD(rootLevel, relational);
    iod.add(new IOD.DataElement(Tag.SeriesInstanceUID, VR.UI,
        IOD.DataElementType.TYPE_1, -1, -1, 0));
    return iod;
  }
},
origin: dcm4che/dcm4che

private void startItem(String id, String idref, String type) throws SAXException {
  IOD iod;
  if (idref != null) {
    if (type != null)
      throw new SAXException("<Item> with idref must not specify type");
      
    iod = id2iod.get(idref);
    if (iod == null)
      throw new SAXException(
          "could not resolve <Item idref:\"" + idref + "\"/>");
  } else { 
    iod = new IOD();
    if (type != null)
      iod.setType(typeOf(type));
    if (locator != null)
      iod.setLineNumber(locator.getLineNumber());
  }
  getLastDataElement().addItemIOD(iod);
  iodStack.add(iod);
  if (id != null)
    id2iod.put(id, iod);
  this.idref = idref;
  itemConditions = true;
  elementConditions = false;
}
origin: dcm4che/dcm4che

private IOD[] checkforMissingItems(int[] matchingItems, IOD[] itemIODs) {
  IOD[] missingItems = new IOD[matchingItems.length];
  int n = 0;
  for (int i = 0; i < matchingItems.length; i++) {
    IOD itemIOD = itemIODs[i];
    if (matchingItems[i] == 0
        && itemIOD.getType() == DataElementType.TYPE_1)
      missingItems[n++] = itemIOD;
  }
  return n > 0 ? Arrays.copyOf(missingItems, n) : null;
}
origin: dcm4che/dcm4che

  getLastDataElement().setCondition(cond.trim());
else 
  iodStack.getLast().setCondition(cond.trim());
elementConditions = false;
itemConditions = false;
origin: dcm4che/dcm4che

appendPrefixTo(level+1, sb);
sb.append("Missing Item");
appendIODRef(iod.getLineNumber(), sb);
sb.append(StringUtils.LINE_SEPARATOR);
origin: dcm4che/dcm4che

for (int j = 0; j < itemIODs.length; j++) {
  IOD itemIOD = itemIODs[j];
  IOD.Condition itemCondition = itemIOD.getCondition();
  if (itemCondition != null) {
    String id = itemCondition.id();
origin: dcm4che/dcm4che

@Override
protected IOD retrieveKeysIOD(QueryRetrieveLevel rootLevel,
    boolean relational) {
  IOD iod = queryKeysIOD(rootLevel, relational);
  iod.add(new IOD.DataElement(Tag.PatientID, VR.LO,
      IOD.DataElementType.TYPE_1, 1, 1, 0));
  return iod;
}
origin: org.dcm4che/dcm4che-net

@Override
protected IOD queryKeysIOD(QueryRetrieveLevel rootLevel,
    boolean relational) {
  IOD iod = new IOD();
  iod.add(new IOD.DataElement(Tag.StudyInstanceUID, VR.UI,
          IOD.DataElementType.TYPE_0, -1, -1, 0));
  iod.add(new IOD.DataElement(Tag.SeriesInstanceUID, VR.UI,
      IOD.DataElementType.TYPE_0, -1, -1, 0));
  iod.add(new IOD.DataElement(Tag.SOPInstanceUID, VR.UI,
      IOD.DataElementType.TYPE_0, -1, -1, 0));
  return iod;
}
origin: dcm4che/dcm4che

private static void configureIODs(MppsSCP main, CommandLine cl)
    throws IOException {
  if (!cl.hasOption("no-validate")) {
    main.setMppsNCreateIOD(IOD.load(
        cl.getOptionValue("mpps-ncreate-iod", 
            "resource:mpps-ncreate-iod.xml")));
    main.setMppsNSetIOD(IOD.load(
        cl.getOptionValue("mpps-nset-iod", 
            "resource:mpps-nset-iod.xml")));
  }
}
origin: dcm4che/dcm4che

  @Override
  protected IOD retrieveKeysIOD(QueryRetrieveLevel rootLevel,
      boolean relational) {
    IOD iod = queryKeysIOD(rootLevel, relational);
    iod.add(new IOD.DataElement(Tag.StudyInstanceUID, VR.UI,
        IOD.DataElementType.TYPE_1, -1, -1, 0));
    return iod;
  }
},
origin: dcm4che/dcm4che

@Override
protected IOD queryKeysIOD(QueryRetrieveLevel rootLevel,
    boolean relational) {
  IOD iod = new IOD();
  iod.add(new IOD.DataElement(Tag.PatientID, VR.LO,
      !relational && rootLevel == QueryRetrieveLevel.PATIENT
        ? IOD.DataElementType.TYPE_1
        : IOD.DataElementType.TYPE_3,
      1, 1, 0));
  iod.add(new IOD.DataElement(Tag.SeriesInstanceUID, VR.UI,
      IOD.DataElementType.TYPE_0, -1, -1, 0));
  iod.add(new IOD.DataElement(Tag.SOPInstanceUID, VR.UI,
      IOD.DataElementType.TYPE_0, -1, -1, 0));
  return iod;
}
origin: org.dcm4che.tool/dcm4che-tool-dcmvalidate

@SuppressWarnings("unchecked")
public static void main(String[] args) {
  try {
    CommandLine cl = parseComandLine(args);
    DcmValidate main = new DcmValidate();
    String iodFile = cl.getOptionValue("iod");
    if (iodFile == null)
      throw new MissingOptionException(Arrays.asList("iod"));
    main.setIOD(IOD.load(iodFile));
    List<String> fnames = cl.getArgList();
    if (fnames.isEmpty())
      throw new ParseException(rb.getString("missing"));
    
    for (String fname : fnames)
      validate(main, new File(fname));
  } catch (ParseException e) {
    System.err.println("DcmValidate: " + e.getMessage());
    System.err.println(rb.getString("try"));
    System.exit(2);
  } catch (IOException e) {
    System.err.println("DcmValidate: " + e.getMessage());
    System.exit(2);
  }
}
origin: dcm4che/dcm4che

  @Override
  protected IOD retrieveKeysIOD(QueryRetrieveLevel rootLevel,
      boolean relational) {
    IOD iod = queryKeysIOD(rootLevel, relational);
    iod.add(new IOD.DataElement(Tag.SOPInstanceUID, VR.UI,
        IOD.DataElementType.TYPE_1, -1, -1, 0));
    return iod;
  }
},
origin: org.dcm4che/dcm4che-net

@Override
protected IOD queryKeysIOD(QueryRetrieveLevel rootLevel,
    boolean relational) {
  IOD iod = new IOD();
  iod.add(new IOD.DataElement(Tag.PatientID, VR.LO,
      !relational && rootLevel == QueryRetrieveLevel.PATIENT
        ? IOD.DataElementType.TYPE_1
        : IOD.DataElementType.TYPE_3,
      1, 1, 0));
  iod.add(new IOD.DataElement(Tag.SeriesInstanceUID, VR.UI,
      IOD.DataElementType.TYPE_0, -1, -1, 0));
  iod.add(new IOD.DataElement(Tag.SOPInstanceUID, VR.UI,
      IOD.DataElementType.TYPE_0, -1, -1, 0));
  return iod;
}
origin: dcm4che/dcm4che

@SuppressWarnings("unchecked")
public static void main(String[] args) {
  try {
    CommandLine cl = parseComandLine(args);
    DcmValidate main = new DcmValidate();
    String iodFile = cl.getOptionValue("iod");
    if (iodFile == null)
      throw new MissingOptionException(Arrays.asList("iod"));
    main.setIOD(IOD.load(iodFile));
    List<String> fnames = cl.getArgList();
    if (fnames.isEmpty())
      throw new ParseException(rb.getString("missing"));
    
    for (String fname : fnames)
      validate(main, new File(fname));
  } catch (ParseException e) {
    System.err.println("DcmValidate: " + e.getMessage());
    System.err.println(rb.getString("try"));
    System.exit(2);
  } catch (IOException e) {
    System.err.println("DcmValidate: " + e.getMessage());
    System.exit(2);
  }
}
origin: org.dcm4che/dcm4che-net

@Override
protected IOD retrieveKeysIOD(QueryRetrieveLevel rootLevel,
    boolean relational) {
  IOD iod = queryKeysIOD(rootLevel, relational);
  iod.add(new IOD.DataElement(Tag.PatientID, VR.LO,
      IOD.DataElementType.TYPE_1, 1, 1, 0));
  return iod;
}
org.dcm4che3.dataIOD

Most used methods

  • load
  • <init>
  • add
  • get
  • getCondition
  • getLineNumber
  • getType
  • parse
  • setCondition
  • setLineNumber
  • setType
  • size
  • setType,
  • size,
  • trimToSize,
  • valueOf

Popular in Java

  • Start an intent from android
  • notifyDataSetChanged (ArrayAdapter)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • scheduleAtFixedRate (Timer)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • Collectors (java.util.stream)
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • 21 Best IntelliJ Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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