Here I planned to write some lessons to understand what is libtinydicom (Tiny DICOM library) and librawprocessor (RAW Processing library) for most of modern compilers except M$VC – unfortunately I am sorry about supporting M$VC, but I don’t like care about distinct, banishing standard compiler.
Ok, let understand what is each library doing what it does and what it existed for.
libtinydicom
This library was born to read and write DICOM tags in a file by myself. At a time I made this, there’s some commercial libraries and open source too – A.K.A DCMTK. I was just wanted to write simply some DICOM tags and also reads Pixel datas from any DCM files – so I have started to read NEMA’s DICOM standards. And it was about 2011.
It passed years and continuously made it works well with many different DCM files, and now it availed to as an open source on GitHub.com.
Anyone can clone or download source code and use it for freely with small license MIT. Just Ok for announcing what you used it your project or product.
Supported compilers are most of modern C++ compiler supporting Makefile. It made with MinGW-W64 and Code::Blocks IDE, but now supporting Mac OS-X and Linux too because it made only with C++ STL.
How to use it ?
Simply you can download source code as ZIP compression from here. And you may need already know how I can extract ZIP file to somewhere, and plus more you must know what I have to use compiler with this library – If don’t know? Just, please, don’t try to use it, It may difficult to understand next jobs.
Now choose one of Makefiles that have extensions – gcc and llvm. Just copy one Makefile.{your compiler to use} to Makefile as like cp Makefile.gcc Makefile
and then, just type to make
. If it succeed to build all sources, you can see a lib
directroy, and there’s two files : libtinydicom.a and libdcm.h
And now you may understand how it be used, and this lesson may continued to next.
librawprocessor
librawprocessor born to doing something for most of medical RAW images. It supports read and write, rotating, flip, convert to 8 bit image and more features.
You can download or clone source codes here.
“librawprocessor” supports OpenMP for processing image quickly if your compiler supports this feature. Most of processing features are optized for OpenMP and AVX instruction.
Features:
- Load from File, Memory.
- Save as a new RAW image.
- Flip vertical, horizontal
- Fast Rotate 90, 180, 270 degrees
- Free Rotate in 0 to 359.99 degrees
- Change width and height in size of height, to recognize what resolution is right.
( Most medical RAW images has no information about sizes ) - Invert
- Rescale with many filters : Bilinear, Bicubic, B-Spline, Lanzcos
- Kernel matrix filtering : sharpen, blur or customized
- Brightness, Contrast, Gamma adjustment
- Tone mapping with Drago and Reinhard
- CLAHE
- Generate low frequency image and anisotropic filtered image from source
- Advanced edge enhace
- Automatic weight calculation ( window width )
- Get down scaled pixel ranged data from source ( thresholding to any bits, 8 or 16bits )
How to use it ?
Simply you can download or clone from here. You may need prepared to understand what is your compiler and how to build with Makefile. ( M$VC not an option, sorry about this but no plan to future, too ) Tested almost of GCC environments : Windows, Mac OS-X, Linux.
After you got source code on your system, copy your right Makefile.{compiler type you have} to Makefile as like this : cp Makefile.gcc Makefile
, then proceed simply make
. And you can decide to use OpenMP option with appends a word openmp
to make
.
Required OpenMP is at least 3.0 or above. lower version may reason of compile failure.
And now you may understand how it be used, and this lesson may continued to next, too.