loading 3D big array

조회 수: 2 (최근 30일)
Ersilia Leonardis
Ersilia Leonardis 2012년 5월 4일
댓글: DGM 2025년 7월 3일
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
DGM
DGM 2025년 7월 3일
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:

댓글을 달려면 로그인하십시오.

답변 (2개)

Pinpress
Pinpress 2012년 5월 4일
im(:,:,100)??
or squeeze(im(:, 1000, :)) ??
  댓글 수: 1
Ersilia Leonardis
Ersilia Leonardis 2012년 5월 8일
이동: DGM 2025년 7월 3일
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.

댓글을 달려면 로그인하십시오.


Jan
Jan 2012년 5월 8일
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
Ersilia Leonardis
Ersilia Leonardis 2012년 5월 8일
이동: DGM 2025년 7월 3일
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.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Data Import and Analysis에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by