[Insight-developers] Reading an ITK Image from multiple files in a Directory
Stephen Aylward
stephen.aylward at kitware.com
Tue Jan 25 10:28:28 EST 2011
MetaImage format can handle this.
Create a file in a top level directory call Image.mhd
In that file, put the following text
NDims = 3
DimSize = XXX YYY ZZZ
ElementSpacing = 1 1 1
Positions = 0 0 0
ElementByteOrderMSB = Flase
ElementType = MET_UCHAR
HeaderSize = -1
ElementDataFile = LIST
<first slice filename>
<second slice filename>
...
Replace the XXX YYY and ZZZ with the size of the final image. XXX
YYY should be the size of each slice. ZZZ should be the number of
slices. All are in units of pixels.
Replace the 1 1 1 for elementSpacing if you know the between-pixel
distance of your image, i.e., is the spacing between slices equal to
the spacing between increments in the x and y dimensions?
Replace the MET_UCHAR with MET_CHAR, MET_USHORT, MET_SHORT, MET_INT,
MET_FLOAT, .... as appropriate for your data. Note that your data
cannot be compressed data. It must be in the "raw" format.
Then add the filenames below the LIST keyword.
Hope this helps.
More details online at:
http://www.itk.org/Wiki/MetaIO/Documentation
s
On Tue, Jan 25, 2011 at 4:35 AM, Martin Waitzbauer <mazzok at gmx.at> wrote:
> Hi there,
>
>
> Id like to ask if there is a possibility to read an itk image from several images,all equally sized, all contained in one directory??
>
> every image would then increase the Z axis, so in theory
>
>
> does such a filter exists?
>
>
> Thanks!
>
> Regards
> maz
> --
> Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!
> Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail
> _______________________________________________
> 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://kitware.com/products/protraining.html
>
> 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://www.itk.org/mailman/listinfo/insight-developers
>
--
==============================
Stephen R. Aylward, Ph.D.
Director of Medical Imaging Research
Kitware, Inc. - North Carolina Office
http://www.kitware.com
stephen.aylward (Skype)
(919) 969-6990 x300
More information about the Insight-developers
mailing list