Browse Source

#96: documentation changes

feature/load_slices
Jim Rybarski 9 years ago
parent
commit
d49c5f03eb
2 changed files with 3 additions and 12 deletions
  1. +2
    -10
      nd2reader/interface.py
  2. +1
    -2
      nd2reader/version.py

+ 2
- 10
nd2reader/interface.py View File

@ -50,15 +50,6 @@ class Nd2(object):
"""
Allows slicing ND2s.
>>> nd2 = Nd2("my_images.nd2")
>>> image = nd2[16] # gets 17th frame
>>> for image in nd2[100:200]: # iterate over the 100th to 200th images
>>> do_something(image)
>>> for image in nd2[::-1]: # iterate backwards
>>> do_something(image)
>>> for image in nd2[37:422:17]: # do something super weird if you really want to
>>> do_something(image)
:type item: int or slice
:rtype: nd2reader.model.Image() or generator
@ -102,7 +93,8 @@ class Nd2(object):
:return: model.ImageSet()
"""
warnings.warn("Nd2.image_sets will be removed from the nd2reader library in the near future.", DeprecationWarning)
warnings.warn("Nd2.image_sets will be removed from the nd2reader library in the near future.",
DeprecationWarning)
for frame in self.frames:
image_group = ImageGroup()


+ 1
- 2
nd2reader/version.py View File

@ -6,8 +6,7 @@ def get_version(fh):
"""
Determines what version the ND2 is.
:param filename: the path (absolute or relative) to the ND2
:type filename: str
:param fh: a file handle to the ND2
"""
# the first 16 bytes seem to have no meaning, so we skip them


Loading…
Cancel
Save