ITK/GDCM Memory Leak
description
Transcript of ITK/GDCM Memory Leak
Overview ITK/DICOM/GDCM overview Goals Tools Process Bug Details Results What I Learned
ITK
Image Segmentation and Registration toolkit BSD Licensed We've heard a lot about this one already...
DICOM
Digital Imaging and Communications in Medicine
Standard for storage/transmission/etc. Of medical images
Both a file format and network protocol Extremely widespread usage
GDCM
Grassroots DICOM Originally named Gnu DiCoM
Open source cross platform library for DICOM files
BSD Licensed C++ Bundled inside of ITK
Goals
Fix memory leak in GDCM Specifically the version utilized by ITK
Occurred during loading of DICOM files
Valgrind
Tool for memory leak detection, profiling, etc. Generic framework for dynamic analysis tools
This project utilized memory leak detection (Memcheck)
Can be used on any executable Greatly degrades performance Quick Demo
Process
Obtain/build ITK Source Find GDCM source Use Valgrind to find memory leak Investigate code to find source of leak Fix leak and contribute back
Bug Details Valgrind Output
Bug Details Valgrind Output
Bug Details DocEntrySet::NewSeqEntry
Bug Details Document::ParseDES
Bug Details Document::ParseDES
Bug Details ElementSet::RemoveEntry
Results
Sucessfully fixed the issue Problem already solved
Discovered after a CVS update Traced back to a bug online
http://www.itk.org/Bug/view.php?id=7004 Bug submitted 5/13, with proposed fix
What I Learned
Valgrind is really cool How to use Cmake Got acquainted with large open source project Communicate with project developers before
contributing Mailing lists, etc.