-
Notifications
You must be signed in to change notification settings - Fork 3
/
TODO
171 lines (104 loc) · 6.41 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
Hi Jonathan
I hope that you are doing well.
FYI, I just wanted to let you know about something I came across while using AnalyzeFMRI. When I read in a dataset and then
immediately wrote it back out one of the indices was reversed. That is, you get a reflection in the image in the 2nd dimension when you perform the following:
datasethdr <- f.read.analyze.header("dataset.hdr")
dataset <- f.read.analyze.volume("dataset.img")
f.write.analyze(dataset,"dataset",size="float",pixdim=datasethdr$pixdim[2:5])
I should add that this was for a trivially 4D dataset. i.e. a 64x60x16x1 array.
I hope this is useful.
Cheers
John Kornak,PhD
Director of the Department of Radiology Biostatistics Consulting Service
Assistant Professor in Residence
Departments of Radiology, and Epidemiology & Biostatistics
University of California, San Francisco
Box 0946
San Francisco, CA 94143
Tel: (415) 353-4740
fax: (415) 353-9423
Email: john.kornak@ucsf.edu
Rajouter le prog pour faire l'ICA spat./tempo.
avec fastICA, JADE, etc ... et en utilisant tcltk
Rajouter au prog f.read.nifti.header la lecture/ecriture du champs extension (juste après le magic field)
qui contient 4 octets (voir HEADER EXTENSIONS dans le fichier nifti1.h)
Softs intéressants:
http://www.idoimaging.com/
dicom2
MRIConvert et mcverter
dcm2nii (MRIcron)
dinifti
convert2nii (dans Mango ... à voir pour le faire fonctionner ... probleme)
./dicom2 -t1 /home/lafaye/IM-0006-2520.dcm |less
# permet de visualiser les champs DICOM
./mcverter --output="." -f nifti -n -d run2/*
# permet de convertir des DICOM en NIFTI
/usr/local/neuro/mricron/dcm2nii IM-0006-2520.dcm
# permet de convertir des DICOM en NIFTI
./dinifti.linux -f 'n1' -d -v run2/ test
# permet de convertir des DICOM en NIFTI
Il est parfois difficile dans certaines fenêtres (par exemple celle générée par icast.fmri.gui() ) de savoir à quoi servent les différents champs
et qu'est-ce qu'il faut y remplir. Ce serait donc bien de rajouter à côté de chaque champ un petit bouton contenant le caractère "?".
En cliquant sur ce bouton, une fenêtre pop-up d'aide donnerait des explications au User.
Code R pouvant servir pour faire cela:
require(tcltk)
tt <- tktoplevel()
help.but <- tkbutton(tt, text = "?", command = function() tkdestroy(tt)) # Create a button widget
tkgrid(help.but) # And place it on 'tt'
# Create the popup menu, and its associated R function
copyText <- function()
.Tcl(paste("event", "generate", .Tcl.args(.Tk.ID(help.but), "<<Copy>>")))
editPopupMenu <- tkmenu(help.but, tearoff = FALSE)
tkadd(editPopupMenu, "command", label = "Petit message d\'aide", command = copyText)
# The function that displays the popup menu at the right place
LeftClick <- function(x, y) { # x and y are the mouse coordinates
rootx <- as.integer(tkwinfo("rootx", help.but)) # tkwinfo() return several infos
rooty <- as.integer(tkwinfo("rooty", help.but))
xTxt <- as.integer(x) + rootx
yTxt <- as.integer(y) + rooty
# Create a Tcl command in a character string and run it
.Tcl(paste("tk_popup", .Tcl.args(editPopupMenu, xTxt, yTxt)))
}
tkbind(help.but, "<Button-1>", LeftClick)
tkfocus(tt)
Faire en sorte que le package ne dépende plus de fastICA. Pour cela, rajouter mes propres routines ICA directement dans le package
dieter.menne@menne-biomed.de :
Thanks, Pierre, works for me. Not checked in details, though.
Maybe you could correct for the warning in the default sample, which should
be not much work:
Warning message:
In rawToChar(magic) : truncating string with embedded nul: 'n+1\0'
Dieter
dr de Micheaux,
I have a suggestion for a feature that you may possibly want to introuce in a future release of AnalyzeFMRI.
It is about f.read.analyze.slice.at.all.timepoints. It could be interesting for users to be able to extract the slices also in coronal and in sagittal orientation. The utility of the function resides in the nice management of memory, and it is a bit sad that it is only available along the axial plane.
Thanks for your attention,
luca nanetti
Lire les fichiers .nii.gz
Interet du package adimpro?
Utiliser le package multicore?
Voir la fonction grid.raster(). Elle pourrait etre meilleure (plus rapide?) que image().
When using automatic choice of the number of ICA components it would be preferable to keep
the generated diagnostic plots open.
Aussi, il faudrait afficher les vues de l'image sans déformation en x
y z dans plot.volume.gui().
Il y a un bug lorsqu'on essaye de lire des fichiers avec un ~ dedans (comme "~/dir/myfile.nii", ou encore "./dir/myfile.nii")
##########################################################
Dear Lafaye,
I'm writing to let you know, if you weren't already aware, that AnalyzefMRI fails for images that are larger that 2GB. I am working with the Human Connectome Data that has 4D files with 1200 time points. We had the strange behavior that f.read.nifti.nifti.tpt worked fine for early images but then would fail for later images. Through a systematic search we found that the last readable image was just under the 2*1024^3 location in the file. (I"m sorry I don't have the exact error message... it was on my student's computer... I'll try to find it).
Of course unsigned int's have a max value of 2147483647 and some sort of fseek64 or large file support is needed for such files.
Sorry if this has been reported before... but I find the f.read.nifti.nifti.tpt function immensely useful and haven't found a similar functionality in ORO or anything else.
-Tom
__________________________________________________________
Thomas Nichols, PhD
Professor, Head of Neuroimaging Statistics
Department of Statistics & Warwick Manufacturing Group
University of Warwick, Coventry CV4 7AL, United Kingdom
Web: http://warwick.ac.uk/tenichols
Email: t.e.nichols@warwick.ac.uk
- --------------------------------------------
Dear Mr Lafaye de Micheaux,
I often use your package AnalyzeFMRI, which I find very helpful. However, I do not understand why the function f.read.nifti.volume often returns wrapped images. I have a few examples I could provide you with, but before I send them to you I was thinking that maybe you know the answer. These are 4D .nii fMRI scans, where everything is fine when checking the scan in FSLview or MRIcron. The wrapping after using f.read.nifti.volume splits the scan e.g. in two halves (wraps half of the scan).
I am sorry to bother you! I hope you will find a moment to write an answer.
Best regards,
Wiktor Olszowy <wo222@cam.ac.uk>