FARSIGHT Tutorials/Quick Start
From FarsightWiki
(Difference between revisions)
LuisIbanez (Talk | contribs) (→Details) |
LuisIbanez (Talk | contribs) (→Part I: Reading an image from a file) |
||
Line 7: | Line 7: | ||
= Part I: Reading an image from a file = | = Part I: Reading an image from a file = | ||
+ | |||
+ | ITK requires users to be aware of the pixel type and dimension used by the images. | ||
+ | |||
+ | Typical pixel types and dimensions may be | ||
+ | |||
+ | {| border="1" | ||
+ | |- bgcolor="#abcdef" | ||
+ | ! Image Type !! Pixel Type !! Dimension !! pixel depth | ||
+ | |- | ||
+ | | IUC2 || unsigned char || 2 || 8 bits per pixel | ||
+ | |- | ||
+ | | IUC3 || unsigned char || 3 || 8 bits per pixel | ||
+ | |- | ||
+ | | IUS2 || unsigned short || 2 || 16 bits per pixel | ||
+ | |- | ||
+ | | IUS3 || unsigned short || 3 || 16 bits per pixel | ||
+ | |} | ||
+ | |||
+ | For the purpose of this tutorial session we will focus on using only two-dimensional images of 8bits per pixel | ||
+ | |||
+ | |||
+ | reader = itk.ImageFileReader.IUC2.New(FileName="/home/ibanez/src/Insight/Testing/Data/Input/CellsFluorescence1.png") | ||
+ | >>> image = reader.GetOutput() | ||
+ | >>> itk.show(image) | ||
= Part II: Writing an image to a file = | = Part II: Writing an image to a file = |
Revision as of 18:11, 30 April 2009
Contents |
Details
- Goal: This tutorial is intended to show you how to use FARSIGHT basic operations
- Duration: 30 minutes
- Requisites: Basic familiarity with Python commands
- Materials: FARSIGHT Installed
Part I: Reading an image from a file
ITK requires users to be aware of the pixel type and dimension used by the images.
Typical pixel types and dimensions may be
Image Type | Pixel Type | Dimension | pixel depth |
---|---|---|---|
IUC2 | unsigned char | 2 | 8 bits per pixel |
IUC3 | unsigned char | 3 | 8 bits per pixel |
IUS2 | unsigned short | 2 | 16 bits per pixel |
IUS3 | unsigned short | 3 | 16 bits per pixel |
For the purpose of this tutorial session we will focus on using only two-dimensional images of 8bits per pixel
reader = itk.ImageFileReader.IUC2.New(FileName="/home/ibanez/src/Insight/Testing/Data/Input/CellsFluorescence1.png")
>>> image = reader.GetOutput()
>>> itk.show(image)