regrain [Fri, 19 Nov 2004 18:49:38 +0000 (18:49 +0000)]
* src/gdcmDocEntry.cxx : remove the copy of the DictEntry... there isn't
correct to copy it. The DictEntry is specified at the DocEntry creation,
then, it musn't change in the time.
* src/gdcmDocEntryArchive.[h|cxx] : new class. It's goal is to change the
header correctly. At this time, the change is only made for the first
level of the Document. In the future, it might consider sequences.
The change is made by replacing a DocEntry by an other that is created
outside the class. The old value is kept. When we restore the header
status, the added DocEntry is deleted and replaced by the old value.
* src/gdcmElementSet.h : Set the DocEntryArchive like friend.
* src/gdcmFile.[h|cxx] : Use the gdcmDocEntryArchive. Add methods to
set the write type to explicit VR, implicit VR or ACR. Add methods to set
the write mode to native, decompressed or RGB (but not used at this time)
-- BeNours
malaterre [Wed, 17 Nov 2004 19:49:13 +0000 (19:49 +0000)]
ENH: Adding support for GE Private Transfer Syntax where file is in little endian and pixel data is in Big endian. I believe this should also be propagated to gdcmTS class ...
regrain [Wed, 17 Nov 2004 10:20:05 +0000 (10:20 +0000)]
* src/gdcmDocument.cxx : now, when using the ReplaceOrCreateByNumber to
set a BinEntry, the binArea is copied (like to set a ValEntry, the string
is copied).
* Test/TestCopyDicom.cxx, Example/TestCopyDicom.cxx : the image data isn't set because already copied when copying the BinEntry's of the header
* Test/TestAllReadCompareDicom.cxx : remove warnings
-- BeNours
regrain [Tue, 16 Nov 2004 16:20:22 +0000 (16:20 +0000)]
* FIX : now, the DocEntries are all deleted in the gdcmElementSet.
Two problems appear when doing it :
- with the gdcmFile : when the GetImageData method is called, the pixels
are stored in the gdcmPixelConvert, but a gdcmBinEntry link to these
datas (pixels). And each structure destruct the datas when it's
destructed. So we have two destructions for the same datas. To solve it,
a flag is added in the gdcmBinEntry to indicate if the BinEntry owns the
datas or not. If it doesn't own datas, then they will not destroyed by
the gdcmBinEntry.
- with the gdcmDicomDir : the sequences (gdcmSQItem) contain DocEntry
elements. The DicomDir* (DicomDirPatient, etc.) inherit from SQItem.
Thus destruct the DicomDir* elements and the TagHT of the ElementSet
create a double destruction of the same DocEntry's. So, to solve it,
the TagHT is simply cleared and the DicomDir* elements are destroyed.
* TODO : add an entry concerning memory leaks in the DicomDir
-- BeNours
frog [Tue, 16 Nov 2004 14:48:18 +0000 (14:48 +0000)]
* src/gdcmDocument.cxx: FIX ::ComputeRLEInfo() rleSegmentOffsetTable[]
was erroneously defined with a size of 15 instead of 16. [many thanks
to Jean Michel Rouet for pointing out this bug].
* FIX: src/* fix the doxygen warnings.
* src/gdcmVR.cxx: removed some redundant tests (e.g. LO)
regrain [Tue, 16 Nov 2004 13:20:34 +0000 (13:20 +0000)]
* gdcmElementSet.cxx : Bad patch to pass the test suite. Patch because
the pixel datas are deleted by the gdcmPixelData and the gdcmBonEntry
(problem becomes when calling gdcmFile::GetImageData )
regrain [Tue, 16 Nov 2004 11:19:05 +0000 (11:19 +0000)]
* FIX : src/gdcmDocument.cxx Remove obvious code in the destructor
* FIX : src/gdcmPixelConvert : Set to NULL the deleted structures in the
squeeze method
-- BeNours
regrain [Tue, 16 Nov 2004 10:37:54 +0000 (10:37 +0000)]
* FIX: src/gdcmUtil.cxx : to compile with MSVC6
* src/gdcmDocument.cxx : fix memory leaks. Fix possible bugs : use an object
after it have been deleted
-- BeNours
malaterre [Tue, 16 Nov 2004 05:03:35 +0000 (05:03 +0000)]
ENH:
1. Finish merging JMR patch for writting DICOM from scratch
2. Fix -hopefully- bug with MONOCHROME and space vs null character
3. Use const ref when possible
4. Add a new function InitializeDefaultHeader, which create a template DICOM header (CT image for now)
5. A few more comments
6. CreateUniqueUID can now be called without parameter
malaterre [Tue, 16 Nov 2004 02:54:34 +0000 (02:54 +0000)]
ENH: Slightly bigger patch:
1. Getting toward full integration of JMR patch for writting dicom from scratch
2. Update Test to test part of this patch: CreateUniqueUID
3. File was not close properly in gdcmDict
4. Use of typedef is to be prefered when possible (gdcmDict.cxx)
5. Use of const ref instead of copy (speed issue)
6. Remove temporary (duplicate) string in TranslateToKey
7. Mark extremely dangerous code as such (gdcmDocument.cxx and AddEntry fallback case)
8. Do not repeat virtual in subclasses
9. Implemented in gdcm::Util two new function: GetIPAddress, and CreateUniqueUID
malaterre [Tue, 16 Nov 2004 02:04:00 +0000 (02:04 +0000)]
ENH: Apply first patch toward better string comparison when dealing with broken DICOM file. Essentially the string could be padded with a space instead of a null character as defined by standard
regrain [Mon, 15 Nov 2004 16:12:30 +0000 (16:12 +0000)]
* src/gdcmDocument.[cxx|h] : fix memory leaks. The return is suppressed
because never used... and in the same time, that's remove some memory leaks
-- BeNours
regrain [Mon, 15 Nov 2004 15:29:03 +0000 (15:29 +0000)]
* src/gdcmFile.cxx : now delete the PixelConvert instance.
* In examples and tests : change the type of image data variables from void*
to uint8_t*. Remmove all delete on image data variables
-- BeNours
malaterre [Fri, 12 Nov 2004 21:33:46 +0000 (21:33 +0000)]
BUG: Apply patch proposed by Peter Cech (ITK user), to handle some Philips NTSCAN where some private tag were being flip to Big endian for no reason (the rest of the file is in little endian).
regrain [Wed, 10 Nov 2004 16:13:17 +0000 (16:13 +0000)]
* src/gdcmDocument.cxx : Set the file pointer TP to 0 in the constructors.
Verify the file pointer value before open the file, and if it's not null,
a verbose message is generated.
Close correctly the file when the file isn't considered dicom-like. The
correctly close is a call to CloseFile.
When closing the file pointer, test if its not null to close the file.
* src/gdcmPixelConvert.cxx : bug fix for the SIEMENS_GBS_III-16-ACR_NEMA_1.acr
file. For an uncompressed image, the copied datas correspond in the least
case to the image size (calculated) or the image size specified in the
header. A verbose is generated if these two size mismatch
-- BeNours
regrain [Tue, 9 Nov 2004 16:14:20 +0000 (16:14 +0000)]
* src/TestAllReadCompareDicom.cxx : test the existence of the directory
using an 'ifstream' other than a 'FILE *'. The previous solution ('FILE *')
break under windows (with msvc6 compilation).
-- BeNours
regrain [Tue, 9 Nov 2004 11:21:31 +0000 (11:21 +0000)]
* Bugs fix for the Windows build with VC6
* CMakeLists.txt : bug fix - The include of the VTK lib is made only when it's
needed (only for projects required VTK). If the VTK is included in all
projects, there is conflicts with the jpeg lib of vtk when compiling the
gdcmjpeg[8,12,16] projects. The first conflict is on the jmorecfg.h file.
* src/gdcmUtil.h : export binary_write methods. Otherwise, there's problems
when compiling the gdcm_wrap.cxx file (created by the compilation of the
gdcm.i file)
* vtk/vtkGdcmDemo.cxx : remove the use of std namespace for the cerr use
(like it's already made for the cout use). Otherwise, conflict with the
std::cerr of vtk.
-- BeNours
frog [Tue, 9 Nov 2004 10:25:25 +0000 (10:25 +0000)]
* src/gdcmDicomDit.h the Method typedef is now local to DicomDir class.
* gdcmPython/gdcm.i:
- comments on the DicomDir::Method related usage added.
- now that we use the namespace gdcm, a lot of internal classes do
NOT need to be wrapped anymore.
* gdcmPython/demo/DicomDirProgressMethod.py (that uses the above
DicomDir::Method) new example added.
malaterre [Sun, 7 Nov 2004 14:28:54 +0000 (14:28 +0000)]
ENH: Final -hopefully- change to jpeg lib. In order to match ITK structure, and be more cross plateform, reduce code redondency and improve compilation time
malaterre [Fri, 5 Nov 2004 20:23:12 +0000 (20:23 +0000)]
ENH: Improve string manipulation. I now inforce the notion of 'DicomString'
A DicomString can contain as many \0 as they want
and it is *always* of even length.
We only support odd length for very rare case.
And in the near future this should be removed.
malaterre [Wed, 3 Nov 2004 18:08:55 +0000 (18:08 +0000)]
ENH: Now the dictionary is compiled into gdcm lib. This is a default behavior, thus any dic file specified is picked before failback to the one comiled into lib
malaterre [Thu, 28 Oct 2004 22:21:56 +0000 (22:21 +0000)]
ENH:
- cosmetic cleanup in TODO, we should remove entries fixed
- some other cleanup at some other places
- adding a first implementation for the binary_write function
- adding big endian flag in cmake cache
malaterre [Mon, 25 Oct 2004 04:47:41 +0000 (04:47 +0000)]
STYLE: ivars should start with a capital letter. Accessors should be const to avoid people starting modifying stuff (since this is a ref). remove virtual as style specify sub class shouldn't reuse the keyword (4)
malaterre [Mon, 25 Oct 2004 04:08:19 +0000 (04:08 +0000)]
STYLE: ivars should start with a capital letter. Accessors should be const to avoid people starting modifying stuff (since this is a ref). remove virtual as style specify sub class shouldn't reuse the keyword (3)
malaterre [Mon, 25 Oct 2004 03:35:19 +0000 (03:35 +0000)]
STYLE: ivars should start with a capital letter. Accessors should be const to avoid people starting modifying stuff (since this is a ref). remove virtual as style specify sub class shouldn't reuse the keyword (2)
malaterre [Mon, 25 Oct 2004 03:03:44 +0000 (03:03 +0000)]
STYLE: ivars should start with a capital letter. Accessors should be const to avoid people starting modifying stuff (since this is a ref). remove virtual as style specify sub class shouldn't reuse the keyword
frog [Fri, 22 Oct 2004 13:56:44 +0000 (13:56 +0000)]
* Doc/Dicom2004_Part5.pdf added (thanks to JPR).
* Dicts/dicomTS2004.dic, dicomV3VM2004.dic, groupNameAbbreviations2004.dic
new 2004 dictionaries added (thanks to JPR).
* FIX dashboard warning RLEFrame::NumberFragments is now of type unsigned int
* CLEANUP_ROUND (15) for gdcmPixelConvert
- RLEFrame::NumberFragments is now of type unsigned int
- gdcmFile::GetImageData(), GetImageDataIntoVector(), GetImageDataRaw()
are now all based on PixelConverter. ::GetImageDataIntoVectorRaw()
no longer exists.
malaterre [Fri, 22 Oct 2004 04:13:24 +0000 (04:13 +0000)]
ENH: Initial work in gathering all transfer syntax accessors. clearly IsDecompressed/IsJPEG2000/IsJPEGLossless/IsRLELossless shouldn't be all ivars, but only one transfersyntax (class) ivar with equivalent method on the class.
malaterre [Fri, 22 Oct 2004 03:05:39 +0000 (03:05 +0000)]
ENH: Removed all FILE* ref and replace by ifstream/ofstream. For now I use a temp solution with the two files jdatadst.cxx and jdatasrc.cxx, this need to be discussed (plus I didn't like having a 2000 lines patch not commited)
frog [Wed, 20 Oct 2004 22:31:51 +0000 (22:31 +0000)]
* src/gdcmDocument.cxx: wrong type on return fixed (thanks dashboard)
* CLEANUP_ROUND (14) for gdcmPixelConvert
- PixelConvert::GetLutRGBA(FILE*) is now GetLutRGBA() (no fp needed)
- PixelConvert::BuildRGBImage()(FILE*) is now BuildRGBImage() (no fp needed)
- File::GetImageDataIntoVector() doesn't need unnecessary OpenFile() and
CloseFile() anymore.
- File::GetImageDataRaw() doesn't call GetImageDataIntoVectorRaw()
anymore and hence avoids storing a copy of PixelConvert::Decompressed
into File::Pixel_Data.
frog [Wed, 20 Oct 2004 14:30:38 +0000 (14:30 +0000)]
* src/gdcmDocument.cxx ftell() return properly stored in a long (i.e.
no longer depends on's programmers PMS = Preposterous Mood Swings ;).
* CLEANUP_ROUND (13) for gdcmPixelConvert
Substituted File::ParsePixelData() with PixelConvert::Print() new
method:
- src/gdcmParsePixels.cxx removed (only contained File::ParsePixelData())
- src/gdcmRLEFrame.cxx, gdcmJPEGFragment.cxx added. Added a ::Print()
method to those classes.
- src/gdcmFile.[cxx|h]:
-- Added a ::Print() method.
-- PixelConverter is now a reference instead of a member.
-- gdcmPython/gdcm.i: added "using namespace gdcm" in order for
gdcm_wrap.cxx to "understand" File::GetPixelConverter()