{"id":1272,"date":"2017-04-18T10:53:44","date_gmt":"2017-04-18T01:53:44","guid":{"rendered":"http:\/\/rageworx.info\/?p=1272"},"modified":"2017-04-18T16:43:57","modified_gmt":"2017-04-18T07:43:57","slug":"libtinydicom-librawprocessor-lesson-1","status":"publish","type":"post","link":"https:\/\/rageworx.info\/?p=1272","title":{"rendered":"tinydicom + rawprocessor lesson #1"},"content":{"rendered":"<p>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 &#8211; unfortunately I am sorry about supporting M$VC, but I don&#8217;t like care about distinct, banishing standard compiler.<\/p>\n<p>Ok, let understand what is each library doing what it does and what it existed for.<\/p>\n<h1>libtinydicom<\/h1>\n<p>This library was born to read and write DICOM tags in a file by myself. At a time I made this, there&#8217;s some commercial libraries and open source too &#8211; A.K.A DCMTK. I was just wanted to write simply some DICOM tags and also reads Pixel datas from any DCM files &#8211; so I have started to read <a href=\"http:\/\/dicom.nema.org\/\" target=\"_blank\">NEMA&#8217;s DICOM standards<\/a>. And it was about 2011.<\/p>\n<p><a href=\"http:\/\/rageworx.info\/wp-content\/uploads\/2017\/04\/blog_title_libtinydicom.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-1273\" src=\"http:\/\/rageworx.info\/wp-content\/uploads\/2017\/04\/blog_title_libtinydicom-500x378.jpg\" alt=\"\" width=\"500\" height=\"378\" srcset=\"https:\/\/rageworx.info\/wp-content\/uploads\/2017\/04\/blog_title_libtinydicom-500x378.jpg 500w, https:\/\/rageworx.info\/wp-content\/uploads\/2017\/04\/blog_title_libtinydicom.jpg 512w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p>It passed years and continuously made it works well with many different DCM files, and now it availed to as an open source on <a href=\"https:\/\/github.com\/rageworx\/libtinydicom\" target=\"_blank\">GitHub.com<\/a>.<\/p>\n<p>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.<\/p>\n<p>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.<\/p>\n<h2>How to use it ?<\/h2>\n<p>Simply you can download source code as ZIP compression from <a href=\"https:\/\/github.com\/rageworx\/libtinydicom\" target=\"_blank\">here<\/a>. 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 &#8211; If don&#8217;t know? Just, please, don&#8217;t try to use it, It may difficult to understand next jobs.<\/p>\n<p>Now choose one of Makefiles that have extensions &#8211; gcc and llvm.\u00a0 Just copy one Makefile.{your compiler to use} to Makefile as like <code>cp Makefile.gcc Makefile<\/code> and then, just type to <code>make<\/code>.\u00a0\u00a0 If it succeed to build all sources, you can see a <code>lib<\/code> directroy, and there&#8217;s two files : libtinydicom.a and libdcm.h<\/p>\n<p>And now you may understand how it be used, and this lesson may continued to next.<\/p>\n<p>&nbsp;<\/p>\n<h1>librawprocessor<\/h1>\n<p>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.<\/p>\n<p>You can download or clone source codes <a href=\"https:\/\/github.com\/rageworx\/librawprocessor\" target=\"_blank\">here<\/a>.<\/p>\n<p><a href=\"http:\/\/rageworx.info\/wp-content\/uploads\/2017\/04\/blog_title_librawprocessor.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-1274\" src=\"http:\/\/rageworx.info\/wp-content\/uploads\/2017\/04\/blog_title_librawprocessor-500x399.jpg\" alt=\"\" width=\"500\" height=\"399\" srcset=\"https:\/\/rageworx.info\/wp-content\/uploads\/2017\/04\/blog_title_librawprocessor-500x399.jpg 500w, https:\/\/rageworx.info\/wp-content\/uploads\/2017\/04\/blog_title_librawprocessor.jpg 512w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p>&#8220;librawprocessor&#8221; supports OpenMP for processing image quickly if your compiler supports this feature. Most of processing features are optized for OpenMP and AVX instruction.<\/p>\n<h2>Features:<\/h2>\n<ul>\n<li>Load from File, Memory.<\/li>\n<li>Save as a new RAW image.<\/li>\n<li>Flip vertical, horizontal<\/li>\n<li>Fast Rotate 90, 180, 270 degrees<\/li>\n<li>Free Rotate in 0 to 359.99 degrees<\/li>\n<li>Change width and height in size of height, to recognize what resolution is right.<br \/>\n( Most medical RAW images has no information about sizes )<\/li>\n<li>Invert<\/li>\n<li>Rescale with many filters : Bilinear, Bicubic, B-Spline, Lanzcos<\/li>\n<li>Kernel matrix filtering : sharpen, blur or customized<\/li>\n<li>Brightness, Contrast, Gamma adjustment<\/li>\n<li>Tone mapping with Drago and Reinhard<\/li>\n<li>CLAHE<\/li>\n<li>Generate low frequency image and anisotropic filtered image from source<\/li>\n<li>Advanced edge enhace<\/li>\n<li>Automatic weight calculation ( window width )<\/li>\n<li>Get down scaled pixel ranged data from source ( thresholding to any bits, 8 or 16bits )<\/li>\n<\/ul>\n<h2>How to use it ?<\/h2>\n<p>Simply you can download or clone from <a href=\"https:\/\/github.com\/rageworx\/librawprocessor\" target=\"_blank\">here<\/a>. 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.<\/p>\n<p>After you got source code on your system, copy your right Makefile.{compiler type you have} to Makefile as like this : <code>cp Makefile.gcc Makefile <\/code>, then proceed simply <code>make<\/code>. And you can decide to use OpenMP option with appends a word <code>openmp<\/code> to <code>make<\/code>.<\/p>\n<blockquote><p>Required OpenMP is at least 3.0 or above. lower version may reason of compile failure.<\/p><\/blockquote>\n<p>And now you may understand how it be used, and this lesson may continued to next, too.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &#8211; unfortunately I am sorry about supporting M$VC, but I don&#8217;t like care about distinct, banishing standard compiler. Ok, let understand what is&#8230; <a href=\"https:\/\/rageworx.info\/?p=1272\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,476,438,3],"tags":[477,447,478,479],"class_list":["post-1272","post","type-post","status-publish","format-standard","hentry","category-development","category-lesson","category-medical","category-raphs","tag-lesson","tag-librawprocessor","tag-libtinydicom","tag-opensource"],"_links":{"self":[{"href":"https:\/\/rageworx.info\/index.php?rest_route=\/wp\/v2\/posts\/1272","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rageworx.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rageworx.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rageworx.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rageworx.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1272"}],"version-history":[{"count":0,"href":"https:\/\/rageworx.info\/index.php?rest_route=\/wp\/v2\/posts\/1272\/revisions"}],"wp:attachment":[{"href":"https:\/\/rageworx.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1272"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rageworx.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1272"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rageworx.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1272"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}