Skip to content

AFNI/NIfTI Server

Sections
Personal tools
You are here: Home » AFNI » Documentation

Doxygen Source Code Documentation


Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Search  

vp_warp.c File Reference

#include "vp_global.h"

Go to the source code of this file.


Functions

void OrderCoords ANSI_ARGS ((double coords[4][2], double lft[3][2], double rgt[3][2]))
void VPComputeWarpTables ()
void VPAffineImageOverlap (in_width, in_height, out_width, out_height, warp_matrix, filter_width, full_overlap, part_overlap) int in_width

Variables

float VPBilirpWeight [WARP_WEIGHT_ENTRIES][WARP_WEIGHT_ENTRIES][4]
int BilirpWeightsReady = 0
void in_height
int out_width
int out_height
vpMatrix3 warp_matrix
double filter_width
Trapezoid full_overlap [9]
Trapezoid part_overlap [9]
double lft [3][2]
double rgt [3][2]

Function Documentation

void OrderCoords ANSI_ARGS (double coords[4][2], double lft[3][2], double rgt[3][2])    [static]
 

void VPAffineImageOverlap in_width   ,
in_height   ,
out_width   ,
out_height   ,
warp_matrix   ,
filter_width   ,
full_overlap   ,
part_overlap   
 

void VPComputeWarpTables  
 

Definition at line 47 of file vp_warp.c.

References BilirpWeightsReady, VPBilirpWeight, and WARP_WEIGHT_ENTRIES.

00048 {
00049     float *wptr;        /* pointer into weight table */
00050 
00051     int x, y;
00052     double in_x, in_y;
00053 
00054     if (BilirpWeightsReady)
00055         return;
00056 
00057 #ifdef MEMSPY
00058     bin_init(BinNumber(__LINE__, __FILE__, "VPBilirpWeight"), -1, -1,
00059              VPBilirpWeight, sizeof(VPBilirpWeight), "VPBilirpWeight");
00060 #endif
00061 
00062     wptr = &VPBilirpWeight[0][0][0];
00063     for (y = 0; y < WARP_WEIGHT_ENTRIES; y++) {
00064         in_y = (double)y / (WARP_WEIGHT_ENTRIES-1);
00065         for (x = 0; x < WARP_WEIGHT_ENTRIES; x++) {
00066             in_x = (double)x / (WARP_WEIGHT_ENTRIES-1);
00067             *wptr++ = (1. - in_x)*(1. - in_y);
00068             *wptr++ = in_x * (1. - in_y);
00069             *wptr++ = (1. - in_x) * in_y;
00070             *wptr++ = 1. - wptr[-1] - wptr[-2] - wptr[-3];
00071         }
00072     }
00073 
00074     BilirpWeightsReady = 1;
00075 }

Variable Documentation

int BilirpWeightsReady = 0 [static]
 

Definition at line 35 of file vp_warp.c.

Referenced by VPComputeWarpTables().

double filter_width
 

Definition at line 100 of file vp_warp.c.

Trapezoid full_overlap[9]
 

Definition at line 102 of file vp_warp.c.

void in_height
 

Definition at line 96 of file vp_warp.c.

double lft[3][2]
 

Definition at line 321 of file vp_warp.c.

int out_height
 

Definition at line 97 of file vp_warp.c.

int out_width
 

Definition at line 97 of file vp_warp.c.

Trapezoid part_overlap[9]
 

Definition at line 104 of file vp_warp.c.

double rgt[3][2]
 

Definition at line 322 of file vp_warp.c.

float VPBilirpWeight[WARP_WEIGHT_ENTRIES][WARP_WEIGHT_ENTRIES][4]
 

Definition at line 34 of file vp_warp.c.

Referenced by VPComputeWarpTables().

vpMatrix3 warp_matrix
 

Definition at line 98 of file vp_warp.c.

 

Powered by Plone

This site conforms to the following standards: