The function initializes a list with values that corresponds to a header of a ".pet" or a ".fif" file. The file structures of these formats are explicitly described in the functions readData
and writeData
of this package.
iniPetFifList(listType = "pet", data = NULL, imType = "normal")
Can be chosen between "pet"
and "fif"
. Default is listType = "pet"
to generate a default header for ".pet"-files. Choose listType = "fif"
to generate a default header for ".fif"-files.
Using data
, it is possible to consign the matrix corresponding to the list and to generate the parameters SignalDim
, XYmin
, DeltaXY
and SignalMinMax
with default values. Otherwise, if data = NULL
these values will be set to NULL
and you will have to specify these values.
(character) imType
specifies the type of image and thus the default values of the list. Default is imType="normal"
. It is also implemented imType="radon"
, i.e. that the image is a sinogram (radon transformed image).
Returns a list with above structure.
Set listType="pet"
to generate a list with the following structure. It is assumed that data
is a matrix and not equal to NULL
.
Description | Contains a short description of the image. The maximal number |
of characters has to be 80. Defaults to Description="}\eqn{\backslash 0}{\0}\code{" . |
|
SignalDim | Contains the number of rows and columns of the matrix. |
Defaults to SignalDim=dim(data) . |
|
XYmin | Leftmost coordinate and lowest coordinate in the original |
image. If imType="normal" then defaults to XYmin= |
|
-0.5*(dim(data)-1) or if imType="radon" then |
|
defaults to XYmin=c(0, -0.5*(ncol(data)-1)) . |
|
DeltaXY | Quantization steps in the original image in \(x\) and \(y\) direction. |
If imType="normal" then defaults to DeltaXY=c(1,1) |
|
or if imType="radon" then defaults to DeltaXY= |
|
c(pi/(nrow(data)),1) . |
Set listType="fif"
to generate a list, with the following structure. It is assumed that data
is a matrix and not equal to NULL
.
FIFIdType | ID used to restore FIF:17737:'\(\backslash 0\)''\(\backslash 0\)''E''I'. Defaults to |
FIFIdType=17737 . |
|
FileName | Name used for saving/restoring this image. Defaults to |
FileName="}\eqn{\backslash 0}{\0}\code{" . |
|
Description | See above. |
Date | Date (YYYY-MM-DD). Defaults to Date= |
as.character(Sys.Date()) . |
|
SignalDim | See above. |
ArrayType | Defines the format number. 1 for Real and 2 for Complex. |
Complex matrices are determined by \(A=a_{i,j}\) | |
where \(a_{i,2n}\) is the imaginary part to the real value | |
\(a_{i,2n-1}\), \(i=1,\ldots,M\), \(j=1,\ldots,2N\), \(n=1,\ldots,N\). | |
Defaults to ArrayType=1 . |
|
XYmin | See above. |
DeltaXY | See above. |
SignalMinMax | The lowest and highest signal value in the matrix. Defaults |
to SignalMinMax=c(min(data), max(data)) . |
# NOT RUN {
A <- phantom()
PetList <- iniPetFifList(data = A, imType = "normal")
PetList
rm(A,PetList)
# }
Run the code above in your browser using DataLab