- make zstd block include content size so fiji can actually read it
- add compression level argument - remove shape argument - some more pytest tests
This commit is contained in:
10
src/py.rs
10
src/py.rs
@@ -165,12 +165,18 @@ struct PyIJTiffFile {
|
||||
#[pymethods]
|
||||
impl PyIJTiffFile {
|
||||
#[new]
|
||||
fn new(path: &str, shape: (usize, usize, usize)) -> PyResult<Self> {
|
||||
fn new(path: &str) -> PyResult<Self> {
|
||||
Ok(PyIJTiffFile {
|
||||
ijtifffile: Some(IJTiffFile::new(path, shape)?),
|
||||
ijtifffile: Some(IJTiffFile::new(path)?),
|
||||
})
|
||||
}
|
||||
|
||||
fn set_compression_level(&mut self, compression_level: i32) {
|
||||
if let Some(ref mut ijtifffile) = self.ijtifffile {
|
||||
ijtifffile.set_compression_level(compression_level);
|
||||
}
|
||||
}
|
||||
|
||||
#[getter]
|
||||
fn get_colors(&self) -> PyResult<Option<Vec<Vec<u8>>>> {
|
||||
if let Some(ijtifffile) = &self.ijtifffile {
|
||||
|
||||
Reference in New Issue
Block a user