Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 29.873.108 Times

Resampling volume or image with affine matrix 1.0

  Date Added: April 18, 2013  |  Visits: 189

Resampling volume or image with affine matrix

Report Broken Link
Printer Friendly Version


Product Homepage
Download (19 downloads)



3D Affine matrix is such a 4x4 matrix:M = [ [R T]; [0 0 0 1] ];[x2 y2 z2 1]d-deOao = M * [x1 y1 z1 1]d-deOao ;where, R is a 3x3 rotation matrix, and T is a 3x1 translation matrix. [x1 y1 z1] is a location in original 3D image volume, and [x2 y2 z2] is a location in transformed 3D image volume.Although affine geometric transformation is only limited to parallel projection, it applies to most of the common geometric transformations, including rotation, translation, scaling, reflection, shearing, etc. Some of the common 3D Affine matrices are listed at the bottom of this description.It may seem easy if you just want to apply the 3D affine matrix to each [x y z] coordinates in the 3D image volume. However, it turns out to be more complicated when you realize that the voxel (smallest element of 3D image volume) in the transformed image may no longer be an orthogonal cube. Therefore, a 3D interpolation algorithms must also be included to transform 3D image volume. I have implemented three interpolation methods in this program.Usage: [new_img new_M] = affine(old_img, old_M, [new_elem_size], [verbose], [bg], [method]);old_img - original 2D image or 3D volume. We assume x for the 1st dimension, y for the 2nd dimension, and z for the 3rd dimension.old_M - a 3x3 2D affine matrix for 2D image, or a 4x4 3D affine matrix for 3D volume. We assume x for the 1st dimension, y for the 2nd dimension, and z for the 3rd dimension.new_elem_size (optional) - size of voxel along x y z direction for a transformed 3D volume, or size of pixel along x y for a transformed 2D image. We assume x for the 1st dimension y for the 2nd dimension, and z for the 3rd dimension. 'new_elem_size' is 1 if it is default or empty.verbose (optional) - 1, 0 1: show transforming progress in percentage 2: progress will not be displayed 'verbose' is 1 if it is default or empty.bg (optional) - background voxel intensity in any extra corner that is caused by 3D interpolation. 0 in most cases. 'bg' will be the average of two corner voxel intensities in original image volume, if it is default or empty.method (optional) - 1, 2, or 3 1: for Trilinear interpolation 2: for Nearest Neighbor interpolation 3: for Fischer's Bresenham interpolation 'method' is 1 if it is default or empty.I suggest that you should use Method 1 (Trilinear) unless you have good reasons to choose other methods. Method 2 (Nearest Neighbor) is slightly faster, but will bring larger interpolation error. The Method 3 (Fischer's Bresenham) is only an implementation to test the special algorithm, and you also need to download my 3D Bresenham's line generation program from:http://www.mathworks.com/matlabcentral/fil...?objectId=21057new_img - transformed 3D image volumenew_M - transformed affine matrixThis program is inspired by:SPM5 Software from Wellcome Trust Centre for Neuroimaginghttp://www.fil.ion.ucl.ac.uk/spm/softwareFischer, J., A. del Rio (2004). A Fast Method for Applying Rigid Transformations to Volume Data, WSCG2004 Conference.http://wscg.zcu.cz/wscg2004/Papers_2004_Short/M19.pdfAlthough this program (affine3d.m) can also run on MATLAB earlier than version 6.5 (R13), the speed will be hundred times slower. So I suggest that you run this program on MATLAB version 6.5 (R13) and above.The following script is a demo to show you how to use this program. The result is displayed in the above image.Example 1 (3D rotation):load mri.mat; old_img = double(squeeze(D));old_M = [0.88 0.5 3 -90; -0.5 0.88 3 -126; 0 0 2 -72; 0 0 0 1];new_img = affine(old_img, old_M, 2);[x y z] = meshgrid(1:128,1:128,1:27);sz = size(new_img);[x1 y1 z1] = meshgrid(1:sz(2),1:sz(1),1:sz(3));figure; slice(x, y, z, old_img, 64, 64, 13.5);shading flat; colormap(map); view(-66, 66);figure; slice(x1, y1, z1, new_img, sz(1)/2, sz(2)/2, sz(3)/2);shading flat; colormap(map); view(-66, 66);Example 2 (2D interpolation):load mri.mat; old_img=D(:,:,1,13)';old_M = [1 0 0; 0 1 0; 0 0 1];new_img = affine(old_img, old_M, [.2 .4]);figure; image(old_img); colormap(map);figure; image(new_img); colormap(map);Appendix: Common 3D Affine matrices:Translation (displacement of [dX dY dZ] for all voxels):old_M = [ 1 0 0 dX 0 1 0 dY 0 0 1 dZ 0 0 0 1 ];Rotation (about X axis):old_M = [ 1 0 0 0 0 cosX -sinX 0 0 sinX cosX 0 0 0 0 1 ];Scaling:old_M = [ sX 0 0 0 0 sY 0 0 0 0 sZ 0 0 0 0 1 ];

Requirements: No special requirements
Platforms: Matlab
Keyword: Algorithm Bresenham Download Error Generation Implementation Inspired Larger Software Special
Users rating: 0/10

License: Shareware Size: 10 KB
USER REVIEWS
More Reviews or Write Review


RESAMPLING VOLUME OR IMAGE WITH AFFINE MATRIX RELATED
Libraries  -  Algorithm::SkipList 1.02
Algorithm::SkipList is a Perl implementation of skip lists. SYNOPSIS my $list = new Algorithm::SkipList(); $list->insert( key1, value ); $list->insert( key2, another value ); $value = $list->find(key2); $list->delete(key1); This is an...
30.72 KB  
Libraries  -  Algorithm::AhoCorasick::SearchMachine 0.01
Algorithm::AhoCorasick::SearchMachine provides an implementation and low-level interface of Algorithm::AhoCorasick. Feeds input to the state machine. First (after the instance) argument of this method is the input text (which can be empty, in...
5.12 KB  
Audio Tools  -  Opus+ For Linux 1.0
Opus+ is free music software that creates novel musical compositions using an algorithm called 'Constrained Random Generation' (CRG). Outputs a LilyPond file, a PDF file of the musical score, and an audio performance in a MIDI file.
19.87 MB  
Music  -  SKY MUSIC (Free) 3.5.0.0
V3.5 => Ringtone download error fix V3.4 => various bug fixes V3.1 => now with skydrive support Your favorite music manager & downloader just got better and easier. Now browse the entire zune catalog and search for ringtones and mp3 with...
2 MB  
Science  -  Java Textual Desktop 1.0
'Java Textual Desktop' project stands for the classical TEXT screen with java implementation inspired with Curcus which used for decades in the history of UNIX (linux).
98.29 KB  
Audio Tools  -  Opus+ 1.0
Opus+ is free music software that creates novel musical compositions using an algorithm called 'Constrained Random Generation' (CRG). Outputs a LilyPond file, a PDF file of the musical score, and an audio performance in a MIDI file.
19.87 MB  
File Restoration  -  Restorer Ultimate 7.5
Restorer Ultimate represents a new generation of data recovery software to replace the well-known, award-winning Restorer2000. It’s a simple and reliable "do-it-yourself" file recovery solution that turns any computer into a powerful data...
14.99 MB  
Multi-Purpose Audio Players  -  DVD to Download 1.0.0.17
DVD to Download is very easy to use software to manage your iPod Device (Any Type), You will not need any other software. With this program, you can Add, Edit, Delete Audio/Video Tracks to your iPod; Also you can copy tracks from iPod to your...
5.89 MB  
Inventory Systems  -  Barcode Download for Medical Equipments 7.3.0.1
Barcode Download for Medical Equipments is distinctive software to create barcode labels for organize company?s product record or company?s documents in easiest and professional way by your stand alone computer systems. Barcode Download for...
4.88 MB  
Inventory Systems  -  Barcode Creator 5.1.3.2
Barcode Image Creator to print bar codes tag with valuable data implementation. Bar coding software can makes thousands of bar images with dynamics data which represent at specific goods also tag sticks contain messages and price of goods. Bar...
2.91 MB  
NEW DOWNLOADS IN SCRIPTS, MULTIMEDIA
Scripts  -  Freelancer Script 5.05
Main Features: 100% Secured. Email Support (3 Years). FREE Updates (3 Years). Post projects. Featured projects. Private projects. Sealed projects. Edit/delete projects. Select freelancers....
5.49 MB  
Scripts  -  B2B Script 4.20
Main Features: 100% Secured. Email Support (3 Years). FREE Updates (3 Years). Sign-up Account (Registration of account). Lead generation tools (for the sellers). Email verification to...
5.49 MB  
Scripts  -  B2C Script 5.06
Main Features: 100% Secured. Email Support (3 Years). FREE Updates (3 Years). The script comes with totally editable site colors, icons and graphics Multilevel categories allows extensive browsing Admin can change Category ordering or...
5.49 MB  
Scripts  -  Social Networking Script 2.86
Main Features: 100% Secured. Email Support (3 Years). FREE Updates (3 Years). Registration with name, email, password, date of birth etc. User can add multiple school, college, university with start...
5.49 MB  
Scripts  -  Business Networking Script 8.04
Main Features: 100% Secured. Email Support (3 Years). FREE Updates (3 Years). Ajax based interface. Profile creation. Different types of profile. Profile for jobseekers, employers and employed...
5.49 MB  
Multimedia  -  RMCA Realtime MIDI Chord Arranger Pro 4.2.8.0
RMCA Pro is an auto-accompaniment software which offers all major features of a high quality MIDI keyboard. It comes with chord recognition, based auto arranger, style creator, LeadSheet editor, recording section, up to 16 fingered and 10...
1.53 MB  
Multimedia  -  Spectrum Analyzer pro 2015
This sophisticated piece of software turns your computer into a modern, State-of-The-Art spectrum analyzer giving you features that go far beyond the possibilities of any stand-alone hardware unit -VST Plugin support-Leq (m) movie calculator Leq...
22.61 MB  
Multimedia  -  Multi Level Meter Bridge 2015
PAS Multi Meter Bridge can be configured in a number of different ways, to accurately model the ballistics, responses and graphics of a wide range of standard peak programme meters. These meters currently include the following:IEC 268-10 Type I...
5.22 MB  
Multimedia  -  DTMF Tone Decoder 2015
Why use an audio spectrum analyzer? For those of you that have done video installations, would you install a camera and lens without a monitor to see what you are doing? Why would you do an audio installation without seeing what you are doing? The...
4.09 MB  
Multimedia  -  Frequency Generator 2014
NEW in this version Oscilloscope srcoller and accelerator Efects like Peak and Splitt Oscilloscope kinds like Con. Lines, Dots, Mir Lines, Spikes, Vert. Lines Analyse the real time input in the Oscilloscope Now you can record the generated Tones...
2.01 MB