Saving DICOM images using Imebra library












2















In my Android project I am currently using Imebra library to extract image frames from a dicom file and save them as Bitmaps. After that I use ffmpeg to create a video from these frames. Every thing is working well so far, but my only concern is whether I will loose any quality or information by using following methods from Imebra library:



Image image = imageIterator.next();
TransformsChain chain = transform(image);
Bitmap bitmap = getBitmap(image, chain);


Furthermore, if I am using any information by saving my image frames as bitmaps, can I save them as the raw format (by raw I mean imebra.Image, I am not sure if that's the same as .raw format?) and use them directly with ffmpeg?










share|improve this question



























    2















    In my Android project I am currently using Imebra library to extract image frames from a dicom file and save them as Bitmaps. After that I use ffmpeg to create a video from these frames. Every thing is working well so far, but my only concern is whether I will loose any quality or information by using following methods from Imebra library:



    Image image = imageIterator.next();
    TransformsChain chain = transform(image);
    Bitmap bitmap = getBitmap(image, chain);


    Furthermore, if I am using any information by saving my image frames as bitmaps, can I save them as the raw format (by raw I mean imebra.Image, I am not sure if that's the same as .raw format?) and use them directly with ffmpeg?










    share|improve this question

























      2












      2








      2








      In my Android project I am currently using Imebra library to extract image frames from a dicom file and save them as Bitmaps. After that I use ffmpeg to create a video from these frames. Every thing is working well so far, but my only concern is whether I will loose any quality or information by using following methods from Imebra library:



      Image image = imageIterator.next();
      TransformsChain chain = transform(image);
      Bitmap bitmap = getBitmap(image, chain);


      Furthermore, if I am using any information by saving my image frames as bitmaps, can I save them as the raw format (by raw I mean imebra.Image, I am not sure if that's the same as .raw format?) and use them directly with ffmpeg?










      share|improve this question














      In my Android project I am currently using Imebra library to extract image frames from a dicom file and save them as Bitmaps. After that I use ffmpeg to create a video from these frames. Every thing is working well so far, but my only concern is whether I will loose any quality or information by using following methods from Imebra library:



      Image image = imageIterator.next();
      TransformsChain chain = transform(image);
      Bitmap bitmap = getBitmap(image, chain);


      Furthermore, if I am using any information by saving my image frames as bitmaps, can I save them as the raw format (by raw I mean imebra.Image, I am not sure if that's the same as .raw format?) and use them directly with ffmpeg?







      dicom imebra






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 15 '18 at 22:24









      TheEngineerTheEngineer

      373111




      373111
























          1 Answer
          1






          active

          oldest

          votes


















          0














          The image you get with DrawBitmap::getBitmap is always an RGB 24 bit per pixel one: you will lose information in the case that the image uses more than 8 bit per color channel (e.g. a 16 bit grayscale image will lose the lower 8 bit of the pixel information).



          You could get an higher bit per pixel number by avoiding using DrawBitmap::getBitmap and by applying directly the transforms yourself (VOI/LUT, color transformation, high bit transform).
          After you have an Image with the desired color space and bit per pixel, than use the Image::GetReadingDataHandler to access the image underlying memory and generate the bitmap for ffmpeg.



          Disclosure: I'm the author of Imebra.






          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53328725%2fsaving-dicom-images-using-imebra-library%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            The image you get with DrawBitmap::getBitmap is always an RGB 24 bit per pixel one: you will lose information in the case that the image uses more than 8 bit per color channel (e.g. a 16 bit grayscale image will lose the lower 8 bit of the pixel information).



            You could get an higher bit per pixel number by avoiding using DrawBitmap::getBitmap and by applying directly the transforms yourself (VOI/LUT, color transformation, high bit transform).
            After you have an Image with the desired color space and bit per pixel, than use the Image::GetReadingDataHandler to access the image underlying memory and generate the bitmap for ffmpeg.



            Disclosure: I'm the author of Imebra.






            share|improve this answer




























              0














              The image you get with DrawBitmap::getBitmap is always an RGB 24 bit per pixel one: you will lose information in the case that the image uses more than 8 bit per color channel (e.g. a 16 bit grayscale image will lose the lower 8 bit of the pixel information).



              You could get an higher bit per pixel number by avoiding using DrawBitmap::getBitmap and by applying directly the transforms yourself (VOI/LUT, color transformation, high bit transform).
              After you have an Image with the desired color space and bit per pixel, than use the Image::GetReadingDataHandler to access the image underlying memory and generate the bitmap for ffmpeg.



              Disclosure: I'm the author of Imebra.






              share|improve this answer


























                0












                0








                0







                The image you get with DrawBitmap::getBitmap is always an RGB 24 bit per pixel one: you will lose information in the case that the image uses more than 8 bit per color channel (e.g. a 16 bit grayscale image will lose the lower 8 bit of the pixel information).



                You could get an higher bit per pixel number by avoiding using DrawBitmap::getBitmap and by applying directly the transforms yourself (VOI/LUT, color transformation, high bit transform).
                After you have an Image with the desired color space and bit per pixel, than use the Image::GetReadingDataHandler to access the image underlying memory and generate the bitmap for ffmpeg.



                Disclosure: I'm the author of Imebra.






                share|improve this answer













                The image you get with DrawBitmap::getBitmap is always an RGB 24 bit per pixel one: you will lose information in the case that the image uses more than 8 bit per color channel (e.g. a 16 bit grayscale image will lose the lower 8 bit of the pixel information).



                You could get an higher bit per pixel number by avoiding using DrawBitmap::getBitmap and by applying directly the transforms yourself (VOI/LUT, color transformation, high bit transform).
                After you have an Image with the desired color space and bit per pixel, than use the Image::GetReadingDataHandler to access the image underlying memory and generate the bitmap for ffmpeg.



                Disclosure: I'm the author of Imebra.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 16 '18 at 7:57









                Paolo BrandoliPaolo Brandoli

                3,7521834




                3,7521834
































                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53328725%2fsaving-dicom-images-using-imebra-library%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Florida Star v. B. J. F.

                    Error while running script in elastic search , gateway timeout

                    Retrieve a Users Dashboard in Tumblr with R and TumblR. Oauth Issues