| | |
- ANAIMG
- GpetviewProcess
- HDR
class ANAIMG |
| |
Class for manipulating Analyze image
read() - Read Analyze image
read_raw() - Read Raw image
write() - Write Analyze image
view() - view image by gpetview
match_hdr() - match type and size of image in header
match_type() - match type of image in header
match_size() - match size of image in header
max() - print max value of image
min() - print min value of image
scale() - scale image
transform() - transform image using Affine matrix (4x4)
zoom() - zooming image
rotate_x() - rotate image along x axis
rotate_y() - rotate image along y axis
rotate_z() - rotate image along z axis
hdr() - copy header
show_hdr() - show header
zeros() - prepare matrix according to header infomation
TYPE_IMG_B =2
TYPE_IMG_S = 4
TYPE_IMG_I = 8
TYPE_IMG_F = 16
TYPE_IMG_D = 64 |
| |
Methods defined here:
- __init__(self, xdim=0, ydim=0, zdim=0, tdim=1, type=2)
- match_hdr(self)
- adjust header type and size to image
- match_size(self)
- adjust header size
- match_type(self)
- adjust header type
- max(self)
- show max value of image
- min(self)
- show min value of image
- read(self, fname)
- read image data from fname
- read_raw(self, fd)
- read raw data from file description fd
- rotate_x(self, deg, origin_y, origin_z)
- rotate image along x axis. Give origin_y and origin_z in mm
- rotate_y(self, deg, origin_x, origin_z)
- rotate image along y axis. Give origin_x and origin_z
- rotate_z(self, deg, origin_x, origin_y)
- rotate image along z axis. Give origin_x and origin_y
- scale(self)
- scaling image with hdr.funused1 and convert to float image
- show_hdr(self)
- Show Header of Image
- transform(self, transmat)
- transform image using Affine matrix (4x4)
- view(self, zoom=1, width=750, height=550, color=0, timestamp='', seq='', title='', number=1)
- view image by gpetview. You can use options zoom,width,height,color,seq,title,number
- write(self, fname, type=None, swap=None)
- write Analyze image into a file fname
- zeros(self)
- prepare array of zeros according to header
- zoom(self, zoom_factor, xzoom_factor=1, yzoom_factor=1, zzoom_factor=1, center_x=0, center_y=0, center_z=0)
- zooming image with center of (center_x,center_y,center_z). Default center is (0,0,0)
if you want to zoom particular direction, you rather give xzoom_factor,yzoom_factor,zzoom_factor
|
class HDR |
| | |
Methods defined here:
- __call__(self)
- __init__(self, xdim=0, ydim=0, zdim=0, tdim=1, datatype=2, bitpix=8)
- fd_write(self, fd)
- write header into file descriptor fd
- read(self, fname)
- read header structure from a file
- show(self)
- show header
- write(self, fname)
- write header structure into a file
| |