Wednesday, February 13, 2008

How to display sagittal/coronal views in ImageJ?

http://rsbweb.nih.gov/ij/docs/menus/image.html

Reslice...

Reconstructs one or more orthogonal slices through the image volume
represented by the current stack. Before using this command, create a
straight line or rectangular selection to specify were the
reconstructions will be done. A dialog box allows you the specify the
Z-Spacing (displacement between slices) of the source volume. Multiple
slices are reconstructed and saved as a stack if you create a
rectangular selection or set Slice Width greater than one.

Images are created by sampling each slice in the stack along the line.
Thus, the first pixel in each row of the output image is taken from
the start of the line and the last from the end. In the case where
Slice Width is greater than one, a stack is created by shifting the
line down and to the left to generate additional slices for the output
stack.

This plugin, and the ZProject plugin, were contributed by Patrick
Kelly and Harvey Karten of the University of California, San Diego.

Why do Analyze format images appear upside down in ImageJ?

Most image formats (e.g. DICOM) describe data starting from the
top-left corner and move from the top of the image to the bottom (much
as English readers start at the top-left corner, reading each line
from left to right). On the other hand, SPM96/SPM99/FSL expect image
to be in RAS format (lines going from left to right, then posterior to
anterior and finally inferior to superior). ImageJ (and several other
programs) do not take this into account, so Analyze images appear
upside down.

Wednesday, June 27, 2007

XMedCon

Nolf E, "XMedCon - An open-source medical image conversion toolkit";
European Journal of Nuclear Medicine; Vol. 30 (suppl. 2); 2003; pp S246; TP39.

The supported formats are:

Acr/Nema 2.0, Analyze (SPM), Concorde/µPET, DICOM 3.0, CTI ECAT 6/7, NIfTI-1, InterFile3.3 and PNG or Gif87a/89a.

In addition, the program allows to read unsupported files without compression, to print pixel values or to extract/reorder/reslice study images. It is possible to export images as PNG or annimated GIF for desktop applications. Its library can be used as a framework.

完整的官方说明:http://xmedcon.sourceforge.net/Main/Documentation




一个论坛

http://brainmapping.ttsite.com/index.php

心心水滴的神圣殿堂:认知与脑成像研究


XMedCon

Xmedcon - Medical image conversion utility and library


XMedCon是一个医学图像转换工具和库

The Medical Image Conversion library consists of a library, a command line utility, and a GUI interface for converting and manipulating medical images. It can convert between commonly used formats in (freely available) research tools, while preserving medical parameters like patient information, slice orientation, voxel dimension and pixel quantitation. The program can also read unsupported files without compression, print pixel values, or extract/reorder specified images. The library can also be used as a framework for your own image format.

Web pagehttp://xmedcon.sourceforge.net/

Wednesday, June 20, 2007

在mac上安装amide

Mac OS X server 10.4.9 (PowerPC G5 Server)

按照amide的安装说明:

1. Downloaded Fink http://prdownloads.sourceforge.net/fink/Fink-0.8.1-PowerPC-Installer.dmg?download
2. Installed Fink by running the installer.
3. sudo pico /sw/etc/apt/sources.list Add the following lines to the end of the file:

# AMIDE
deb file:/sw/fink amide-10.3 main
deb http://www.stanford.edu/~loening/fink 10.3/current main

4. sudo pico /sw/etc/fink.conf To the Trees line add "amide-10.4/main", so the line reads as follows:
Trees: local/main stable/main stable/crypto amide-10.3/main 
5. Run "fink scanpackages".
6. Get new package information with "sudo apt-get update".
7. Install everything with "sudo apt-get install amide".
8. Now, start X11.app, go to the menu entry "Applications->Customize", and for the terminal entry, change the command from "xterm" to "xterm -ls". Also, edit the file /etc/X11/xinit/xinitrc (you can use "sudo pico /etc/X11/xinit/xinitrc" from the command prompt) and change the line that says "xterm &" to "xterm -ls &".
9. Restart the console/xterm, and run "amide". Note, the first time you run AMIDE, loading may take a long time as the pango library generates some font caching information. Subsequent loads will be much faster.

安装成功。

Tuesday, May 1, 2007

关于Analyze格式的一个详细说明

PDF文件本地下载:files/ANALYZE75.pdf


Header File

The header file is represented here as a `C' structure which describes the dimensions and history of the
pixel data. The header structure consists of three substructures:

• header_key describes the header
• image_dimension describes image sizes
• data_history optional

/* ANALYZETM Header File Format
*
* (c) Copyright, 1986-1995
* Biomedical Imaging Resource
* Mayo Foundation
*
* dbh.h
*
* databse sub-definitions
*/

struct header_key /* header key */
{ /* off + size */
int sizeof_hdr /* 0 + 4 */
char data_type[10]; /* 4 + 10 */
char db_name[18]; /* 14 + 18 */
int extents; /* 32 + 4 */
short int session_error; /* 36 + 2 */
char regular; /* 38 + 1 */
char hkey_un0; /* 39 + 1 */
}; /* total=40 bytes */
struct image_dimension
{ /* off + size */
short int dim[8]; /* 0 + 16 */
short int unused8; /* 16 + 2 */
short int unused9; /* 18 + 2 */
short int unused10; /* 20 + 2 */
short int unused11; /* 22 + 2 */
short int unused12; /* 24 + 2 */
short int unused13; /* 26 + 2 */
short int unused14; /* 28 + 2 */
short int datatype; /* 30 + 2 */
short int bitpix; /* 32 + 2 */
short int dim_un0; /* 34 + 2 */
float pixdim[8]; /* 36 + 32 */
/*
pixdim[] specifies the voxel dimensitons:
pixdim[1] - voxel width
pixdim[2] - voxel height
pixdim[3] - interslice distance
...etc
*/
float vox_offset; /* 68 + 4 */
float funused1; /* 72 + 4 */
float funused2; /* 76 + 4 */
float funused3; /* 80 + 4 */
float cal_max; /* 84 + 4 */
float cal_min; /* 88 + 4 */
float compressed; /* 92 + 4 */
float verified; /* 96 + 4 */
int glmax,glmin; /* 100 + 8 */
}; /* total=108 bytes */

struct data_history
{ /* off + size */
char descrip[80]; /* 0 + 80 */
char aux_file[24]; /* 80 + 24 */
char orient; /* 104 + 1 */
char originator[10]; /* 105 + 10 */
char generated[10]; /* 115 + 10 */
char scannum[10]; /* 125 + 10 */
char patient_id[10]; /* 135 + 10 */
char exp_date[10]; /* 145 + 10 */
char exp_time[10]; /* 155 + 10 */
char hist_un0[3]; /* 165 + 3 */
int views /* 168 + 4 */
int vols_added; /* 172 + 4 */
int start_field; /* 176 + 4 */
int field_skip; /* 180 + 4 */
int omax, omin; /* 184 + 8 */
int smax, smin; /* 192 + 8 */
};

struct dsr
{
struct header_key hk; /* 0 + 40 */
struct image_dimension dime; /* 40 + 108 */
struct data_history hist; /* 148 + 200 */
}; /* total= 348 bytes */

/* Acceptable values for datatype */

#define DT_NONE 0
#define DT_UNKNOWN 0
#define DT_BINARY 1
#define DT_UNSIGNED_CHAR 2
#define DT_SIGNED_SHORT 4
#define DT_SIGNED_INT 8
#define DT_FLOAT 16
#define DT_COMPLEX 32
#define DT_DOUBLE 64
#define DT_RGB 128
#define DT_ALL 255

typedef struct
{
float real;
float imag;
} COMPLEX;