Skip to content

Commit 7de12cf

Browse files
committed
Bump version number to 3.5.2.
1 parent 583499e commit 7de12cf

File tree

3 files changed

+196
-133
lines changed

3 files changed

+196
-133
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ project(DIPlib)
2121
# The version number and latest copyright year. Update these values here, they're used all throughout the project.
2222
set(PROJECT_VERSION_MAJOR "3")
2323
set(PROJECT_VERSION_MINOR "5")
24-
set(PROJECT_VERSION_PATCH "1")
24+
set(PROJECT_VERSION_PATCH "2")
2525
set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
2626
set(DIP_COPYRIGHT_YEAR "2024")
2727

changelogs/diplib_3.5.2.md

Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
---
2+
layout: post
3+
title: "Changes DIPlib 3.5.2"
4+
date: 2024-12-27
5+
---
6+
7+
## Changes to *DIPlib*
8+
9+
### New functionality
10+
11+
- `dip::ImageWriteTiff()` now can write 3D images to a TIFF file as a series of slices.
12+
See [PR #182](https://github.com/DIPlib/diplib/pull/182).
13+
14+
- Additions to the `dip::Graph` class:
15+
16+
- Added `dip::Graph::EdgeVertex()` for convenience. `graph.EdgeVertex( edge, which )` is the same as what
17+
previously was written `graph.Edges()[ edge ].vertices[ which ].`
18+
19+
- Added `dip::Graph::IsValidEdge()`.
20+
21+
- Added `dip::Graph::UpdateEdgeWeights<>()`, an overload that takes a function as input; this function
22+
is applied to the two vertex weights for each edge, and should return an edge weight.
23+
24+
- `dip::MinimumSpanningForest()` is now a free function. The `dip::Graph::MinimumSpanningForest()` class
25+
function still exists for backwards-compatibility, it calls the free function.
26+
27+
- Added `dip::DirectedGraph`, a directed version of `dip::Graph`.
28+
29+
- Added `dip::GraphCut()`, a function that computes the minimum cut of a `dip::DirectedGraph`.
30+
This is a segmentation algorithm that splits the graph into two sections based on two marker vertices (nodes).
31+
32+
- Added `dip::GraphCut()`, a function that computes the grap-cut segmentation of an image.
33+
34+
- Added `dip::Label()` with a `dip::Graph` and a `dip::DirectedGraph` as input.
35+
It finds connected components in the graph.
36+
37+
- Added `dip::Histogram::Configuration::Mode::IS_COMPLETE`, which prevents a configuration from being
38+
modified when computing a histogram. It is set by `dip::Histogram::Configuration::Complete()`.
39+
This option is dangerous to set manually! It is intended for re-using the same configuration across
40+
multiple histogram computations.
41+
42+
- Added `dip::Image::ReinterpretCastBinToUint8()` and `dip::Image::ReinterpretCastUint8ToBin()` for the specific case
43+
of casting bin to uint8 and back. They don't provide any functionality that `dip::Image::ReinterpretCast()`
44+
didn't already provide, but they are much safer to use.
45+
46+
### Changed functionality
47+
48+
- `dip::AlignedAllocInterface` now aligns each of the scanlines (rows of the image), not just the first one.
49+
This means it can be used to create images that are compatible with some image display widgets (Windows
50+
bitmap, Qt image, etc.).
51+
52+
- `dip::LowestCommonAncestorSolver` is no longer in the public API. This class contained code used in the
53+
Exact Stochastic Watershed (`dip::StochasticWatershed` with `seeds` set to `"exact"` or `nIterations` set to 0).
54+
55+
### Bug fixes
56+
57+
- `dip::Log2` computed the natural logarithm instead of the base-2 logarithm.
58+
See [PR #168](https://github.com/DIPlib/diplib/pull/168).
59+
60+
- `dip::StructureTensorAnalysis3D()` would try to read a non-existing tensor element when requesting the 'l3' output
61+
(producing an obscure error message).
62+
63+
- `dip::GaussFT()` could, under some circumstances, try to reforge the output image to an intermediate, extended size.
64+
This would throw an exception if the image was protected, but was always a bad thing to do.
65+
See [issue #170](https://github.com/DIPlib/diplib/issues/170).
66+
67+
- The Fourier Transform, when using the default PocketFFT, used a plan cache that was not thread safe. When calling
68+
any function using a Fourier Transform from multiple threads, a race condition could occur. We've added a mutex
69+
to the function that maintains the cache to avoid this.
70+
71+
- In 3.5.0, the original version of `dip::GetImageChainCodes()` was deprecated in favor of a new one that takes
72+
a `std::vector< dip::LabelType >` as input, as opposed to a `dip::UnsignedArray`. This caused code that called
73+
the function with an initializer array (`dip::GetImageChainCodes( image, { 1 } )`) to become ambiguous. A new
74+
overload that takes an initializer list as input fixes this ambiguity.
75+
76+
- `operator+()` for `dip::Image` (i.e. the function called for `+img`) created a new data segment and copied
77+
the data over when the input was binary. In that case it now creates a new uint8 image that points to the
78+
same data segment of the binary image, as intended.
79+
80+
- `dip::EdgeObjectsRemove()` produced an empty output image when the input and output images were the same object.
81+
82+
### Build changes
83+
84+
- The documentation building target was renamed to "doc" (as "apidoc"). This target builds much more documentation
85+
than just the DIPlib API documentation (the DIPimage and PyDIP user manuals, build instructions, etc.).
86+
87+
88+
89+
90+
## Changes to *DIPimage*
91+
92+
### New functionality
93+
94+
- The function documentation now has links to the online DIPlib documentation. Instead of only
95+
naming the DIPlib functions used, the function names are now hyperlinks.
96+
97+
### Changed functionality
98+
99+
- The `'FileWriteWarning'` setting now also applies to the warning regarding conversion to `uint8` when
100+
`imwrite` delegates to MATLAB's built-in image writing capability. A warning is no longer produced if
101+
the image already was `uint8`.
102+
103+
(See also changes to *DIPlib*.)
104+
105+
### Bug fixes
106+
107+
- The `dip_image` constructor (and consequently some functions such as `newim`) again accept
108+
some data type aliases that existed in DIPimage 2.x (`'bin8'`, `'int'`, `'uint'`, `'float'`, `'complex'`).
109+
These are not terribly useful, but there's no reason not to accept them.
110+
111+
- When `imread` delegated to MATLAB's built-in image file reading capability, it failed to tag
112+
CMYK images as such.
113+
114+
(See also bugfixes to *DIPlib*.)
115+
116+
### Build and installation changes
117+
118+
- Ported and improved the old *DIPimage* test suite, which is not (yet?) run automatically with `make test`
119+
because it requires *DIPimage* to be installed.
120+
121+
122+
123+
124+
## Changes to *PyDIP*
125+
126+
### New functionality
127+
128+
- Added the function `dip.Doc()`, which will open the documentation for the given function or class in the
129+
default web browser.
130+
131+
- Automatically copying the brief section of the documentation to each function as the Python doc string.
132+
We finally have some documentation in Python!
133+
134+
- Overloaded `len()` for `dip.Measurement`. It's equal to `NumberOfObjects()` (the number of rows),
135+
and thus produces the same value it does when casting the measurement objects to a NumPy array
136+
(`len(measurement)` is the same as `len(np.asarray(measurement))`).
137+
138+
- Overloaded `len()` and `iter()` for `dip.Measurement.IteratorFeature` and `dip.Measurement.IteratorObject`,
139+
and added `keys()`, `values()` and `items()` class methods. Now both behave more like Python dicts.
140+
But note that all three of these methods will output a list with a copy of the values, it's not a view
141+
as with dicts.
142+
143+
### Changed functionality
144+
145+
- Converted several tuple output arguments to `namedtuple`. Note of these changes should affect existing code:
146+
147+
- The function `dip.MaximumAndMinimum()` now returns a `namedtuple` of type `MinMaxValues`.
148+
The two values can now (and preferably) be accessed using the dot notation: `mm.maximum` instead of `mm[1]`.
149+
See [issue #184](https://github.com/DIPlib/diplib/issues/184).
150+
151+
- The functions `dip.MandersColocalizationCoefficients()` and `dip.CostesColocalizationCoefficients()`
152+
now return a `namedtuple` of type `ColocalizationCoefficients`.
153+
154+
- The functions `dip.ChainCode.BoundingBox()` and `dip.Polygon.BoundingBox()` now return a `namedtuple`
155+
of type `BoundingBoxInteger` and `BoundingBoxFloat` respectively, which contain two `namedtuple`s of type
156+
`VertexInteger` or `VertexFloat`.
157+
158+
- Other `dip.Polygon` functions such as `dip.Polygon.Centroid()` now return a `namedtuple` of type `VertexFloat`.
159+
160+
- `dip.ChainCode.start` is now a `namedtuple` of type `VertexInteger`.
161+
162+
- The types `SubpixelLocationResult`, `RadonCircleParameters`, `RegressionParameters`, `GaussianParameters`,
163+
`FeatureInformation`, `ValueInformation`, `EllipseParameters`, `FeretValues`, `RadiusValues`, `QuartilesResult`,
164+
`StatisticsValues`, `CovarianceValues`, `MomentValues` and `SpatialOverlapMetrics`, all used only as outputs to
165+
functions, and all simply emulating a C++ `struct`, are no longer special types in the `diplib.PyDIP_bin` namespace,
166+
but `namedtuple`s. They new types behave identically, but can additionally be unpacked, for example:
167+
`_, q1, _, q3, _ = dip.Quartiles(img)`.
168+
169+
- `dip::Measurement::IteratorFeature` was bound in Python as `dip.Measurement.MeasurementFeature`, and
170+
`dip::Measurement::IteratorObject` as `dip.Measurement.MeasurementObject`. The names of these classes now
171+
match the C++ name, to make `dip.Doc()` useful with these classes. But the names don't make much sense in
172+
Python because these objects don't work as iterators like they do in C++.
173+
174+
(See also changes to *DIPlib*.)
175+
176+
### Bug fixes
177+
178+
None, but see bugfixes to *DIPlib*.
179+
180+
181+
182+
183+
## Changes to *DIPviewer*
184+
185+
### Bug fixes
186+
187+
- The Java interface used `Native.loadLibrary()`, which was deprecated. It now uses `Native.load()` instead.
188+
189+
190+
191+
192+
## Changes to *DIPjavaio*
193+
194+
None.

changelogs/diplib_next.md

Lines changed: 1 addition & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -8,170 +8,41 @@ date: 2020-00-00
88

99
### New functionality
1010

11-
- `dip::ImageWriteTiff()` now can write 3D images to a TIFF file as a series of slices.
12-
See [PR #182](https://github.com/DIPlib/diplib/pull/182).
13-
14-
- Added `dip::Graph::EdgeVertex()` for convenience. `graph.EdgeVertex( edge, which )` is the same as what
15-
previously was written `graph.Edges()[ edge ].vertices[ which ].`
16-
17-
- Added `dip::Graph::IsValidEdge()`.
18-
19-
- Added `dip::Graph::UpdateEdgeWeights<>()`, an overload that takes a function as input; this function
20-
is applied to the two vertex weights for each edge, and should return an edge weight.
21-
22-
- Added `dip::DirectedGraph`, a directed version of `dip::Graph`.
23-
24-
- Added `dip::GraphCut()`, a function that computes the minimum cut of a directed graph. This is a segmentation
25-
algorithm that splits the graph into two sections based on two marker vertices (nodes).
26-
27-
- Added `dip::Label()` with a `dip::Graph` and a `dip::DirectedGraph` as input.
28-
It finds connected components in the graph.
29-
30-
- Added `dip::GraphCut()`, a function that computes the grap-cut segmentation of an image.
31-
32-
- Added `dip::Histogram::Configuration::Mode::IS_COMPLETE`, which prevents a configuration from being
33-
modified when computing a histogram. It is set by `dip::Histogram::Configuration::Complete()`.
34-
This option is dangerous to use!
35-
36-
- Added `dip::Image::ReinterpretCastBinToUint8()` and `dip::Image::ReinterpretCastUint8ToBin()` for the specific case
37-
of casting bin to uint8 and back. They don't provide any functionality that `dip::Image::ReinterpretCast()`
38-
didn't already provide, but they are much safer to use.
39-
4011
### Changed functionality
4112

42-
- `dip::AlignedAllocInterface` now aligns each of the scanlines (rows of the image), not just the first one.
43-
This means it can be used to create images that are compatible with some image display widgets (Windows
44-
bitmap, Qt image, etc.).
45-
46-
- `dip::LowestCommonAncestorSolver` is no longer in the public API. This class contained code used in the
47-
Exact Stochastic Watershed (`dip::StochasticWatershed` with `seeds` set to `"exact"` or `nIterations` set to 0).
48-
49-
- `dip::MinimumSpanningForest()` is now a free function. The `dip::Graph::MinimumSpanningForest()` class
50-
function still exists for backwards-compatibility, it calls the free function.
51-
5213
### Bug fixes
5314

54-
- `dip::Log2` computed the natural logarithm instead of the base-2 logarithm.
55-
See [PR #168](https://github.com/DIPlib/diplib/pull/168).
56-
57-
- `dip::StructureTensorAnalysis3D()` would try to read a non-existing tensor element when requesting the 'l3' output
58-
(producing an obscure error message).
59-
60-
- `dip::GaussFT()` could, under some circumstances, try to reforge the output image to an intermediate, extended size.
61-
This would throw an exception if the image was protected, but was always a bad thing to do.
62-
See [issue #170](https://github.com/DIPlib/diplib/issues/170).
63-
64-
- The Fourier Transform, when using the default PocketFFT, used a plan cache that was not thread safe. When calling
65-
any function using a Fourier Transform from multiple threads, a race condition could occur. We've added a mutex
66-
to the function that maintains the cache to avoid this.
67-
68-
- In 3.5.0, the original version of `dip::GetImageChainCodes()` was deprecated in favor of a new one that takes
69-
a `std::vector< dip::LabelType >` as input, as opposed to a `dip::UnsignedArray`. This caused code that called
70-
the function with an initializer array (`dip::GetImageChainCodes( image, { 1 } )`) to become ambiguous. A new
71-
overload that takes an initializer list as input fixes this ambiguity.
72-
73-
- `operator+()` for `dip::Image` (i.e. the function called for `+img`) created a new data segment and copied
74-
the data over when the input was binary. In that case it now creates a new uint8 image that points to the
75-
same data segment of the binary image, as intended.
76-
77-
- `dip::EdgeObjectsRemove()` produced an empty output image when the input and output images were the same object.
78-
7915
### Updated dependencies
8016

8117
### Build changes
8218

83-
- The documentation building target was renamed to "doc" (as "apidoc"). This target builds much more documentation
84-
than just the DIPlib API documentation (the DIPimage and PyDIP user manuals, build instructions, etc.).
85-
8619

8720

8821

8922
## Changes to *DIPimage*
9023

9124
### New functionality
9225

93-
- The function documentation now has links to the online DIPlib documentation. Instead of only
94-
naming the DIPlib functions used, the function names are now hyperlinks.
95-
9626
### Changed functionality
9727

98-
- The `'FileWriteWarning'` setting now also applies to the warning regarding conversion to `uint8` when
99-
`imwrite` delegates to MATLAB's built-in image writing capability. A warning is no longer produced if
100-
the image already was `uint8`.
101-
10228
(See also changes to *DIPlib*.)
10329

10430
### Bug fixes
10531

106-
- The `dip_image` constructor (and consequently some functions such as `newim`) again accept
107-
some data type aliases that existed in DIPimage 2.x (`'bin8'`, `'int'`, `'uint'`, `'float'`, `'complex'`).
108-
These are not terribly useful, but there's no reason not to accept them.
109-
110-
- When `imread` delegated to MATLAB's built-in image file reading capability, it failed to tag
111-
CMYK images as such.
112-
32+
None, but see bugfixes to *DIPlib*.
11333
(See also bugfixes to *DIPlib*.)
11434

11535
### Build and installation changes
11636

117-
- Ported and improved the old *DIPimage* test suite, which is not (yet?) run automatically with `make test`
118-
because it requires *DIPimage* to be installed.
119-
12037

12138

12239

12340
## Changes to *PyDIP*
12441

12542
### New functionality
12643

127-
- Added the function `dip.Doc()`, which will open the documentation for the given function or class in the
128-
default web browser.
129-
130-
- Automatically copying the brief section of the documentation to each function as the Python doc string.
131-
We finally have some documentation in Python!
132-
NOTE: We could copy the full documentation in the future, but that requires more extensive Markdown
133-
parsing to produce good results.
134-
135-
- Overloaded `len()` for `dip.Measurement`. It's equal to `NumberOfObjects()` (the number of rows),
136-
and thus produces the same value it does when casting the measurement objects to a NumPy array
137-
(`len(measurement)` is the same as `len(np.asarray(measurement))`).
138-
139-
- Overloaded `len()` and `iter()` for `dip.Measurement.IteratorFeature` and `dip.Measurement.IteratorObject`,
140-
and added `keys()`, `values()` and `items()` class methods. Now both behave more like Python dicts.
141-
But note that all three of these methods will output a list with a copy of the values, it's not a view
142-
as with dicts.
143-
14444
### Changed functionality
14545

146-
- Converted several tuple output arguments to `namedtuple`. Note of these changes should affect existing code:
147-
148-
- The function `dip.MaximumAndMinimum()` now returns a `namedtuple` of type `MinMaxValues`.
149-
The two values can now (and preferably) be accessed using the dot notation: `mm.maximum` instead of `mm[1]`.
150-
See [issue #184](https://github.com/DIPlib/diplib/issues/184).
151-
152-
- The functions `dip.MandersColocalizationCoefficients()` and `dip.CostesColocalizationCoefficients()`
153-
now return a `namedtuple` of type `ColocalizationCoefficients`.
154-
155-
- The functions `dip.ChainCode.BoundingBox()` and `dip.Polygon.BoundingBox()` now return a `namedtuple`
156-
of type `BoundingBoxInteger` and `BoundingBoxFloat` respectively, which contain two `namedtuple`s of type
157-
`VertexInteger` or `VertexFloat`.
158-
159-
- Other `dip.Polygon` functions such as `dip.Polygon.Centroid()` now return a `namedtuple` of type `VertexFloat`.
160-
161-
- `dip.ChainCode.start` is now a `namedtuple` of type `VertexInteger`.
162-
163-
- The types `SubpixelLocationResult`, `RadonCircleParameters`, `RegressionParameters`, `GaussianParameters`,
164-
`FeatureInformation`, `ValueInformation`, `EllipseParameters`, `FeretValues`, `RadiusValues`, `QuartilesResult`,
165-
`StatisticsValues`, `CovarianceValues`, `MomentValues` and `SpatialOverlapMetrics`, all used only as outputs to
166-
functions, and all simply emulating a C++ `struct`, are no longer special types in the `diplib.PyDIP_bin` namespace,
167-
but `namedtuple`s. They new types behave identically, but can additionally be unpacked, for example:
168-
`_, q1, _, q3, _ = dip.Quartiles(img)`.
169-
170-
- `dip::Measurement::IteratorFeature` was bound in Python as `dip.Measurement.MeasurementFeature`, and
171-
`dip::Measurement::IteratorObject` as `dip.Measurement.MeasurementObject`. The names of these classes now
172-
match the C++ name, to make `dip.Doc()` useful with these classes. But the names don't make much sense in
173-
Python because these objects don't work as iterators like they do in C++.
174-
17546
(See also changes to *DIPlib*.)
17647

17748
### Bug fixes
@@ -192,8 +63,6 @@ None, but see bugfixes to *DIPlib*.
19263

19364
### Bug fixes
19465

195-
- The Java interface used `Native.loadLibrary()`, which was deprecated. It now uses `Native.load()` instead.
196-
19766
### Build changes
19867

19968

0 commit comments

Comments
 (0)