Script for linking files with paths in 2 text files
I have 2 txt files, 1.txt and 2.txt which contain the paths to files that need to be linked.
Example 1.txt:
Example 2.txt:
Each line represents images from one subject, so i need to make a link to image4.nii.gz called image5_done.nii.gz (same name as image5, but with _done at the end). Links should be made in the same directory for each subject. I'm very new to scripting and this is something I've been unsuccessfully struggling with for a while. Help is much appreciated.
Last edited by Scrutinizer; 03-06-2014 at 08:42 AM..
Reason: code tags
Hi mates,
I am trying to copile and link to C programs with command:
cc file1,file2
but i raises the error "file not found" ... am i doing the right way?
any suggestion will be appreciated.
thanks
abdul (4 Replies)
hi,
This is the first time I work in a big C project. All source code files are located in say directory /source/pp and all header files are in /include/pp. I've created a link to both of these directories from my home dir, say /home/ss. So in the /home/ss dir I have the /source/pp and /include/pp... (1 Reply)
Hello,
Can anyone tell me how I can make a file link or shortcut in UNIX 4.0, several
file links where damaged during an outage examples below.
Examples: file -> file
libX11.so -> /usr/shlib/libX11.so.pre.O3D
All of the file links that were damaged were in /shlib and point to... (3 Replies)
Dear friends,
First off all , let me apologize for my inexperience. I am just starting use of Linux and gcc .
Actually I ve some .c files in the present directory , and now I am
giving
+vc <my_file1.c> <my.file2.c> <myfile3.c>.
All the c files are in present directory.... (2 Replies)
hi guys
does anyone know how to display the file paths of the files stored within a directory at the command terminal?
e.g. if i have a directory called "home", how do i display the file paths of the files inside the directory?
cheers (2 Replies)
I have 100+ python files in a single directory. I need to replace a specific path occurrence with a variable name.
Following are the find and the replace strings:
Findstring--"projects\\Debugger\\debugger_dp8051_01\\debugger_dp8051_01.cywrk"
Replacestring--self.projpath
I tried... (5 Replies)
Hello ,
I want to write a script to test the IP_add is hardcoded in the paticular files.
the files are available in path .
for example.
/abs/abn/jkg/frames.sh. like this some files are there in the same path.I
manually replaced the IP_ADD with domain name in required files.now i have to... (1 Reply)
Hi ,
I am a newbie!!!
I want to develop a script for deleting files older than x days from multiple paths. Now I could reach upto this piece of code which deletes files older than x days from a particular path. How do I enhance it to have an input from a .txt file or a .dat file? For eg:... (12 Replies)
Hi All,
I have a 2 path, one with oldfile path in which has several sub folders,each sub folders contains a config file(basically text file), likewise there will be another newfile path which will have sub folders, each sub folders contains a config file.
Need to read files from oldfile... (6 Replies)
Basically my problem is that when I try to compile anything using ./configure && make, it fails because of linker errors. I can reproduce the behavior I'm getting as follows:
I have the two following files
main.c:
#include <stdio.h>
extern void func(void);
int
main(int argc, char... (5 Replies)
Discussion started by: MarshallBanana
5 Replies
LEARN ABOUT DEBIAN
warpimagemultitransform
WARPIMAGEMULTITRANSFORM(1) User Commands WARPIMAGEMULTITRANSFORM(1)NAME
WarpImageMultiTransform - part of ANTS registration suite
DESCRIPTION
Usage:
./WarpImageMultiTransform ImageDimension moving_image output_image -R reference_image --use-NN SeriesOfTransformations--(See Below)
SeriesOfTransformations --- ./WarpImageMultiTransform can apply, via concatenation, an unlimited number of transformations to your
data . Thus, SeriesOfTransformations may be an Affine transform followed by a warp another affine and then another warp.
Inverse affine transformations are invoked by calling
-i MyAffine.txt
InverseWarps are invoked by passing the InverseWarp.nii.gz
filename (see below for a note about this).
Example 1: Mapping a warped image into the reference_image domain by applying abcdWarpxvec.nii.gz/abcdWarpyvec.nii.gz/abcd-
Warpzvec.nii.gz and then abcdAffine.txt
./WarpImageMultiTransform 3 moving_image output_image -R reference_image abcdWarp.nii.gz abcdAffine.txt
Example 2: To map the fixed/reference_image warped into the moving_image domain by applying the inversion of abcdAffine.txt and then
abcdInverseWarpxvec.nii.gz/abcdInverseWarpyvec.nii.gz/abcdInverseWarpzvec.nii.gz .
./WarpImageMultiTransform 3 reference_image output_image -R moving_image -i abcdAffine.txt abcdInverseWarp.nii.gz
Note that the inverse maps (Ex. 2) are passed to this program in the reverse order of the forward maps (Ex. 1).
This makes sense, geometrically ... see ANTS.pdf for visualization of this syntax.
Compulsory arguments:
ImageDimension: 2 or 3 (for 2 or 3 Dimensional registration)
moving_image: the image to apply the transformation to
output_image: the resulting image
Optional arguments:
-R: reference_image space that you wish to warp INTO.
--tightest-bounding-box: Computes the tightest bounding box using all the affine transformations. It will be overrided by -R refer-
ence_image if given. --reslice-by-header: equivalient to -i -mh, or -fh -i -mh if used together with -R. It uses the orientation
matrix and origin encoded in the image file header. It can be used together with -R. This is typically not used together with any
other transforms.
--use-NN: Use Nearest Neighbor Interpolation.
--use-BSpline: Use 3rd order B-Spline Interpolation.
-i: will use the inversion of the following affine transform.
Other Example Usages: Reslice the image: WarpImageMultiTransform 3 Imov.nii.gz Iout.nii.gz --tightest-bounding-box
--reslice-by-header Reslice the image to a reference image: WarpImageMultiTransform 3 Imov.nii.gz Iout.nii.gz -R Iref.nii.gz
--tightest-bounding-box --reslice-by-header
Important Notes: Prefixname "abcd" without any extension will use ".nii.gz" by default The abcdWarp and abcdInverseWarp do not
exist. They are formed on the basis of abcd(Inverse)Warpxvec/yvec/zvec.nii.gz when calling ./WarpImageMultiTransform, yet you have
to use them as if they exist.
WarpImageMultiTransform 1.9 May 2012 WARPIMAGEMULTITRANSFORM(1)