Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
581cdf2d
Commit
581cdf2d
authored
11 years ago
by
jakubs
Browse files
Options
Downloads
Patches
Plain Diff
BIS-665 SP-1202 fix the previous fix
SVN: 30590
parent
d8116840
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
screening/source/java/ch/systemsx/cisd/openbis/dss/etl/dto/api/transformations/IntensityRangeImageTransformerFactory.java
+8
-13
8 additions, 13 deletions
...ransformations/IntensityRangeImageTransformerFactory.java
with
8 additions
and
13 deletions
screening/source/java/ch/systemsx/cisd/openbis/dss/etl/dto/api/transformations/IntensityRangeImageTransformerFactory.java
+
8
−
13
View file @
581cdf2d
...
@@ -27,12 +27,10 @@ import ch.systemsx.cisd.common.image.IntensityRescaling.Channel;
...
@@ -27,12 +27,10 @@ import ch.systemsx.cisd.common.image.IntensityRescaling.Channel;
import
ch.systemsx.cisd.common.image.IntensityRescaling.Levels
;
import
ch.systemsx.cisd.common.image.IntensityRescaling.Levels
;
/**
/**
* Transformation performed by
* Transformation performed by {@link IntensityRescaling#rescaleIntensityLevelTo8Bits(BufferedImage, Levels)}.
* {@link IntensityRescaling#rescaleIntensityLevelTo8Bits(BufferedImage, Levels)}.
* <p>
* <p>
* Warning: The serialized version of this class can be stored in the database for each image.
* Warning: The serialized version of this class can be stored in the database for each image. Moving this class to a different package or changing it
* Moving this class to a different package or changing it in a backward incompatible way would make
* in a backward incompatible way would make all the saved transformations invalid.
* all the saved transformations invalid.
*
*
* @author Tomasz Pylak
* @author Tomasz Pylak
*/
*/
...
@@ -69,20 +67,17 @@ public class IntensityRangeImageTransformerFactory implements IImageTransformerF
...
@@ -69,20 +67,17 @@ public class IntensityRangeImageTransformerFactory implements IImageTransformerF
@Override
@Override
public
BufferedImage
transform
(
BufferedImage
image
)
public
BufferedImage
transform
(
BufferedImage
image
)
{
{
Levels
levels
=
new
Levels
(
blackPointIntensity
,
whitePointIntensity
);
if
(
IntensityRescaling
.
isNotGrayscale
(
image
))
if
(
IntensityRescaling
.
isNotGrayscale
(
image
))
{
{
EnumSet
<
Channel
>
channels
=
IntensityRescaling
.
getUsedRgbChannels
(
image
);
EnumSet
<
Channel
>
channels
=
IntensityRescaling
.
getUsedRgbChannels
(
image
);
if
(
channels
.
size
()
<=
1
)
if
(
channels
.
size
()
!=
1
)
{
return
image
;
}
else
{
{
Levels
levels
=
new
Levels
(
blackPointIntensity
,
whitePointIntensity
);
return
IntensityRescaling
.
rescaleIntensityLevelTo8Bits
(
image
,
levels
);
return
IntensityRescaling
.
rescaleIntensityLevelTo8Bits
(
image
,
levels
,
channels
.
iterator
().
next
());
}
}
return
IntensityRescaling
.
rescaleIntensityLevelTo8Bits
(
image
,
levels
,
channels
.
iterator
().
next
());
}
}
Levels
levels
=
new
Levels
(
blackPointIntensity
,
whitePointIntensity
);
return
IntensityRescaling
.
rescaleIntensityLevelTo8Bits
(
image
,
levels
);
return
IntensityRescaling
.
rescaleIntensityLevelTo8Bits
(
image
,
levels
);
}
}
};
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment