| |
- builtins.object
-
- ANAIMG
- GpetviewProcess
- HDR
class ANAIMG(builtins.object) |
|
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_C = 32
TYPE_IMG_D = 64
TYPE_IMG_RGB = 128 |
|
Methods defined here:
- __init__(self, xdim=0, ydim=0, zdim=0, tdim=1, px=0.0, py=0.0, pz=0.0, type=2, view_cmd='matplot')
- Initialize self. See help(type(self)) for accurate signature.
- change_type(self, type)
- change type of image
- gpetview(self, zoom=1, width=750, height=550, color=0, timestamp='', seq='', title='', number=1, amax=0)
- view image by gpetview. You can use options zoom,width,height,color,seq,title,number. If you give amax, scale to max to amax
- 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, amax=0, slice_no=0)
- view iamge. slice_no for showing slice (matplot)
- 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
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class GpetviewProcess(builtins.object) |
| |
Methods defined here:
- __call__(self, img)
- Call self as a function.
- __init__(self, zoom=1, width=750, height=550, color=0, seq='', title='', number=1, timestamp=12345, amax=0)
- Initialize self. See help(type(self)) for accurate signature.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class HDR(builtins.object) |
| |
Methods defined here:
- __call__(self)
- Call self as a function.
- __init__(self, xdim=0, ydim=0, zdim=0, px=0.0, py=0.0, pz=0.0, tdim=1, datatype=2, bitpix=8)
- Initialize self. See help(type(self)) for accurate signature.
- 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
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
| |