Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Zellige-core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IdA Public
Zellige-core
Commits
a557eee4
Commit
a557eee4
authored
4 months ago
by
Céline TREBEAU
Browse files
Options
Downloads
Patches
Plain Diff
bug fix : wrong variable
parent
d4c8b4a2
No related branches found
No related tags found
2 merge requests
!47
Feature : Multi-channel and Binning
,
!41
Resolve "Consider rescaling (binning) large images"
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/fr/pasteur/ida/zellige/steps/projection/ProjectionParameters.java
+39
-39
39 additions, 39 deletions
...ur/ida/zellige/steps/projection/ProjectionParameters.java
with
39 additions
and
39 deletions
src/main/java/fr/pasteur/ida/zellige/steps/projection/ProjectionParameters.java
+
39
−
39
View file @
a557eee4
...
...
@@ -43,48 +43,48 @@ public class ProjectionParameters
{
this
.
delta
=
delta
;
this
.
offset
=
delta
;
this
.
offset
=
offset
;
this
.
projectionMethod
=
projectionMethod
;
}
/**
* Checks if the delta value is superior or equal to zero and throws an {@link DataValidationException} otherwise.
* @param value the delta value choose by the user. //TODO javadoc : extracted volume defined as delta x 2 + 1
* @throws DataValidationException - if the value is under zero.
*/
private
void
deltaValidationCheck
(
int
value
)
throws
DataValidationException
{
if
(
value
<
0
)
{
throw
new
DataValidationException
(
"The value of parameter Delta has to be superior to zero !"
);
}
}
/**
*
* @param projectionMethod the method choose to projection the extracted surface.
* @throws DataValidationException if the method is not implemented (implemented methods are MIP, Mean, Median and MinIP).
*/
private
void
projectionMethodValidationCheck
(
String
projectionMethod
)
throws
DataValidationException
{
if
(
!
projectionMethod
.
equals
(
"MIP"
)
&&
!
projectionMethod
.
equals
(
"Mean"
)
&&
!
projectionMethod
.
equals
(
"MinIP"
)
&&
!
projectionMethod
.
equals
(
"Median"
)
)
{
throw
new
DataValidationException
(
String
.
format
(
"The method %s is not implemented in Zellige !"
,
projectionMethod
)
);
}
}
/**
* Checks the validity of both parameters.
*
* @param delta the extracted stack parameters
* @param projectionMethod the method choose to projection the extracted surface.
* @throws DataValidationException if at least one parameter is not valid.
*/
private
void
projectionParametersValidationCheck
(
int
delta
,
String
projectionMethod
)
throws
DataValidationException
{
deltaValidationCheck
(
delta
);
projectionMethodValidationCheck
(
projectionMethod
);
}
//
/**
//
* Checks if the delta value is superior or equal to zero and throws an {@link DataValidationException} otherwise.
//
* @param value the delta value choose by the user. //TODO javadoc : extracted volume defined as delta x 2 + 1
//
* @throws DataValidationException - if the value is under zero.
//
*/
//
private void deltaValidationCheck( int value ) throws DataValidationException
//
{
//
if ( value < 0 )
//
{
//
throw new DataValidationException( "The value of parameter Delta has to be superior to zero !" );
//
}
//
}
//
//
/**
//
*
//
* @param projectionMethod the method choose to projection the extracted surface.
//
* @throws DataValidationException if the method is not implemented (implemented methods are MIP, Mean, Median and MinIP).
//
*/
//
private void projectionMethodValidationCheck( String projectionMethod ) throws DataValidationException
//
{
//
if ( ! projectionMethod.equals( "MIP" ) && ! projectionMethod.equals( "Mean" ) && ! projectionMethod.equals( "MinIP" ) && ! projectionMethod.equals( "Median" ) )
//
{
//
throw new DataValidationException( String.format( "The method %s is not implemented in Zellige !", projectionMethod ) );
//
}
//
}
//
//
/**
//
* Checks the validity of both parameters.
//
*
//
* @param delta the extracted stack parameters
//
* @param projectionMethod the method choose to projection the extracted surface.
//
* @throws DataValidationException if at least one parameter is not valid.
//
*/
//
private void projectionParametersValidationCheck( int delta, String projectionMethod ) throws DataValidationException
//
{
//
deltaValidationCheck( delta );
//
projectionMethodValidationCheck( projectionMethod );
//
}
public
int
getDelta
()
{
...
...
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