<div dir="ltr"><div><div>Hi Aaron et al., <br><br></div>Looking at the topic named "j2k" [1], I noticed that you backported the change originally implemented by Osirix folks [2]<br><br></div><div>Few ideas:<br></div>


<div>

<br> 1) Checking the osirix history, there are also more general bug fixes that could probably be contributed to upstream DCMTK. We should probably look into these.<br><br></div><div> 2) Based on Michael answer [3], I don't think they would be against integrating support for Jpeg2k. @Michael: Assuming we also add test validating the proper integration, would you be up to consider upstream integration ?<br>




</div><div><br> 3) Waiting change are pushed into the official upstream DCMTK, may be CTK and Osirix folks could share a common repository ? <br><br></div><div>Let me know what you think, <br><br></div><div>Thanks<br></div>


<div>Jc<br></div><div><br>[1] <a href="https://github.com/OpenRadStack/dcmtk/commits/j2k" target="_blank">https://github.com/OpenRadStack/dcmtk/commits/j2k</a><br>

<br>[2] <a href="https://github.com/pixmeo/osirix/commits/develop/Binaries/dcmtk-source" target="_blank">https://github.com/pixmeo/osirix/commits/develop/Binaries/dcmtk-source</a><br><br>[3] <a href="http://slicer-devel.65872.n3.nabble.com/JPEG-2000-tp4030949p4030965.html" target="_blank">http://slicer-devel.65872.n3.nabble.com/JPEG-2000-tp4030949p4030965.html</a><br>


</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Feb 25, 2014 at 6:18 PM, Jean-Christophe Fillion-Robin <span dir="ltr"><<a href="mailto:jchris.fillionr@kitware.com" target="_blank">jchris.fillionr@kitware.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Cross-posting answer from Aaron:<br><br>On Tue, Feb 25, 2014 at 9:19 AM, Aaron Boxer <span dir="ltr"><<a href="mailto:boxerab@gmail.com" target="_blank">boxerab@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div><div><br></div></div><div>Thanks. My patch will probably not be accepted by Offis, since they have their own commercial jpeg 2000 product.</div><div>So, using this means that we will have to use an unofficial DCMTK build. </div>




<div><br></div><div>My patch changes very little in the library, so it is quite safe.</div></blockquote><div><br></div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Feb 25, 2014 at 6:01 PM, Jean-Christophe Fillion-Robin <span dir="ltr"><<a href="mailto:jchris.fillionr@kitware.com" target="_blank">jchris.fillionr@kitware.com</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Aaron Boxer</b> <span dir="ltr"><<a href="mailto:boxerab@gmail.com" target="_blank">boxerab@gmail.com</a>></span><br>




Date: Fri, Feb 21, 2014 at 3:28 PM<br>Subject: Re: [slicer-devel] JPEG 2000<br>To: "<a href="mailto:slicer-devel@bwh.harvard.edu" target="_blank">slicer-devel@bwh.harvard.edu</a>" <<a href="mailto:slicer-devel@bwh.harvard.edu" target="_blank">slicer-devel@bwh.harvard.edu</a>><br>




<br><br><div dir="ltr"><div>Well Folks, I've been able to successfully decode jpeg 2000 images on my dcmtk branch.</div><div><br></div><div>You can find the branch here:</div><div><br></div><a href="https://github.com/OpenRadStack/dcmtk/tree/j2k" target="_blank">https://github.com/OpenRadStack/dcmtk/tree/j2k</a><br>





<div class="gmail_extra"><br></div><div class="gmail_extra">I am still using git submodules and manual build to build openjpeg; haven't had a chance yet to follow Jcr's build advice.</div><div class="gmail_extra">





<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">If you would like to try it out, you can follow these steps:</div><div class="gmail_extra"><br></div><div class="gmail_extra">1) clone the project</div>





<div class="gmail_extra">2) run  $  git submodule init & git submodule update</div><div class="gmail_extra">3) use cmake to build  openjpeg  (third-party/openjpeg)   into third-party/openjpeg-build   folder (enable shared library)</div>





<div class="gmail_extra">4) make sure that openjp2 shared library is in your path</div><div class="gmail_extra"><br></div><div class="gmail_extra">For testing, I am running the dcmtk dcmj2pnm command line tool to convert dicom images to bmp.</div>





<div class="gmail_extra"><br></div><div class="gmail_extra">Command line I am using:</div><div class="gmail_extra"><br></div><div class="gmail_extra">+ob +Wm dicomFile destinationFile.bmp</div><div class="gmail_extra"><br>





</div><div class="gmail_extra">Cheers,<br></div><div class="gmail_extra">Aaron</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div>





<div class="gmail_extra"><br><br><div class="gmail_quote"><div>On Thu, Feb 20, 2014 at 2:26 PM, Jean-Christophe Fillion-Robin <span dir="ltr"><<a href="mailto:jchris.fillionr@kitware.com" target="_blank">jchris.fillionr@kitware.com</a>></span> wrote:<br>





</div><div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div><div>
Hi Aaron, <br><br></div><div>
This is great news.<br></div><div><br></div>I don't think DCMTK should use either git submodule or External project, instead you should assume the library is either installed on the system or related path passed at configure time. You could then just call:<br>







<br></div>    find_package(OpenJPEG NO_MODULE)    See [1]<br><br></div><div>in the 3rdparty.cmake. See [2]<br></div><div><br></div>When configuring DCMTK, it means you would simply pass the path the OpenJPEG build tree passing -DOpenJPEG_DIR:PATH=/path/to/openJPEG-build<div>







<div><br><br></div><div>[1] This is possible because a OpenJPEGConfig.cmake is configured. see <a href="http://code.google.com/p/openjpeg/source/browse/trunk/cmake/OpenJPEGConfig.cmake.in" target="_blank">http://code.google.com/p/openjpeg/source/browse/trunk/cmake/OpenJPEGConfig.cmake.in</a> and <a href="http://code.google.com/p/openjpeg/source/browse/trunk/CMakeLists.txt#298" target="_blank">http://code.google.com/p/openjpeg/source/browse/trunk/CMakeLists.txt#298</a><br>







<br>[2] <a href="https://github.com/commontk/DCMTK/blob/patched-3/CMake/3rdparty.cmake" target="_blank">https://github.com/commontk/DCMTK/blob/patched-3/CMake/3rdparty.cmake</a><br></div></div></div><div class="gmail_extra">





<div><div><br><br><div class="gmail_quote">

On Thu, Feb 20, 2014 at 2:08 PM, Aaron Boxer <span dir="ltr"><<a href="mailto:boxerab@gmail.com" target="_blank">boxerab@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">







<div dir="ltr">Update: I am closing in on a jpeg2000-enabled branch from DCMTK master. Should be ready next week.<div>One issue I am having: I have added the openjpeg project (which is a cmake proj) to dcmtk as a git submodule.</div>









<div>Now I need to figure out how the cmake externalproject command works. </div><div><br></div><div><span style="font-family:arial,sans-serif;font-size:13.333333969116211px">(</span><a href="http://www.cmake.org/cmake/help/v2.8.12/cmake.html#module:ExternalProject" style="font-family:arial,sans-serif;font-size:13.333333969116211px" target="_blank">http://www.cmake.org/cmake/help/v2.8.12/cmake.html#module:ExternalProject</a><span style="font-family:arial,sans-serif;font-size:13.333333969116211px">)</span><br>








</div><div><br></div><div>If anyone here is familiar with this, and would like to help, please let me know.</div><div><br></div><div>Thanks,</div><div>Aaron</div>
<div><br></div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 17, 2014 at 9:45 AM, Steve Pieper <span dir="ltr"><<a href="mailto:pieper@isomics.com" target="_blank">pieper@isomics.com</a>></span> wrote:<br>








<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi Aaron - <div><br></div><div>I like your plan of reviewing the osirix implementation and taking advantage of the latest developments in OpenJPEG - very exciting to see this moving ahead!</div>








<div><br></div>
<div>Regarding your questions about thumbnails in ctkDICOM2: CTK only uses DCMTK, not GDCM, so it currently fails to create thumbnails for images not directly supported by DCMTK.  CTK doesn't have a mechanism to use ITK or GDCM, although I suppose this could be added.  In ctk we really wanted to have robust networking support in CTK and as you noted DCMTK has a well established track record in this.</div>









<div><br></div><div>Best,</div><div>Steve</div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 17, 2014 at 8:53 AM, Aaron Boxer <span dir="ltr"><<a href="mailto:boxerab@gmail.com" target="_blank">boxerab@gmail.com</a>></span> wrote:<br>









<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi Steve,<div class="gmail_extra"><br><div class="gmail_quote">





<div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">



<div dir="ltr"><div><br></div><div>That would be an awesome contribution - useful for slicer but also for CTK and other DCMTK users.  The situation right now is that slicer builds dcmtk (without jpeg2000 as you noted) so none of the dcmtk-based code can access that kind of image.  So for example in the ctkDICOM app the thumbnails aren't displayed for data of that type.  The osirix sample data is a good source of images that are compressed in a way dcmtk doesn't like.</div>











<div><br></div><div>That said, when slicer actually goes to read the data it is delegated to ITK's readers, which include GDCM and that supports jpeg2000 so the files load.</div></div></blockquote><div><br></div></div>









<div>
Interesting. Can the ctkDICOM app use GDCM for the thumbnails? </div><div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">





<div dir="ltr"><div><br>
</div><div>This is an oddly messy situation.  Personally I wish ITK had used DCMTK from the start, since that includes all the networking and other support.  But instead it started with GDCM, on the idea that it's lighter weight and has support for things like jpeg2000 and then later added DCMTK support too.  Since slicer delegates to ITK, there are some situations where DCMTK is used and others where GDCM is used.</div>










</div></blockquote><div><br></div></div><div> Yes. GDCM and DCMTK seem to excell in orthogonal areas: GDCM on DICOM image reading and DCMTK on DICOM networking. So, I can see why ITK chose GDCM initially, because it is an image-focused toolkit.</div>










<div><br></div><div>I would like to see more networking in GDCM, and more transfer syntaxes supported in the open DCMTK version :)</div><div><br></div><div>Anywho, I would be happy to add both JPEG2000 and JPEG-LS to DCMTK. </div>










<div><br></div><div>Cheers,</div><div>Aaron</div><div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">





<div class="gmail_extra">



<br>
<div class="gmail_quote"><div><div>On Sat, Feb 15, 2014 at 10:05 AM, Aaron Boxer <span dir="ltr"><<a href="mailto:boxerab@gmail.com" target="_blank">boxerab@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div><div dir="ltr">Hello,<div><br><div>





I was wondering about types of compression supported by the slicer DICOM module.</div>





<div>As you probably know, many DICOM images are compressed with JPEG 2000 compression. And I believe that DCMTK sells support for JPEG 2000, which leads me to believe that the slicer version of DCMTK does not support JPEG 2000.</div>












<div><br></div><div>Is this the case? Because I have done some work on the OpenJPEG project, and I think I could integrate OpenJPEG support into the slicer DCMTK.</div><div><br></div><div>Kind Regards,</div><div>Aaron</div>












</div></div>
<br></div></div>_______________________________________________<br>
slicer-devel mailing list<br>
<a href="mailto:slicer-devel@bwh.harvard.edu" target="_blank">slicer-devel@bwh.harvard.edu</a><br>
<a href="http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel" target="_blank">http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel</a><br>
To unsubscribe: send email to <a href="mailto:slicer-devel-request@massmail.spl.harvard.edu" target="_blank">slicer-devel-request@massmail.spl.harvard.edu</a> with unsubscribe as the subject<br>
<a href="http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ" target="_blank">http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ</a><br>
<br>
<br>
The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
<a href="http://www.partners.org/complianceline" target="_blank">http://www.partners.org/complianceline</a> . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.<br>
<br></blockquote></div><br></div>
</blockquote></div></div><br></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
slicer-devel mailing list<br>
<a href="mailto:slicer-devel@bwh.harvard.edu" target="_blank">slicer-devel@bwh.harvard.edu</a><br>
<a href="http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel" target="_blank">http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel</a><br>
To unsubscribe: send email to <a href="mailto:slicer-devel-request@massmail.spl.harvard.edu" target="_blank">slicer-devel-request@massmail.spl.harvard.edu</a> with unsubscribe as the subject<br>
<a href="http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ" target="_blank">http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ</a><br>
<br>
<br>
The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
<a href="http://www.partners.org/complianceline" target="_blank">http://www.partners.org/complianceline</a> . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.<br>
<br></blockquote></div><br><br clear="all"><br></div></div><span><font color="#888888">-- <br><a href="tel:%2B1%20919%20869%208849" value="+19198698849" target="_blank">+1 919 869 8849</a><br>
</font></span></div>
</blockquote></div></div></div><br></div></div>
<br>_______________________________________________<br>
slicer-devel mailing list<br>
<a href="mailto:slicer-devel@bwh.harvard.edu" target="_blank">slicer-devel@bwh.harvard.edu</a><br>
<a href="http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel" target="_blank">http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel</a><br>
To unsubscribe: send email to <a href="mailto:slicer-devel-request@massmail.spl.harvard.edu" target="_blank">slicer-devel-request@massmail.spl.harvard.edu</a> with unsubscribe as the subject<br>
<a href="http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ" target="_blank">http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/FAQ</a><br>
<br>
<br>
The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
<a href="http://www.partners.org/complianceline" target="_blank">http://www.partners.org/complianceline</a> . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.<span><font color="#888888"><br>
<br></font></span></div><span><font color="#888888"><br><br clear="all"><br>-- <br><a href="tel:%2B1%20919%20869%208849" value="+19198698849" target="_blank">+1 919 869 8849</a><br>
</font></span></div>
</blockquote></div><br><br clear="all"><br>-- <br><a href="tel:%2B1%20919%20869%208849" value="+19198698849" target="_blank">+1 919 869 8849</a><br>
</div>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><a href="tel:%2B1%20919%20869%208849" value="+19198698849" target="_blank">+1 919 869 8849</a><br>
</div></div>