Closed RudoRoemer closed 7 years ago
Will track progress by editing this comment:
OPEN(UNIT= IChInImage, STATUS= 'UNKNOWN', FILE=TRIM(ADJUSTL(filename)), &
FORM='UNFORMATTED',ACCESS='DIRECT',IOSTAT=IErr,RECL=2*IPixelCount*IByteSize)
...
DO jnd=1,2*IPixelCount
READ(IChInImage,rec=jnd,IOSTAT=IErr) RImageExpi(jnd,:,ind)
! ind = 1,INoOfLacbedPatterns
OPEN(UNIT=IChOutWIImage, STATUS= 'UNKNOWN', FILE=TRIM(ADJUSTL(filename)),&
FORM='UNFORMATTED',ACCESS='DIRECT',IOSTAT=IErr,RECL=2*IPixelCount*8)
IF(l_alert(IErr,"WriteIterationOutput","OPEN() output .bin file")) RETURN
DO jnd = 1,2*IPixelCount
WRITE(IChOutWIImage,rec=jnd) RImageToWrite(jnd,:)
jacob@jacob-VirtualBox:~/a$ hexdump -n 50 input.img
0000000 0000 0000 9500 40ba 0000 0000 9e80 40c2
0000010 0000 0000 0e80 40cd 0000 0000 de80 40db
...
jacob@jacob-VirtualBox:~/a$ hexdump -n 50 output.bin
0000000 4143 0aa4 27a7 3fd4 53ce 42ba a9d6 3fda
0000010 9deb 047c 11a6 3fe2 2b3e 3a36 109c 3fe7
...
61d1270d936f144f75f96d2d54e43d02dcb4c9d9 Added read_dm3_mod.f90 to felix
44d1bb5ec2b63cd0a2fa9b427da7a07dc6f0539a ReadExperimentalImages() now automatically checks for LR_NxN/ .img, HR/ .img, DM3/ .dm3, .img, *.dm3
update Felix to read .tif and .dm3 (DigitalMicrograph) files. There are C++ plugins for .tif and a JavaScript for .dm3, they could be useful to convert to Fortran. Also, rejig the input .img and output .bin files into a joint format.