Hi,
For the umap creation, I generated it in GATE which gave me files of the type .mhd and .raw. But because the .mhd wasn’t in the interfile format, I created a file of the type .hdr compatible with Castor based on a template I saw, like this:
!INTERFILE :=
!imaging modality := PET
!version of keys := CASToRv1.0
!GENERAL DATA :=
!originating system := GATE
!data offset in bytes := 0
!name of data file := Phantom-MuMap.raw
!GENERAL IMAGE DATA :=
!type of data := Static
!total number of images := 16
imagedata byte order := LITTLEENDIAN
!number of frame groups := 1
process status :=
!STATIC STUDY (General) :=
number of dimensions := 3
!matrix size [1] := 32 ; Adjusted to match 64 KB file size
!matrix size [2] := 32 ; Adjusted to match 64 KB file size
!matrix size [3] := 16 ; Adjusted to match 64 KB file size
!number format := short float
!number of bytes per pixel := 4
scaling factor (mm/pixel) [1] := 8.8
scaling factor (mm/pixel) [2] := 8.8
scaling factor (mm/pixel) [3] := 11.2
image duration (sec) := 30
image start time (sec) := 0
data rescale offset := 0
data rescale slope := 1
!END OF INTERFILE :=
Then, when I try again the reconstruction using this settings for my simulation and adding the attenuation map from my voxelized phantom:
castor-recon -df PETSIM2_df.Cdh -atn /home/vgate/Desktop/teste2_castor/output/images/petcastorumap.hdr -it 8:8 -dim 32,32,16 -vox 8.8,8.8,11.2 -fout ReconstructedImage -conv gaussian,4.,4.,3.5::psf -conv gaussian,6.,6.,3.5::post -opti MLEM -proj joseph -vb 2
I still get the same kind of error message:
***** iScannerPET::GetPositionsAndOrientations() → Crystal index 1 (-437559610) out of range [0:13823] !
***** vProjector::Project() → A problem occurred while getting positions and orientations from scanner !
***** oProjectorManager::ComputeProjectionLine() → A problem occurred while forward projecting an event !
***** iIterativeAlgorithm::StepInnerLoopInsideSubsetLoop() → A problem occurred while computing the projection line !
-------------------------------------------------|
***** iIterativeAlgorithm::StepInnerLoopInsideSubsetLoop() → A problem occurred inside the parallel loop over events !
***** vAlgorithm::IterateCPU() → A problem occurred while calling StepInnerLoopInsideSubsetLoop() function !
***** castor-recon() → Error while performing the reconstruction
***** Exit function called. Abort with code 1.
From what I read it can be related to the crystal settings in the geometry macro file but I used the castor-GATEMacToGeom so I don’t understand why this is happening. Do you think it could be the root file from the simulation?
I uploaded the files scripts. If you have the time to give it a look I would be very thankful!
About the Image J, it is solved I learned how to opened it the right way. 
mainmacrobrain.txt (12.3 KB)
geom_file_castor.txt (1.8 KB)
Thank you again!