필터 지우기
필터 지우기

Convert Double 3D matrix into 3D Tiff file

조회 수: 6 (최근 30일)
Quan Zheng
Quan Zheng 2024년 3월 5일
댓글: Quan Zheng 2024년 3월 5일
Hi all,
I am currently working on a 3D matrix contains 220 different values from 0-1 with Double format. The scale of this matrix is 2520*2520*1804. Now I want to convert this into a 3D Tiff file using imwrite function and it turns out the file is too big. I would much appreciate if anyone could give me some possible solutions on regard this issue. Thank you very much for your time.
Cheers,
Quan

채택된 답변

Walter Roberson
Walter Roberson 2024년 3월 5일
AImage data
matrix
Image data, specified as a full (nonsparse) matrix.
  • For grayscale images, A can be m-by-n.
  • For indexed images, A can be m-by-n. Specify the associated colormap in the map input argument.
  • For truecolor images, A must be m-by-n-by-3. imwrite does not support writing RGB images to GIF files.
For TIFF files, A can be an m-by-n-by-4 array containing color data that uses the CMYK color space.
You are trying to write m = 2520 n = 2520 ... by something that is not 3 or 4. imwrite() cannot do handle it.
What you can do is imwrite() one layer at a time, with "writemode", "append". The result will, however, not be a 3D Tiff file.
In order to get a 3D tiff file. you need to use the Tiff() class, and you have to write special tags.
Unfortunately there is no tiff write volume corresponding to tiffreadVolume
  댓글 수: 1
Quan Zheng
Quan Zheng 2024년 3월 5일
Hi Walter,
Thank you for your responds. As you suggested, I have tried to save the files into 2D slices and stack them into 3DTiff using Image J and it perfactly worked.
Thanks heaps again.
Cheers,
Quan

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Data에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by