Hi Roman,
> I've extended the MetaImage (used by e.g. ITK/VTK) IO-plugin from > Kang Li (http://www.kangli.org/code/MetaImage_Reader_Writer.html) to > also support compression and local data storage, i.e. MHAs. The > MetaImage Reader/Writer from > (http://ij-plugins.sourceforge.net/plugins/3d-io/) seems not to > support this either. Reading and writing in Fiji was tested with MHDs > and MHAs created/read by ITK-4.5.1. While the plugin handles files > bigger than 4GB correctly, (for unknown reasons my) ITK seems to have > problems with MHDs/MHAs bigger than 4GB (in general). Interesting work. If you would like to get it upstream into Fiji, I suggest filing a Pull Request [1] against the IO repository [2]. Please also be aware that ImageJ is moving away from HandleExtraFileTypes hacks in favor of a unified Java library for image I/O known as SCIFIO [3]. There is already a SCIFIO/ITK bridge project [4, 5] that allows reading and writing SCIFIO formats within ITK. Regards, Curtis [1] https://help.github.com/articles/using-pull-requests [2] https://github.com/fiji/IO [3] http://imagej.net/SCIFIO [4] https://github.com/scifio/scifio-imageio [5] https://github.com/scifio/scifio-itk-bridge On Mon, Jul 28, 2014 at 12:34 PM, Williams, Norman K < [hidden email]> wrote: > This is a good thing to submit to ITK proper; it would require conversion > to C++, though. > > On 7/28/14, 9:23 AM, "Dr. Roman Grothausmann" > <[hidden email]> wrote: > > >Dear mailing list members, > > > > > >I've extended the MetaImage (used by e.g. ITK/VTK) IO-plugin from Kang > >Li > >(http://www.kangli.org/code/MetaImage_Reader_Writer.html) to also support > >compression and local data storage, i.e. MHAs. The MetaImage > >Reader/Writer from > >(http://ij-plugins.sourceforge.net/plugins/3d-io/) seems not to support > >this > >either. > >Reading and writing in Fiji was tested with MHDs and MHAs created/read by > >ITK-4.5.1. While the plugin handles files bigger than 4GB correctly, (for > >unknown reasons my) ITK seems to have problems with MHDs/MHAs bigger than > >4GB > >(in general). > >The plugin does not check whether the size of the compressed data is > >correct, > >ITK however does. If the header lacks an entry of CompressedDataSize, ITK > >throws > >an error when reading/loading such a file. If the size specified with > >CompressedDataSize is too big, ITK just issues a warning. This was used > >as a > >workaround because I did not find an easy way in Java to put the correct > >value > >for CompressedDataSize without using extra temporary files (which might > >be quite > >big). > > > >Attached are the modified files (java-files, plugins.config and a > >repacked > >IO_-2.0.0-SNAPSHOT.jar). > >A modified HandleExtraFileTypes.java (based on: > >https://github.com/fiji/IO/blob/master/src/main/java/HandleExtraFileTypes > . > >java) > >is also included. > >Togehter with the modified Plugin it allows opening MHDs and MHAs > >directly. > > > > > >The repacked IO_-2.0.0-SNAPSHOT.jar was generated with: > > > >javac -cp /opt/fiji/Fiji.app/jars/ij-1.48a.jar:. MetaImage_Reader.java > >javac -cp /opt/fiji/Fiji.app/jars/ij-1.48a.jar:. MetaImage_Writer.java > >javac -cp /opt/fiji/Fiji.app/jars/ij-1.48a.jar:. MetaImage_CWriter.java > > > >javac -cp /opt/fiji/Fiji.app/jars/ij-1.48a.jar:. HandleExtraFileTypes.java > > > >The compiled Class-files were moved to a subfolder named io/: > >ExtendedFileOpener.class MetaImage_CWriter.class MetaImage_Writer.class > >ExtendedFileSaver.class MetaImage_Reader.class > >ReplacingInputStream.class > > > >And then included/replaced with zip: > >zip -r IO_-2.0.0-SNAPSHOT.jar plugins.config HandleExtraFileTypes.class > >io/ > > > >Feel free to add these extensions to the Plugin-Page or the ImageJ/Fiji > >repository. > >Any suggestions concerning improvements are very welcome. > > > > > >Many thanks for ImageJ/Fiji and the initial Metaimage IO-plugin. > >Roman > > > > > >-- > >Dr. Roman Grothausmann > > > >Tomographie und Digitale Bildverarbeitung > >Tomography and Digital Image Analysis > > > >Institut für Funktionelle und Angewandte Anatomie, OE 4120 > >Medizinische Hochschule Hannover > >Carl-Neuberg-Str. 1 > >D-30625 Hannover > > > >Tel. +49 511 532-9574 > > > > > > > >====================================================================== > >A potentially unsafe attachment has been removed from this email > >message. See http://its.uiowa.edu/support/article/100806 for further > >information. > > > >Removed attachment name(s): > >IO_-2.0.0-SNAPSHOT.jar > >====================================================================== > > > > > > ________________________________ > Notice: This UI Health Care e-mail (including attachments) is covered by > the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is > confidential and may be legally privileged. If you are not the intended > recipient, you are hereby notified that any retention, dissemination, > distribution, or copying of this communication is strictly prohibited. > Please reply to the sender that you have received the message in error, > then delete it. Thank you. > ________________________________ > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-users > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Roman,
> I finally found the time to do as You suggested and created a frok on > github, pushed my changes and created a pull request. Thank you very much! I merged it. > Is the option --mini-maven gone in newer versions of fiji? Yeah, MiniMaven is not something that we regularly exercise these days. Maintaining the MiniMaven build on top of a normal Maven build is a maintenance burden that we honestly haven't had time for lately. We should probably update the online documentation, fiji.git repository, etc., but there's not much time to do that either. It will happen eventually, as the Fiji build is fully reconciled with the Fiji update site. In the meantime, your best bet is definitely to build with Maven. Regards, Curtis On Mon, Feb 23, 2015 at 5:22 AM, Dr. Roman Grothausmann < [hidden email]> wrote: > Hi Curtis, > > > Many thanks for Your reply. I finally found the time to do as You > suggested and created a frok on github, pushed my changes and created a > pull request. > > I had problems though testing my changes concerning maven integration. It > only worked with a full maven installation. These did not work: > ImageJ-linux64 --mini-maven compile > ./Build.sh #from fiji clone > > Is the option --mini-maven gone in newer versions of fiji? I found it only > in a version from 2013. > I wasn't sure what to do about SCIFIO integration. > Hoping the contribution is useful and usable this way. > > Kind regards, > Roman > > > On 04/08/14 21:35, Curtis Rueden wrote: > >> Hi Roman, >> >> > I've extended the MetaImage (used by e.g. ITK/VTK) IO-plugin from >> > Kang Li (http://www.kangli.org/code/MetaImage_Reader_Writer.html) to >> > also support compression and local data storage, i.e. MHAs. The >> > MetaImage Reader/Writer from >> > (http://ij-plugins.sourceforge.net/plugins/3d-io/) seems not to >> > support this either. Reading and writing in Fiji was tested with MHDs >> > and MHAs created/read by ITK-4.5.1. While the plugin handles files >> > bigger than 4GB correctly, (for unknown reasons my) ITK seems to have >> > problems with MHDs/MHAs bigger than 4GB (in general). >> >> Interesting work. If you would like to get it upstream into Fiji, I >> suggest >> filing a Pull Request [1] against the IO repository [2]. >> >> Please also be aware that ImageJ is moving away from HandleExtraFileTypes >> hacks >> in favor of a unified Java library for image I/O known as SCIFIO [3]. >> There is >> already a SCIFIO/ITK bridge project [4, 5] that allows reading and writing >> SCIFIO formats within ITK. >> >> Regards, >> Curtis >> >> [1] https://help.github.com/articles/using-pull-requests >> [2] https://github.com/fiji/IO >> [3] http://imagej.net/SCIFIO >> [4] https://github.com/scifio/scifio-imageio >> [5] https://github.com/scifio/scifio-itk-bridge >> >> >> On Mon, Jul 28, 2014 at 12:34 PM, Williams, Norman K >> <[hidden email] <mailto:[hidden email]>> wrote: >> >> This is a good thing to submit to ITK proper; it would require >> conversion >> to C++, though. >> >> On 7/28/14, 9:23 AM, "Dr. Roman Grothausmann" >> <[hidden email] >> <mailto:[hidden email]>> wrote: >> >> >Dear mailing list members, >> > >> > >> >I've extended the MetaImage (used by e.g. ITK/VTK) IO-plugin from >> Kang >> >Li >> >(http://www.kangli.org/code/MetaImage_Reader_Writer.html) to also >> support >> >compression and local data storage, i.e. MHAs. The MetaImage >> >Reader/Writer from >> >(http://ij-plugins.sourceforge.net/plugins/3d-io/) seems not to >> support >> >this >> >either. >> >Reading and writing in Fiji was tested with MHDs and MHAs >> created/read by >> >ITK-4.5.1. While the plugin handles files bigger than 4GB >> correctly, (for >> >unknown reasons my) ITK seems to have problems with MHDs/MHAs >> bigger than >> >4GB >> >(in general). >> >The plugin does not check whether the size of the compressed data is >> >correct, >> >ITK however does. If the header lacks an entry of >> CompressedDataSize, ITK >> >throws >> >an error when reading/loading such a file. If the size specified >> with >> >CompressedDataSize is too big, ITK just issues a warning. This was >> used >> >as a >> >workaround because I did not find an easy way in Java to put the >> correct >> >value >> >for CompressedDataSize without using extra temporary files (which >> might >> >be quite >> >big). >> > >> >Attached are the modified files (java-files, plugins.config and a >> >repacked >> >IO_-2.0.0-SNAPSHOT.jar). >> >A modified HandleExtraFileTypes.java (based on: >> >https://github.com/fiji/IO/blob/master/src/main/java/ >> HandleExtraFileTypes. >> >java) >> >is also included. >> >Togehter with the modified Plugin it allows opening MHDs and MHAs >> >directly. >> > >> > >> >The repacked IO_-2.0.0-SNAPSHOT.jar was generated with: >> > >> >javac -cp /opt/fiji/Fiji.app/jars/ij-1.48a.jar:. >> MetaImage_Reader.java >> >javac -cp /opt/fiji/Fiji.app/jars/ij-1.48a.jar:. >> MetaImage_Writer.java >> >javac -cp /opt/fiji/Fiji.app/jars/ij-1.48a.jar:. >> MetaImage_CWriter.java >> > >> >javac -cp /opt/fiji/Fiji.app/jars/ij-1.48a.jar:. >> HandleExtraFileTypes.java >> > >> >The compiled Class-files were moved to a subfolder named io/: >> >ExtendedFileOpener.class MetaImage_CWriter.class >> MetaImage_Writer.class >> >ExtendedFileSaver.class MetaImage_Reader.class >> >ReplacingInputStream.class >> > >> >And then included/replaced with zip: >> >zip -r IO_-2.0.0-SNAPSHOT.jar plugins.config >> HandleExtraFileTypes.class >> >io/ >> > >> >Feel free to add these extensions to the Plugin-Page or the >> ImageJ/Fiji >> >repository. >> >Any suggestions concerning improvements are very welcome. >> > >> > >> >Many thanks for ImageJ/Fiji and the initial Metaimage IO-plugin. >> >Roman >> > >> > >> >-- >> >Dr. Roman Grothausmann >> > >> >Tomographie und Digitale Bildverarbeitung >> >Tomography and Digital Image Analysis >> > >> >Institut für Funktionelle und Angewandte Anatomie, OE 4120 >> >Medizinische Hochschule Hannover >> >Carl-Neuberg-Str. 1 >> >D-30625 Hannover >> > >> >Tel. +49 511 532-9574 >> > >> > >> > >> >=========================================================== >> =========== >> >A potentially unsafe attachment has been removed from this email >> >message. See http://its.uiowa.edu/support/article/100806 for >> further >> >information. >> > >> >Removed attachment name(s): >> >IO_-2.0.0-SNAPSHOT.jar >> >=========================================================== >> =========== >> > >> >> >> >> ________________________________ >> Notice: This UI Health Care e-mail (including attachments) is covered >> by the >> Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is >> confidential >> and may be legally privileged. If you are not the intended >> recipient, you >> are hereby notified that any retention, dissemination, distribution, >> or >> copying of this communication is strictly prohibited. Please reply >> to the >> sender that you have received the message in error, then delete it. >> Thank you. >> ________________________________ >> _____________________________________ >> Powered by www.kitware.com <http://www.kitware.com> >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/insight-users >> >> >> > -- > Dr. Roman Grothausmann > > Tomographie und Digitale Bildverarbeitung > Tomography and Digital Image Analysis > > Institut für Funktionelle und Angewandte Anatomie, OE 4120 > Medizinische Hochschule Hannover > Carl-Neuberg-Str. 1 > D-30625 Hannover > > Tel. +49 511 532-9574 > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |