Posts by bitsltd

    Hi Marcel


    Sorry about all of the time fixing the warnings, but I think you will see a speed difference if you use member initialization. Also, it helps me trace out problems when I write my code. I think I spent over a week fixing them myself, but I did show me some possible bugs ( some were fixed and some are in the questions ). I also like it when Xcode give's me back "Success" instead of 2000+ warnings. When I was looking up what the warning meant and why they should be fixed, I saw a lot of commercial coders mentioning the their company had a no warning policy. I think dgate is a better product the most, if not all, of the pacs systems out-there. I want to make the code as clean and bug free as possible.


    Another question, did anyone use RLE encoding and If so, do you have any samples?


    Bruce

    Hi Marcel,


    More problems. This time the problem was in nkiqrsop.cxx. I used DeleteVR() in places I thought I would not have a problem, wrong! I have removed them all from nkiqrsop.cxx, except for the Philips fix, where I do not think it will be a problem, and in 2 places where I know it will not be a problem. I think before this is released, DICOMObject::DeleteVR(VR* pVR) should be fixed as to not corrupt LastVR and LastVRG. Do you want to do this, or should I try?


    Posted the file here:
    http://www.bitsltd.net/Software/Softwar ... /index.php


    Bruce

    Hi Marcel,


    Another small change. I found that images that were acquired by "the DICOM box" (0x0008,0x1090 ManufacturerModelName) were allowed to have 00010101 as the birthdate. When this image is sent to OsiriX, it shortened the date to 10101 for the data but left the length at 8 corrupting the file. To fix this and other possibly bad dates, I look for a leading ascii zero as the first character of an 8 length date vr (type == DA) and change it to a one. I also changed my tabs to 8 and my CRs to CRLFs, let me know if its correct.
    Posted the file here:
    http://www.bitsltd.net/Softwar…ware-Repository/index.php


    Bruce

    Hi Karsten,


    I would delete the directory where you installed Conquest. Unzip the files again. Right click Conquest and run as administrator. The part that makes me think it is Vista security is "Error creating object" message. You may have to turn off most of the security when you install it and turn it back on after it running. It has been a while since I install Conquest on a Vista machine and I remember having to lower the security. Now when I did do it, I had first installed MySql and used it as the database.


    Bruce

    Hi Marcel


    I did #if's in most of my changes. The only library change is the one I control, jpeg-6c. I changed the INT32 to match the change in ctypes.h. Jpeg-6c with the changes is posted where I put the alpha4 changes. Jasper and openJPEG are still the same. I will set my tabs to 8 and check all of the linefeeds before I post any more files. I did notice that different files have different tabs. I would just look at the changes and we can fix the look later ( unless your crazy about tabs, like I am about warnings ).


    Bruce

    Marcel,
    Sorry about all the changes. Most of the changes are in a "#ifdef __GNUC__" and should not effect your build, but I think you should try to remove as many as you can. I can see a speed difference with member initializations ( http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.6 ) and the private no copies are harmless. If you search the code for "QUES:", you will find some questions that I had. I am running several servers currently with the code I posted. It also builds on 3 different systems with -wall and only -wno-multichar. No warnings ( I know, I'm just crazy). I copied from boost.org how to fix the long problem and did it in both dgate and the jpeg library. My leak detector tells me I have fixed all of the leaks in JPEG/J2K, but Activity Monitor ( an Apple face on ps ) shows it growing real memory. I think this is just because there is a lot of memory on the system and OSX just leaves it with the app.. Let me know what you see. Both are posted in the normal place:
    http://www.bitsltd.net/Softwar…ware-Repository/index.php


    Enjoy,


    Bruce

    Marcel,


    Sorry about the long delay. Sounds like a good fix for the long problem, it is in the jpeg library and was not my doing, but I should have fixed it. I will fix it and some other small warnings (HAVE_STDDEF_H redefine) and repost the library. I wanted to test my leak fix code and ran into many problems. For example, you can not delete the last vr in a dicom object. It will corrupt LastVR and LastVRG. That is still not fixed, I just stopped using it on the image vr. As I turned on warnings, I would fix them too. I think I have all of the leaks and the warnings fixed (except 4 redifines in libjpeg). There are a lot of small change throughout the code. Since I was only looking for GCC warnings, I surrounded my changes with "ifdef __GNUC__" "else". This will let you make the changes you want. I changed most classes initialization routines to the faster way, otherwise you double initialize each variable. I noticed the speed deference. I just wanted to fix the --testcompression routine before I posted it. I don't know how many changes you have made, but Apple has a very good file merge program. If you want, you can post or send me what you have now and I can merge them or I can post what I have and you can merge them.


    Bruce

    Looking closer, I think j should be signed in this case. I will make the changes and replace j with (int)l. This is a warning that my great (or not so great) gcc4.2 missed. Normally, for ((unsigned int)j=len-1; j>=0; j--) would generate the warning "comparison is always true due to limited range of data type". I'm going to take a second look unsigned changes. :oops:

    In UpdateOrAddToTable:if (DB.NextRecord()), a small routine to remove blanks from the end of a line would point to unknown if the string length was 0 (s[i-1][-1]).
    Changed from: (len = strlen(s[i-1])
    To: if((len = strlen(s[i-1])))// Skip empty strings. bcb
    I only saw it on a 64 bit build and only with some images. May be only 64 bit, some images, or both. However I could see more of a problem with an int64 pointing to -1 than an int32.

    I didn't like the OpenJPEG, it turned out to be slower, however there was one NovaRad image that it could decode and Jasper could not. I've been storing my images in JPEG2000 and it's been working well until I received an Image with frames in it. Hence, a rewrite. I have put up new code to allow frames and a bunch of warning fixes to the 1.4.16alpha 3 version. For now stick with Jasper builds. See the 1.4.16alpha thread for more info.


    Bruce

    Another fix. I needed frames to work with Jasper JPEG2000 and Libjpeg, which I added. I also added the OpenJPEG library to it, but Jasper is faster and OpenJPEG appears to have a memory leak on the compression side. At the same time I fixed all the warnings except for multi-char and for two dgate warnings that will require Marcel to decide. The files are in my usual place.
    http://www.bitsltd.net/Softwar…ware-Repository/index.php


    Bruce

    I use dgate with OsiriX on my Macs. OsiriX switched to the OpenJPEG library for JPEG 2000 because it is faster. I think the reason for this is the OpenJPEG library works with int* instead of shorts*. Well if you want to try it, I have post the files that you need to change at the usual place:
    http://www.bitsltd.net/Softwar…ware-Repository/index.php
    They are for the 1.4.16alpha 3 version and OpenJPEG 1.3.
    The OpenJpeg files can be found here: http://code.google.com/p/openjpeg/
    So far, I like it better, but have left the choice for either library to work by changing compiler switches. I also add switches to uncompress the evil NovaPacs and Fuji CR non-standard .dcm files

    Leak! :shock: Sorry :oops: , there was a memory leak in DecompressJPEGL() and a leak in CompressJPEG2K(). Both have been fixed and the changed source code files posted at:
    http://www.bitsltd.net/Softwar…ware-Repository/index.php
    For those using the compiled Windows file, you will have to wait for Marcel. A quick fix is to just restart the server, this will release the memory; you may have to do it often depending on the amount of jpeg files being decoded and jpeg2k files being encoded. I have not tested my files on a Windows system, but the changes were minor and should not have any problems compiling.
    Again, sorry I missed that.


    Bruce Barton
    BITS Limited

    Put a newer version up. Had an Endian problem with J2K, fixed. I would like to make a lot of small corrections for GCC4.2 compiler warnings. Most involve "const char" in place of "char". Should I make the changes to the sources on the web site or is there a beta I can use?

    I wanted to use jpeg 2000 images with dgate. I've been building dgate on two different apple systems, little endian 64bit and big endian 32bit. I have also been rewriting the jpeg-6b library to accept any bit width. So once I did that, I added the jpeg library to dgate. After that, I added the jasper library and that gave me my jpeg 2000. It still will requires more testing than I done, so it is an alpha right now. The changed files and the libraries can be found at http://www.bitsltd.net/Softwar…ware-Repository/index.php, the original Jasper library can also be found at http://www.ece.uvic.ca/~mdadams/jasper/#download. You must use my version of the jpeg (libjpeg-6c) library because it accepts 8 or 12 bit lossy and 2-16 bit lossless without recompiling. You will have to build dgate and the libraries on your system unless there is someone else building this on an Apple, in which case, I can send you the built programs to try or the Xcode project. I also finished the changes required to run on big endian systems, as most of the code was written on my Powerbook Power PC, I just can give it up, it's a 17" and I like it. Try it and let me know what you think! :D
    Bruce

    I built it on an Apple, however used only the Unix headers, not the Apple ones. The big changes for BSD was the way pipes were handled. The big changes for Apple was endian. With the right command line, it should build. I used -DDARWIN to tell it that it was an Apple build. Only Apple macro I used was to set the endian, #if "__BIG_ENDIAN__" and "#if __LITTLE_ENDIAN__" . Apples use a Power PC or an Intel, my changes make it so it should build on both by using the macros. Right now -DDARWIN defines UNIX, if you want, I can change -DDARWIN to -DBSD, and have -DDARWIN define both UNIX and BSD so my endian stuff will still work. If you build on a PC or any little endian system, the endian will default correctly, if not you will have to set it with NATIVE_ENDIAN = 2(big). I think a BSD build would be great, I can make the changes and send you the changes so you can build and test it.


    Bruce
    bruce.barton@bitsltd.net
    :)

    I have been able to compile (without warnings) and run dgate on an Apple Mac G4 (32 bit, big endian, Darwin unix (a type of bsd)). All the changes I made were done with defines , and with ifndef, ifdef, and else, as to not effect the original code. I would like send you the changed files along with a change file for you to look at. I would like to merge my changes with your code and make it easier to keep both current and to let others work on it too. I'm now working on the interface. Let me Know.


    Bruce