필터 지우기
필터 지우기

loading 3D big array

조회 수: 4 (최근 30일)
Ersilia Leonardis
Ersilia Leonardis 2012년 5월 4일
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!

답변 (4개)

Pinpress
Pinpress 2012년 5월 4일
im(:,:,100)??
or squeeze(im(:, 1000, :)) ??

Ersilia Leonardis
Ersilia Leonardis 2012년 5월 8일
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.

Ersilia Leonardis
Ersilia Leonardis 2012년 5월 8일
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에서 Cell Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by