How to open files .ict, .hct. a00, .h00
30 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
mohd akmal masud
il 2 Set 2023
Commentato: Cheng
il 28 Set 2024 alle 11:00
Dear all,
I have four types of documents, as attached.
Anyone can help e ho to open/view this files?
all the file is images.
Risposta accettata
DGM
il 3 Set 2023
Modificato: DGM
il 3 Set 2023
Here.
sz = [128 128 128];
fname = 'point1.ict';
fid = fopen(fname);
data = fread(fid,'*uint16'); % assuming uint
fclose(fid);
% this is blindly devectorized
% may still be transposed, but i can't tell due to symmetry
% note that data is binarized on a [0 1000] scale in uint16
% so if viewing in a denormalized manner, it'll just appear black
% normalize or rescale it as needed
data = reshape(data,sz);
View as necessary (it's a 3D volumetric image)
The second image is simply a single-precision 3-channel image (RGB?)
sz = [128 128 3];
fname = 'point1_air_w1.a00';
fid = fopen(fname);
data = fread(fid,'*float'); % assuming uint
fclose(fid);
% this is blindly devectorized
% may still be transposed, but i can't tell due to symmetry
% note that data is unit-scale single-precision float
data = reshape(data,sz);
How did I know what the parameters were? I just read the header file and entered those values. Consider the first image. These are the relevant lines:
!total number of images := 128
!matrix size [1] := 128
!matrix size [2] := 128
!matrix size [3] := 128
!number of bytes per pixel := 2
!number format := unsigned integer
And the second file:
!total number of images := 3
!matrix size [1] := 128
!matrix size [2] := 128
!number format := short float
!number of bytes per pixel := 4
You could write a giant pile of regex to extract the relevant information from the headers to allow the images to be processed automatically, but with only two examples and no specifications, I'm not going to assume I know what to expect of the header formatting or the meaning of the fields.
6 Commenti
DGM
il 4 Set 2023
Modificato: DGM
il 4 Set 2023
As that header indicates, the image size should be [128 128 64]
You need to check each header file to determine the image size for the corresponding data file.
If for some reason (e.g. a common sensor resolution) all the page geometries can be assumed identical, then you can possibly use a slack dimension to avoid the lookup each time.
data = reshape(data,128,128,[]);
That would allow you to reshape any image with 128x128 page geometry, without needing to know how many slices there were.
Otherwise, a more robust automated approach would require parsing the header files.
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!