Tiff library to export Tiff image uint32
Mostrar comentarios más antiguos
I don't know how exactly to use the tifflib code given by matlab. I have a uint32 image J on matlab and i want to export it in tiff. can anyone tell me how?
3 comentarios
Rik
el 2 de Jul. de 2018
Mirett Boliard
el 2 de Jul. de 2018
Walter Roberson
el 2 de Jul. de 2018
tagstruct.SampleFormat = Tiff.SampleFormat.Uint;
Respuestas (2)
Mirett Boliard
el 2 de Jul. de 2018
0 votos
1 comentario
Rik
el 2 de Jul. de 2018
Why the impatience? It has only been 20 minutes since you posted the question. People in Europe are probably sleeping or going to sleep, and the US/Canada are still in office hours. For most contributors this is something for their spare time. If you need answers this fast, consider hiring a consultant.
Also, this is not answer. Please only post an answer if you actually solve the question you posed.
Rik
el 2 de Jul. de 2018
I generated an example with the line below
A=uint32(randi(uint32(inf),255,255));
Then, running your code resulted in this error:
If SampleFormat is IEEEFP, the image datatype is restricted
to one of the following: single, double.
So your choice of format is incompatible with your choice of input data type. There are two ways to fix this:
- Set tagstruct.SampleFormat = Tiff.SampleFormat.Uint;
- Cast your data to the single datatype with A=single(A);.
1 comentario
Rik
el 3 de Jul. de 2018
Did this suggestion solve your problem? If so, please consider marking it as accepted answer. It will make it easier for other people with the same question to find an answer. If this didn't solve your question, please comment with what problems you are still having.
Categorías
Más información sobre Programming en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!