Comments (2)
It has nothing to do with anonymization. It has to do with the format used for writing the DICOM file to bytes. If you use EXPLICIT VR in your DICOM settings, it will write the VR. Otherwise, it just writes the tag, and on reading back, if the tag is not in the Evil DICOM dictionary, it won't know which kind of VR it is. Here is a test that shows you what I mean:
var dcm = new DICOMObject();
dcm.Add(new LongString(new Tag("32751000"), "Online3D"));
var dcmBytes = new byte[0]; //Start empty
using (var ms = new MemoryStream())
{
using (var dw = new DICOMBinaryWriter(ms))
{
//Explicity
DICOMObjectWriter.Write(dw, DICOMIOSettings.DefaultExplicit(), dcm);
}
dcmBytes = ms.ToArray(); //Store to read back
}
var dcmBack = DICOMObject.Read(dcmBytes);
//This passes
Assert.IsTrue(dcmBack.FindFirst("32751000").VR == EvilDICOM.Core.Enums.VR.LongString);
using (var ms = new MemoryStream())
{
using (var dw = new DICOMBinaryWriter(ms))
{
//Implicit
DICOMObjectWriter.Write(dw, DICOMIOSettings.Default(), dcm);
}
dcmBytes = ms.ToArray(); //Store to read back
}
dcmBack = DICOMObject.Read(dcmBytes);
//This fails
Assert.IsTrue(dcmBack.FindFirst("32751000").VR == EvilDICOM.Core.Enums.VR.LongString);
from evil-dicom.
from evil-dicom.
Related Issues (20)
- Feature Request: Single Association Mass CStore request
- Feature Request: Get (300A,000C) RTPlanGeometry Dicom tag HOT 1
- DICOM to BEV Transformation
- SendCStore skips important RS-DICOM-Tag (0008,0106) for Eclipse-Import
- Dicom File Larger than 2 GB HOT 7
- DICOMSCP error when a contour has many points HOT 1
- A typo in method bool IsInBounds(Vector3 pt) in RT package
- Anonymization fails for RP-files HOT 1
- Possible leak in DICOMSCU HOT 2
- MaskImageFast Error
- Unable to read Primary Fluence Mode Sequence
- CMove from ARIA to Self - CT Images (EvilDICOM v2.0.6.5) HOT 2
- ReadIndefiniteBigEndian uses LittleEndian for EndOfSequenceItem
- Queue.Anonymize() throws System.InvalidOoperationException HOT 2
- Progress and Roadmap of Evil-DICOM
- Meta/Header information not being written
- Unable to retrieve tag BeamDeliveryDurationLimit (300A,005C) HOT 1
- Is there any tool for writing Dicom-RT structure easily?
- How to delete one structure from loaded DICOM StructureSet
- RTDose CStore error when sending to MIM HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from evil-dicom.