Duke-UNC Brain Imaging and Analysis Center
BIAC Forums | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Support Forums
 Analysis Software Support
 bputil image naming

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Klein1 Posted - Sep 06 2005 : 1:33:10 PM
When I've run the coregistration and normalization step together, the bhx files are name sncra while the image files are still named snra. SPM doesn't like this. Is anyone else having this problem, or is there a scrip out there to rename the snra image files sncra?
6   L A T E S T    R E P L I E S    (Newest First)
charles.michelich Posted - Sep 09 2005 : 10:59:07 PM
The renaming program that I used is "1-4 Rename". You can download it from http://www.1-4a.com/rename/ or use the version installed on Gall (\\Gall\Programs\Tools\renamer.exe).

It was designed for renaming MP3 files, but worked well for renaming images and such when I used it.

Chuck
josh.bizzell Posted - Sep 08 2005 : 10:04:48 AM
Is there any reason you can't just change the directory name?

If not, then the following sample code shows how to change the directory names from sncrarun* to snrarun* in Matlab. (It could also be edited slightly to change file names as well):


fpath = '\\Server\Study.01\Data\Func\49999';
fspec = 'sncra';
replspec = 'snra';

d = dir(fullfile(fpath,[fspec,'*']));
if ~isempty(d)
  for i = 1:length(d)
    if d(i).isdir
      movefile(d(i).name,[replspec,d(i).name(length(fspec)+1:end)]);
    end
  end
end

-Josh
ckim Posted - Sep 08 2005 : 09:40:19 AM
I suggest using CodeWright since you can open up all the .BXH files at once and do a global search and replace to change the filenames.
syam.gadde Posted - Sep 08 2005 : 09:38:03 AM
The following script can be used to rename snra files to sncra.


#!/bin/sh

for oldname in "$@" ; do
  newname=`echo "$oldname" | sed 's/\(.*\)snra/\1sncra/'`
  if [ "$oldname" != "$newname" ] ; then
    mv $oldname $newname
  fi
done


Save the above to a file, for example "snra_rename.sh". Run it like this:

sh snra_rename.sh snra*


The argument snra* selects all files starting with snra. You will have to change the filenames in the .bxh file too using an editor.
scott.huettel Posted - Sep 08 2005 : 08:53:41 AM
The issue is that we have SPM-batching scripts that expect that the file name and file directory are named similarly. (The former is snra and the latter is sncra). If there is a simple way to rename the files en masse, then it would let us continue with the analyses while we rewrite the scripts to make them more general. At one point, Chuck had identified a freeware (I think) tool for renaming, and I assume that there is a quick way to write such a tool in matlab.
syam.gadde Posted - Sep 06 2005 : 1:39:09 PM
This has been the case for as long as I remember. I don't know why. SPM will not read the .bxh file, so I assume you are trying to read snra* files into SPM. What does SPM not like about the missing 'c'?

BIAC Forums © 2000-2010 Brain Imaging and Analysis Center Go To Top Of Page
This page was generated in 0.34 seconds. Snitz Forums 2000