Comments (3)
@vasole do you have an idea in this issue ?
from fabio.
Multi-frames TIFF is handled by TiffIO since its very first version.
You can save and load a complete stack of images as a single TIFF if you want.
Tiled Tiff images are not handled.
from fabio.
The test code inside TiffIO.py shows clearly how to do it
if __name__ == "__main__":
filename = sys.argv[1]
dtype = numpy.uint16
if not os.path.exists(filename):
print("Testing file creation")
tif = TiffIO(filename, mode='wb+')
data = numpy.arange(10000).astype(dtype)
data.shape = 100, 100
tif.writeImage(data, info={'Title': '1st'})
tif = None
if os.path.exists(filename):
print("Testing image appending")
tif = TiffIO(filename, mode='rb+')
tif.writeImage((data * 2).astype(dtype), info={'Title': '2nd'})
tif = None
tif = TiffIO(filename)
print("Number of images = %d" % tif.getNumberOfImages())
for i in range(tif.getNumberOfImages()):
info = tif.getInfo(i)
for key in info:
if key not in ["colormap"]:
print("%s = %s" % (key, info[key]))
elif info['colormap'] is not None:
print("RED %s = %s" % (key, info[key][0:10, 0]))
print("GREEN %s = %s" % (key, info[key][0:10, 1]))
print("BLUE %s = %s" % (key, info[key][0:10, 2]))
data = tif.getImage(i)[0, 0:10]
print("data [0, 0:10] = ", data)
from fabio.
Related Issues (20)
- Cannot read cbf images in latest fabio versions HOT 1
- WARNING:fabio.TiffIO:Data at tag id '65000' is smaller than expected HOT 4
- which runtime dependencies for fabio HOT 1
- ValueError: array to be byte-swapped is read-only HOT 4
- [meson] source distribution files have no timestamps HOT 3
- Broken tests in python 3.12 HOT 2
- Build issue since moving fabio to src HOT 7
- cannot read marccd image HOT 1
- Several regression in Python3.12 ... related to unclosed gzip files
- Move to pydata sphinx theme
- Support for newer GE files? HOT 10
- Compatibility with numpy 2.0
- Support sparse format from XPCS data ... HOT 1
- Compatibility with `numpy2` (bis) HOT 1
- Using fabio to read detector H5 files other than Eiger (e.g. Lambda, etc) HOT 14
- Write helper function to unlock the number of opened files ....
- Is this warning jutified ? HOT 7
- [2024.4.0] warnings during the build HOT 4
- [2024.4.0][s390x] test failures HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fabio.