Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
706 changes: 202 additions & 504 deletions LICENSE

Large diffs are not rendered by default.

163 changes: 99 additions & 64 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>gov.nih.ncats</groupId>
<artifactId>molvec</artifactId>
<packaging>jar</packaging>
<version>0.9.10-SNAPSHOT</version>
<version>0.9.11</version>
<name>MolVec</name>


Expand Down Expand Up @@ -78,7 +78,7 @@

<properties>
<java.version>1.8</java.version>
<maven.compiler.plugin.version>2.3.2</maven.compiler.plugin.version>
<maven.compiler.plugin.version>3.8.1</maven.compiler.plugin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
Expand Down Expand Up @@ -118,21 +118,9 @@
<dependency>
<groupId>gov.nih.ncats</groupId>
<artifactId>molwitch-cdk</artifactId>
<version>1.0.14</version>
<version>1.0.26</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>gov.nih.ncats</groupId>
<artifactId>molwitch-renderer</artifactId>
<version>1.0.15</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.mortennobel</groupId>
<artifactId>java-image-scaling</artifactId>
<version>0.8.6</version>
<scope>test</scope>
</dependency>

</dependencies>

Expand All @@ -159,6 +147,12 @@
<source>${java.version}</source>
<target>${java.version}</target>
<compilerArgument>-proc:none</compilerArgument>
<testIncludes>
<testInclude>**/*Test.java</testInclude>
</testIncludes>
<testExcludes>
<testExclude>**/*IT.java</testExclude>
</testExcludes>
</configuration>
</plugin>
<plugin>
Expand All @@ -183,49 +177,6 @@
</descriptorRefs>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<use>false</use>
<use>false</use>
<source>1.8</source>
<links><link>http://docs.oracle.com/javase/7/docs/api/</link> <link>http://docs.oracle.com/javase/7/docs/api/</link></links>
<doclint>none</doclint>
</configuration>
</execution>
</executions>
</plugin>

</plugins>
</build>
<profiles>
Expand All @@ -246,18 +197,72 @@
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<id>attach-sources</id>
<goals>
<goal>sign</goal>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>

</plugins>
</build>
</profile>
<profile>
<id>release-signing</id>
<activation>
<property>
<name>performRelease</name>
<value>true</value>
</property>
</activation>

<build>
<plugins>
<plugin>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-maven-plugin</artifactId>
<version>1.18.20.0</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>delombok</goal>
</goals>
<configuration>
<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
<outputDirectory>${project.build.directory}/generated-sources/delombok</outputDirectory>
<addOutputDirectory>false</addOutputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.8.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>ossrh</publishingServerId>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
Expand All @@ -274,7 +279,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<sourcepath>${project.build.directory}/generated-sources/delombok</sourcepath>
<additionalparam>-Xdoclint:none</additionalparam>
<additionalOptions>-Xdoclint:none</additionalOptions>
<additionalJOption>-Xdoclint:none</additionalJOption>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
Expand All @@ -284,9 +294,34 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.2.8</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<keyname>${gpg.keyname}</keyname>
<passphraseServerId>${gpg.keyname}</passphraseServerId>
<gpgArguments>
<arg>--batch</arg>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
<arg>--no-tty</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

</profiles>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,8 @@ private static BufferedImage toGrayScale(BufferedImage image){
/**
* Create a new {@link StructureImageExtractor}, using a given {@link Raster}.
* @param raster the raster to be processed
* @throws Exception
* @throws IOException if the raster cannot be processed
* @throws InterruptedException if processing is interrupted
*/
public StructureImageExtractor(Raster raster)throws IOException, InterruptedException{
this(raster, false);
Expand All @@ -326,7 +327,7 @@ public StructureImageExtractor(Raster raster)throws IOException, InterruptedExce
* which can be obtained via {@link #getCtabRaw()}.
* @param raster the raster to be processed
* @param debug if true, print debug information to standard out
* @throws Exception
* @throws IOException if the raster cannot be processed
*/
public StructureImageExtractor(Raster raster, boolean debug )throws IOException{
this.DEBUG = debug;
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/gov/nih/ncats/molvec/internal/util/GeomUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -1190,8 +1190,7 @@ public boolean contains(Point2D p) {
*
* Where A is the signed area of the polygon. For shapes with near zero area, the center of the bounding box is returned instead.
*
* @param s1
* @return
* @return the center of mass
*/
public Point2D centerOfMass(){

Expand Down Expand Up @@ -1228,7 +1227,6 @@ public Point2D centerOfBounds(){
* This method scales the shape based on its bounding box. The value given will scale the shape
* such that the new bounding box width is 2*dr larger than it was before. Note that this
* may scale a shape quite differently depending on whether they are "tall" or "wide"
* @param s
* @param dr
* @return
*/
Expand Down Expand Up @@ -2821,8 +2819,10 @@ public static Optional<ShapeWrapper> getIntersectionShape(ShapeWrapper s1, Shape
* so that the first point (P1) is on the origin, and then taking the signed "rejection" of the the
* vector from P1->P3 onto the vector P1->P2. That value, multiplied by the length of P1->P2 gives
* the area of the parallelogram. Divide the answer by 2, and it's the area of the triangle.
* @param verts
* @return
* @param p1 the first triangle point
* @param p2 the second triangle point
* @param p3 the third triangle point
* @return the signed triangle area
*/
public static double areaTriangle(Point2D p1, Point2D p2, Point2D p3){
//base x height
Expand All @@ -2842,8 +2842,8 @@ public static double areaTriangle(Point2D p1, Point2D p2, Point2D p3){
* Returns the signed area of a triangle, assuming that a CW orientation is positive,
* and a CCW orientation is negative. This just delegates to the {@link #areaTriangle(Point2D, Point2D, Point2D)}
* method.
* @param s
* @return
* @param s the triangle shape
* @return the signed triangle area
*/
public static double areaTriangle(Shape s){
Point2D[] pts=vertices(s);
Expand Down
Loading
Loading