ITK/File Formats: Difference between revisions

From KitwarePublic
< ITK
Jump to navigationJump to search
(SNpCTPDjXsldHjwf)
(64-bit pixel type support on all platforms provided by http://review.source.kitware.com/#/c/21513/)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
SiteBuilder is perfect for new users unaimfliar with developing websites. The five step wizard packs the supremacy of professional website hosting in a simple graphical consumer interface.Online success gets going with a fantastic domain. At Domain.com, we make it simple and economical to get the domain name you want, fast. We offer you all major Top Degree Domains (TLDs) and at the time of 25 Region Code Top Degree Domains (ccTLDs). Every domain name registration includes the following domain tools:A domain name name, or Web address, is an tackle in which it is possible to be located online. It's how you'll communicate oneself via email or your web page and it's what potential consumers consider of once attempting to discover you.Once you register a domain name, the Internet Corporation for Assigned Names and Numbers (ICANN) requires your domain name name registrar to submit your personal reach details to the WHOIS database. When your listing seems in that online directory, it is publicly available to anybody who chooses to check domain name names employing the WHOIS look tool.Domains includes search for new domain name name, domain name names registration, domain name registrar transfer, domain locking, private domain name registration, Buy a domain name names and site internet hosting for less than GoDaddy, Network Solutions, Register.com or OrderYourName.com. Your supply for all things domain name names related.Domain name registration for personal or company use, switch or register your domain name for low price domain leaders registrations.Buy high quality domain name, sign-up a domain name names or locate available web domains for purchase at OrderYourName, your source for cheapest domains and hosting.Sign-up a domain name and switch domains. Reliable web internet hosting and VPS. Highly effective site, blog, and ecommerce instruments. 10 many years, hundreds of thousands of consumers.It forum discusses normal domain issues, similar to: domains as a brand, domain values, negotiating domain sales, domain inventory management.A domain name is an identification tag which defines a realm of administrative autonomy, authority, or management in the Internet. Domain names are also important for domain hosting\website hostingDomain registrations  web domain registration for your web site is speedy and simple to at Register.com. Check accessibility with our search domains tool.Buy a domain name and internet site hosting for much less than GoDaddy, Network Solutions, OrderYourname.com or Register.com. Your supply for everything domain names related.A big variety of domain name exts (normal & country-code TLDs). Full DNS/Whois management, ID safety, EPP transfer key, lck/unlock standing, and so on.Find out how to deal with your domain reach data and registration. Understand domain namelocking and Non-public domain name Registration.Register a domain, search for available domains, renew and transfer domains, and choose from a wide variety of domain extensions.Register a domain name search for available domains, renew and switch domains, and choose from a large wide variety of domain extensions.Domains provides web hosting, transfer domains, domain lookup, domnain names, and allows you to buy domain names.OrderYourname.com domains gives web hosting, switch domains, domain lookup, domnain names, and will allow you to buy domains.Get free of charge domain name registration with a revealed World wide web web site hosting program with OrderYourName.com domain hosting registration services.
ITK features a powerful plugin-based IO mechanism for reading and writing images, which is covered briefly in [[Plugin IO mechanisms]] and in detail in Chapter 7 (PDF page 219) of the [http://www.itk.org/ItkSoftwareGuide.pdf ITK Software Guide]. The discussion in [[Plugin IO mechanisms]] also discusses how new file formats can be added existing compiled applications!
 
== File Formats and Pixel Types ==
 
The itk::Image<> class can be templated over virtually any pixel type, however not all file formats support all data types for reading and writingIn some cases, it may be necessary to add an itk::CastImageFilter<> to convert the output to a pixel format appropriate for the target fileIt is important not to truncate the data by converting to a smaller type (ie. short -> char). In this case, the itk::RescaleIntensityImageFilter<> can be used before casting.
 
The following table lists the built-in file format support against each data type:
 
* Analyze/NIFTI
char
unsigned char
short
unsigned short
int
unsigned int
long long (on 64-bit platforms)
unsigned long long (on 64-bit platforms)
float
double
RGB<unsigned char>
* BMP (2D only)
unsigned char
RGB<unsigned char>
* DICOM
float
char
unsigned char
short
unsigned short
RGB<char>
RGB<short>
* GDCM
unsigned char
char
unsigned short
short
unsigned int
int
double
* GE
???
* GIPL
binary
char
unsigned char
short
unsigned short
int
unsigned int
float
double
surface
polygon
* IPL
short
* JPEG (2D only)
unsigned char
* MetaImage (mhd): raw, compressed
char
unsigned char
short
unsigned short
long
ulong
int
unsigned int
long long (on 64-bit platforms)
unsigned long long (on 64-bit platforms)
float
double
vector<>
Also supports reading and writing
  - itk's SpatialObjects (i.e., scenes containing ellipses, images, vessels, dti fiber tracks, etc)
  - Patient Meta Data (orientation, scan date, comments, modality, etc. - user extensible)
  - data stored in multiple files (e.g., a metaImage file could be a text file pointing to a series of
      2D images that are stacked to form the 3D metaImage).
Reference: http://www.itk.org/Wiki/MetaIO
* Nrrd (.nhdr, .nrrd): raw or gzip compressed
signed char
unsigned char
short
unsigned short
int
unsigned int
long long (on 64-bit platforms)
unsigned long long (on 64-bit platforms)
float
double
vector<>
Also supports reading and writing
  - all the pixel types in ImageIOBase, including DIFFUSIONTENSOR3D
  - MetaData dictionary, via mapping to key/value pairs
  - data from multiple files, using MetaIO conventions
[[Getting Started with the NRRD Format]]
 
[http://teem.sourceforge.net/nrrd/format.html NRRD format definition]
 
*PNG (2D)
unsigned char
unsigned short
RGB
RGBA
* SiemensVision
???
* Stimulate
char
short
int
float
double
* TIFF (2D only)
unsigned char
unsigned short
RGB
* VTK
float
double
unsigned char
char
unsigned short
short
unsigned int
int
unsigned long long (on 64-bit platforms)
long long (on 64-bit platforms)
RGB
 
== Importing other file format ==
 
=== Movies as 3D images ===
 
From the Insight-User Amadeus:
 
I work exclusively in Linux and one can use mplayer - the mother of all
multimedia tools - to dump each frame in a movie clip. MPlayer understands
just about any format under the sun and can use just about any codec as
well. E.g. to dump each frame in an avi clip to a separate png image
 
mplayer -vo png movie.avi
 
To see to what other formats one can output the frames to,  
 
mplayer -vo help
 
Then, the frames dumped by mplayer can be put together into a volume
using ImageSeriesReadWrite in InsightToolkit-2.0.0/Examples/IO/.
 
Of course, in Linux and other unixes the shell understands wildcards,  
so with minor changes, it ImageSeriesReadWrite can be modified to work
like this:
 
ImageSeriesReadWrite frame*.png output.mha  # or e.g. output.mhd
 
The input frames need not have the names that the original
ImageSeriesReadWrite expects.
 
=== Converting unsupported 2D images to an ITK supported format ===
 
[http://www.imagemagick.org ImageMagick] supports conversion between over 90 (typically 2D) image formats as well as some basic image processing.   Operates from the command line on PCs and on *nix machines.
 
{{ITK/Template/Footer}}

Latest revision as of 18:45, 13 November 2017

ITK features a powerful plugin-based IO mechanism for reading and writing images, which is covered briefly in Plugin IO mechanisms and in detail in Chapter 7 (PDF page 219) of the ITK Software Guide. The discussion in Plugin IO mechanisms also discusses how new file formats can be added existing compiled applications!

File Formats and Pixel Types

The itk::Image<> class can be templated over virtually any pixel type, however not all file formats support all data types for reading and writing. In some cases, it may be necessary to add an itk::CastImageFilter<> to convert the output to a pixel format appropriate for the target file. It is important not to truncate the data by converting to a smaller type (ie. short -> char). In this case, the itk::RescaleIntensityImageFilter<> can be used before casting.

The following table lists the built-in file format support against each data type:

  • Analyze/NIFTI
char
unsigned char
short
unsigned short
int
unsigned int
long long (on 64-bit platforms)
unsigned long long (on 64-bit platforms)
float
double
RGB<unsigned char>
  • BMP (2D only)
unsigned char
RGB<unsigned char>
  • DICOM
float
char
unsigned char
short
unsigned short
RGB<char>
RGB<short>
  • GDCM
unsigned char
char
unsigned short
short
unsigned int
int
double
  • GE
???
  • GIPL
binary
char
unsigned char
short
unsigned short
int
unsigned int
float
double
surface
polygon
  • IPL
short
  • JPEG (2D only)
unsigned char
  • MetaImage (mhd): raw, compressed
char
unsigned char
short
unsigned short
long
ulong
int
unsigned int
long long (on 64-bit platforms)
unsigned long long (on 64-bit platforms)
float
double
vector<>
Also supports reading and writing 
  - itk's SpatialObjects (i.e., scenes containing ellipses, images, vessels, dti fiber tracks, etc)
  - Patient Meta Data (orientation, scan date, comments, modality, etc. - user extensible)
  - data stored in multiple files (e.g., a metaImage file could be a text file pointing to a series of
     2D images that are stacked to form the 3D metaImage).
Reference: http://www.itk.org/Wiki/MetaIO
  • Nrrd (.nhdr, .nrrd): raw or gzip compressed
signed char
unsigned char
short
unsigned short
int
unsigned int
long long (on 64-bit platforms)
unsigned long long (on 64-bit platforms)
float
double
vector<>
Also supports reading and writing
 - all the pixel types in ImageIOBase, including DIFFUSIONTENSOR3D
 - MetaData dictionary, via mapping to key/value pairs
 - data from multiple files, using MetaIO conventions

Getting Started with the NRRD Format

NRRD format definition

  • PNG (2D)
unsigned char
unsigned short
RGB
RGBA
  • SiemensVision
???
  • Stimulate
char
short
int
float
double
  • TIFF (2D only)
unsigned char
unsigned short
RGB
  • VTK
float
double
unsigned char
char
unsigned short
short
unsigned int
int
unsigned long long (on 64-bit platforms)
long long (on 64-bit platforms)
RGB

Importing other file format

Movies as 3D images

From the Insight-User Amadeus:

I work exclusively in Linux and one can use mplayer - the mother of all multimedia tools - to dump each frame in a movie clip. MPlayer understands just about any format under the sun and can use just about any codec as well. E.g. to dump each frame in an avi clip to a separate png image

mplayer -vo png movie.avi

To see to what other formats one can output the frames to,

mplayer -vo help

Then, the frames dumped by mplayer can be put together into a volume using ImageSeriesReadWrite in InsightToolkit-2.0.0/Examples/IO/.

Of course, in Linux and other unixes the shell understands wildcards, so with minor changes, it ImageSeriesReadWrite can be modified to work like this:

ImageSeriesReadWrite frame*.png output.mha # or e.g. output.mhd

The input frames need not have the names that the original ImageSeriesReadWrite expects.

Converting unsupported 2D images to an ITK supported format

ImageMagick supports conversion between over 90 (typically 2D) image formats as well as some basic image processing. Operates from the command line on PCs and on *nix machines.



ITK: [Welcome | Site Map]