File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
weasis-core/src/main/java/org/weasis/core/api/media/data
weasis-dicom/weasis-dicom-codec/src/main/java/org/weasis/dicom/codec Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -264,7 +264,7 @@ protected Boolean doInBackground() {
264
264
}
265
265
266
266
private void loadThumbnail (
267
- final MediaElement media , final boolean keepMediaCache , final OpManager opManager ) {
267
+ final MediaElement media , boolean keepMediaCache , OpManager opManager ) {
268
268
try {
269
269
File file = thumbnailPath ;
270
270
boolean noPath = file == null || !file .canRead ();
@@ -310,6 +310,7 @@ private void loadThumbnail(
310
310
if (thumb == null || thumb .width () <= 0 ) {
311
311
readable = false ;
312
312
ImageConversion .releasePlanarImage (thumb );
313
+ keepMediaCache = false ;
313
314
} else {
314
315
mCache .put (this , thumb );
315
316
}
Original file line number Diff line number Diff line change @@ -55,9 +55,13 @@ public Set<SegContour> getLazyContours() {
55
55
56
56
private SegContour buildContour () {
57
57
PlanarImage binary = binaryMask .getImage ();
58
+ if (binary == null || binary .width () <= 0 ) {
59
+ return null ;
60
+ }
58
61
List <Segment > segmentList = Region .buildSegmentList (binary );
59
62
int pixelCount = Core .countNonZero (binary .toMat ());
60
63
ImageConversion .releasePlanarImage (binary );
64
+ binaryMask .removeImageFromCache ();
61
65
62
66
SegContour contour = new SegContour (String .valueOf (id ), segmentList , pixelCount );
63
67
region .addPixels (contour );
You can’t perform that action at this time.
0 commit comments