use of org.karnak.backend.model.profiles.Defacing in project karnak by OsiriX-Foundation.
the class Profile method applyDefacing.
public void applyDefacing(Attributes dcmCopy, AttributeEditorContext context) {
ProfileItem profileItemDefacing = profiles.stream().filter(p -> p instanceof Defacing).findFirst().orElse(null);
if (profileItemDefacing != null) {
if (isCT(dcmCopy) && isAxial(dcmCopy)) {
if (profileItemDefacing.getCondition() == null) {
context.getProperties().setProperty(Defacer.APPLY_DEFACING, "true");
} else {
ExprCondition exprCondition = new ExprCondition(dcmCopy);
boolean conditionIsOk = (Boolean) ExpressionResult.get(profileItemDefacing.getCondition(), exprCondition, Boolean.class);
if (conditionIsOk) {
context.getProperties().setProperty(Defacer.APPLY_DEFACING, "true");
}
}
}
}
}
Aggregations