loading 3D big array

3 visualizzazioni (ultimi 30 giorni)
Ersilia Leonardis
Ersilia Leonardis il 4 Mag 2012
Commentato: DGM il 3 Lug 2025
Hi everyone, does anyone know how to extract a 2D slice from a 3D binary files of size [2048]x[2048]x[1024]? I just need slices in the x-y plane for a fixed value of the third dimension, z. Thanks a lot!
  1 Commento
DGM
DGM il 3 Lug 2025
I'm not sure what a GDA file is, and the web doesn't seem to know anymore either. I'm assuming it's a GDAL file, which would be georeferenced raster data. Seems awful deep for such an image, but maybe I'm wildly wrong.
This might be relevant, though I don't know if it would have been a solution:

Accedi per commentare.

Risposte (2)

Pinpress
Pinpress il 4 Mag 2012
im(:,:,100)??
or squeeze(im(:, 1000, :)) ??
  1 Commento
Ersilia Leonardis
Ersilia Leonardis il 8 Mag 2012
Spostato: DGM il 3 Lug 2025
Thanks for your reply but I haven't got my 3D image as variable in my workspace since the 3D array would be too big (file size is 16 GB!). I just wanna read off a slice from the external binary file.

Accedi per commentare.


Jan
Jan il 8 Mag 2012
The method to extract a slice from a binary file depends on the file format. It matters if you are talking about binary STL files or a simple double array stored in linear order without any header.
  1 Commento
Ersilia Leonardis
Ersilia Leonardis il 8 Mag 2012
Spostato: DGM il 3 Lug 2025
The file format is gda. The data stored are just raw binary and have fortran ordering with no header. The corresponding array has size X=2048 x Y=2048 x Z=1024 and each quantity is a 4 byte real.

Accedi per commentare.

Categorie

Scopri di più su Data Import and Analysis in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by