[vtkusers] Writing multi-paged tiff image

Maarten Beek beekmaarten at yahoo.com
Thu Dec 18 10:43:25 EST 2014


Hey Bradley,
Thanks for your reply, I'll have a look at the itk code.
I just have some 3d tiff ct data and after soon processing, my first thought was to just save it in its original format.
Thanks for your remark re. spacing and origin; I was about to send an email to the person who gave me the ct data, to ask about this data. I now feel more confident that my code didn't screw up these numbers ;-)
Maarten
 

     On Thursday, December 18, 2014 9:20 AM, Bradley Lowekamp <blowekamp at mail.nih.gov> wrote:
   

 Hello,
I have recently refactored ITK's TIFFImageIO mostly for improving reading, but it supports writing 3D images as multi-paged tiffs. You can utilized ITK ImageIO by using ITK's VTK bridge module [1]. Alternatively, you can look at ITK's implementation as see about porting it to VTK[2]. I believe the writing method still has an evident heritage from VTK.
I am not a big fan for 3D tiffs because there is no standard way to store z-spacing and image origin.
Brad
[1] http://www.itk.org/Doxygen/html/group__ITKVTK.html[2https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/IO/TIFF/src/itkTIFFImageIO.cxx#L504-L764
On Dec 17, 2014, at 4:42 PM, Maarten Beek via vtkusers <vtkusers at vtk.org> wrote:


Thanks for your reply David,
I would like to write multi-page tiffs, but I might not be smart enough. I see one tiff file with all images stitched together in a long column, so I am thinking of a missing page return or something. But I guess that's a over-simplification ;-)
vtkImageWriter works fine as long as I remember the extent, spacing and origin.
Last year I saw multi-page tiff phloro images, now I see multi-page tiff ct data; maybe vtktiffwriter will be 3d capable some day....
Maarten
 

     On Wednesday, December 17, 2014 4:30 PM, David Gobbi <david.gobbi at gmail.com> wrote:
   

 On Wed, Dec 17, 2014 at 2:10 PM, Maarten Beek <beekmaarten at yahoo.com> wrote:
Hi David,
Sorry, I'll try to remember. I did search the internet but couldn't find a clear answer.
I am a bit confused though, because vtkTiffReader reads multi-page tiffs fine. What is preventing a multi-page writer?

All that's missing is someone with the need to write multi-page files, who is willing to modify the writer so that it writes multi-page files!  It isn't a trivial project, because there are at least three different semi-standard ways of storing 3D data in TIFF, and they aren't entirely compatible with one another.
Even with the reader, multi-page files were troublesome for a long time, because it could read some 3D files but not others (again, because TIFF has  several semi-standard ways of storing 3D data).  TIFF was not initially designed to handle 3D, and all the ways of making it work with 3D are a bit hackish.


What are my options in vtk? What writers do write 3d images? Does a tool exist that puts multiple tiffs in one multi-page tiff?


Well, right now NIFTI is my favorite 3D image format.  I don't use TIFF much, so I don't know what TIFF tools are available.  
 - David 

    _______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers



   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20141218/00a72cdb/attachment.html>


More information about the vtkusers mailing list