Message Boards Message Boards

How does the Mathematica export .tif images?

Posted 2 years ago

Hi there, I processed images(.tif format) in Mathematica and then exported them as .tif images. But when I impoted the new image into ParaView, the image could not display normally. To find the reason, I tried to export images with different format including .tif 16-bit, .tif 8-bit, .png, .jpeg and then read them in ParaView. The results show that only .tif image created from Mathematica cannot display correctly in ParaView. It seems that partial pixel intensity of image is lost. Does anyone know how the Mathematica exports .tif images? Will it cause the loss of pixel intensity of image? Why can original image with 8-bit and tif format display normally in ParaView but the image exported as 8-bit, tif format from Mathematica not?

Although I imported image as 8-bit depth, when I use ImageType function, it still showed bit 16. I know Mathematica will export image as 16-bit depth by default so I set up bit depth as 8.

The code in Mathematica is :

SetDirectory[NotebookDirectory[]];
Fibreimage = Import["8.tif", "BitDepth" -> 8];
ImageType[Fibreimage]
Export["8tif.tif", Fibreimage]
Export["bit8tif.tif", Fibreimage, "BitDepth" -> 8]
Export["png.png", Fibreimage]
Export["jpeg.jpeg", Fibreimage]

The original image is enter image description here

The visualisation of image with different format in ParaView is shown in below.

Import original image with 8-bit depth, .tif in ParaView: enter image description here

Import image exported as 16-bit depth, .tif from Mathematica in ParaView: enter image description here

Import image exported as 8-bit depth, .tif from Mathematica in ParaView: enter image description here

Import image exported as .png from Mathematica in ParaView: enter image description here

Import image exported as .jpeg from Mathematica in ParaView: enter image description here

POSTED BY: Jia Lee
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract