congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
DicomOutputStream.getStreamPosition
Code IndexAdd Tabnine to your IDE (free)

How to use
getStreamPosition
method
in
org.dcm4che2.io.DicomOutputStream

Best Java code snippets using org.dcm4che2.io.DicomOutputStream.getStreamPosition (Showing top 2 results out of 315)

origin: dcm4che/dcm4che-core

private void writeRecord(long offset, DicomObject dcmobj)
  throws IOException {
log.debug("Write record @ {} to file {}", new Long(offset), file);
if (rollbackLen == -1) {
  rollbackLen = offset;
  filesetInfo.setFileSetConsistencyFlag(
    FileSetInformation.KNOWN_INCONSISTENCIES);
  raf.seek(firstRecordPos - 14);
  raf.writeShort(FileSetInformation.KNOWN_INCONSISTENCIES);
}
raf.seek(offset);
out.setStreamPosition(offset);
dcmobj.putInt(Tag.OffsetOfTheNextDirectoryRecord, VR.UL, 0);
dcmobj.putInt(Tag.RecordInUseFlag, VR.US, INUSE);
dcmobj.putInt(Tag.OffsetOfReferencedLowerLevelDirectoryEntity, VR.UL, 0);
out.writeItem(dcmobj, in.getTransferSyntax());
recordSeqLen = (int) (out.getStreamPosition() - firstRecordPos);
cache.put((int) dcmobj.getItemOffset(), dcmobj);
}
origin: dcm4che/dcm4che-core

public DicomDirWriter(File file, FileSetInformation fileSetInfo)
throws IOException {
super(new RandomAccessFile(file, "rw"), fileSetInfo);
this.file = file;
// ensure fileSetInfo represents empty file-set 
fileSetInfo.setOffsetFirstRootRecord(0);
fileSetInfo.setOffsetLastRootRecord(0);
raf.setLength(0);
out = new DicomOutputStream(raf);
out.setExplicitSequenceLength(true);
out.setExplicitItemLength(true);
out.writeDicomFile(fileSetInfo.getDicomObject());
out.writeHeader(Tag.DirectoryRecordSequence, VR.SQ, 0);
this.firstRecordPos = (int) out.getStreamPosition();
this.recordSeqLen = 0;
}
org.dcm4che2.ioDicomOutputStreamgetStreamPosition

Popular methods of DicomOutputStream

  • <init>
  • writeDataset
    Write a DICOM dataset to the output stream.
  • finish
    Finishes writing compressed data to the output stream without closing the underlying stream. Use thi
  • getTransferSyntax
  • setTransferSyntax
  • write
  • writeDicomFile
    Write a DICOM object to the output stream using the specifiedDicomObject to obtain the transfer synt
  • writeHeader
  • close
  • createItemInfo
  • flush
  • isExplicitItemLength
  • flush,
  • isExplicitItemLength,
  • isExplicitItemLengthIfZero,
  • isExplicitSequenceLength,
  • isExplicitSequenceLengthIfZero,
  • isIncludeGroupLength,
  • needItemInfo,
  • serializeDicomObject,
  • setAutoFinish

Popular in Java

  • Making http requests using okhttp
  • getExternalFilesDir (Context)
  • startActivity (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Top plugins for WebStorm
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