equal
deleted
inserted
replaced
5190 image mask isNil ifTrue:[ |
5190 image mask isNil ifTrue:[ |
5191 false "(Dialog confirm:'Generate mask from black ?' default:false)" ifTrue:[ |
5191 false "(Dialog confirm:'Generate mask from black ?' default:false)" ifTrue:[ |
5192 maskThreshold := 0.1. |
5192 maskThreshold := 0.1. |
5193 maskImage := Depth1Image fromImage:(image asThresholdMonochromeImage:maskThreshold). |
5193 maskImage := Depth1Image fromImage:(image asThresholdMonochromeImage:maskThreshold). |
5194 ] ifFalse:[ |
5194 ] ifFalse:[ |
5195 maskImage := Depth1Image extent:image extent. |
5195 maskImage := ImageMask extent:image extent. |
5196 maskImage bits:(ByteArray |
5196 maskImage bits:(ByteArray |
5197 new:(maskImage bytesPerRow * maskImage height) |
5197 new:(maskImage bytesPerRow * maskImage height) |
5198 withAll:16rFF). |
5198 withAll:16rFF). |
5199 |
5199 |
5200 "/ maskImage fillRectangle:(image bounds) withColor:(Color colorId:1). |
5200 "/ maskImage fillRectangle:(image bounds) withColor:(Color colorId:1). |
6679 |
6679 |
6680 LastSizeString := szString. |
6680 LastSizeString := szString. |
6681 LastColormapMode := cMapString. |
6681 LastColormapMode := cMapString. |
6682 |
6682 |
6683 (cMapMode startsWith: 'mask') ifTrue:[ |
6683 (cMapMode startsWith: 'mask') ifTrue:[ |
6684 image mask: (Depth1Image width: width height: height depth: 1 fromArray: (ByteArray new: width*height)) clearMaskedPixels |
6684 image mask: (ImageMask width: width height: height depth: 1 fromArray: (ByteArray new: width*height)) clearMaskedPixels |
6685 ]. |
6685 ]. |
6686 image colorMap: cMap. |
6686 image colorMap: cMap. |
6687 (imageEditView image: image) notNil ifTrue:[ |
6687 (imageEditView image: image) notNil ifTrue:[ |
6688 self updateListOfColorsAndColormapMode. |
6688 self updateListOfColorsAndColormapMode. |
6689 self updateLabelsAndHistory. |
6689 self updateLabelsAndHistory. |