zetastitcher.io.inputfile module¶
- class zetastitcher.io.inputfile.InputFile(file_path=None)¶
Bases:
zetastitcher.io.inputfile_mixin.InputFileMixin- Attributes
array_sizeSize in bytes of the whole virtual array
- channel
- file
- file_size
frame_sizeSize in bytes of a single frame
shapeShape of the whole image stack.
Methods
frame(index[, dtype, copy])Convenience function to retrieve a single slice.
whole([dtype, copy])Convenience function to retrieve the whole stack.
zslice(arg1[, arg2, step, dtype, copy])Return a slice, i.e. a substack of frames.
zslice_idx(index[, frames_per_slice, dtype, ...])Return a slice, i.e. a substack of frames, by index.
close
open
- property channel¶
- property file¶
- property file_size¶
- frame(index, dtype=None, copy=True)¶
Convenience function to retrieve a single slice.
Same as calling
slice()and squeezing.- Parameters
- indexint
slice index
- dtype
- Returns
numpy.ndarrayA numpy array, see
slice().
- open(file_path=None)¶
- property shape¶
Shape of the whole image stack.
- Returns
- tuple
(
nfrms,channels,ysize,xsize) wherechannelsis the number of color channels in the image. Ifchannelis set or if there is only one channel, thechannelsdimension is squeezed.
- whole(dtype=None, copy=True)¶
Convenience function to retrieve the whole stack.
Equivalent to call
slice_idx()withpandas documentation= 0 andframes_per_slice=nfrms- Parameters
- dtype
- Returns
numpy.ndarrayA numpy array, see
slice().
- zslice(arg1, arg2=None, step=None, dtype=None, copy=True)¶
Return a slice, i.e. a substack of frames.
- Parameters
- arg1int
Mandatory argument, will be passed to
sliceIf arg2 and step are both None, it will be passed asslice(arg1), i.e. it would act as the stop argument.- arg2int
If not null, will be passed as
slice(arg1, arg2, step)- stepint
If not null, will be passed as
slice(arg1, arg2, step)- dtype
- Returns
numpy.ndarrayA numpy array of the original type or of
dtype, if specified. The shape of the array is (end_frame-start_frame,channelsysize,xsize,channels) wherechannelsis the number of color channels in the image. Ifchannelis set or if there is only one channel, thechannelsdimension is squeezed.
- zslice_idx(index, frames_per_slice=1, dtype=None, copy=True)¶
Return a slice, i.e. a substack of frames, by index.
- Parameters
- indexint
slice index
- frames_per_sliceint
number of frames per slice
- dtype
- Returns
numpy.ndarrayA numpy array, see
slice().