Tags: suyashkumar/dicom
Tags
Add Dataset & Element equality methods, greatly speeding up tests tha… …t rely on dataset comparisons. (#280) This change introduces well-defined equality methods for Dataset, Element, and some other data structures. This greatly speeds up tests that rely on checking equality of datasets (that previously needed reflection). For example, it reduces the total test suite from 1m24s to 10s on GitHub actions (mostly due to one test). These methods may also be of use to library users. However, this does mean that if new fields are added to any of these structs it is important for the Equals method to be updated as well. For now this will be enforced during code review (helped by the fact most of these structs should not fail often), but we should investigate lint rules or some auto-generated reflection based tests that can help catch when this doesn't happen (see #281). This change also makes a change to rely on pointers for []*frame.Frame in the PixelDataInfo.
Benchmark across Parse options, add memory benchmarking. (#264) This change updates the Parse benchmark to operate across useful ParseOptions, adds memory benchmarking, and updates some benchmark params. For example, we can take a look at the CPU / memory differences across the new ParseOptions for one of the test dicoms: ``` BenchmarkParse/NoOptions/4.dcm-4 10 106876945 ns/op 120572543 B/op 2160 allocs/op BenchmarkParse/SkipPixelData/4.dcm-4 10 531193 ns/op 34900 B/op 2144 allocs/op BenchmarkParse/SkipProcessingPixelDataValue/4.dcm-4 10 1807256 ns/op 7573518 B/op 2146 allocs/op ```
PreviousNext