added c-store feature to dimse package, fixed logging of vr length mismatch

This commit is contained in:
Weiwei committed 2016-03-16 18:10:14 -05:00
1 parent a5d4c6d0eb
commit f839c60a68
11 files changed
+452 -33

No files matched your search

+15
View File
@@ -15,6 +15,21 @@ Field.prototype.isNumeric = function() {
return false;
}
BufferField = function(buffer, start, length) {
Field.call(this, C.TYPE_BUFFER, buffer);
this.bufferLength = length;
this.bufferStart = start;
}
util.inherits(BufferField, Field);
BufferField.prototype.length = function() {
return this.bufferLength;
}
BufferField.prototype.write = function(stream) {
stream.writeRawBuffer(this.value, this.bufferStart, this.bufferLength);
}
StringField = function(str) {
Field.call(this, C.TYPE_ASCII, typeof str == 'string' ? str : "");
}