|
8 | 8 | * it under the terms of the GNU General Public License as |
9 | 9 | * published by the Free Software Foundation, either version 3 of the |
10 | 10 | * License, or (at your option) any later version. |
11 | | - * |
| 11 | + * |
12 | 12 | * This program is distributed in the hope that it will be useful, |
13 | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | 15 | * GNU General Public License for more details. |
16 | | - * |
| 16 | + * |
17 | 17 | * You should have received a copy of the GNU General Public |
18 | 18 | * License along with this program. If not, see |
19 | 19 | * <http://www.gnu.org/licenses/gpl-3.0.html>. |
@@ -72,7 +72,7 @@ public CSVImporter( final String filePath, |
72 | 72 | final double radius, |
73 | 73 | final String xColumnName, final String yColumnName, final String zColumnName, final String frameColumnName, |
74 | 74 | final String qualityColumn, final String nameColumn, final String idColumn, |
75 | | - final double xOrigin, final double yOrigin, final double zOrigin) |
| 75 | + final double xOrigin, final double yOrigin, final double zOrigin ) |
76 | 76 | { |
77 | 77 | this.filePath = filePath; |
78 | 78 | this.radius = radius; |
@@ -116,10 +116,11 @@ public boolean process() |
116 | 116 |
|
117 | 117 | try |
118 | 118 | { |
119 | | - final CSVFormat csvFormat = CSVFormat |
120 | | - .EXCEL |
121 | | - .withHeader() |
122 | | - .withCommentMarker( '#' ); |
| 119 | + final CSVFormat csvFormat = CSVFormat.EXCEL |
| 120 | + .builder() |
| 121 | + .setHeader() |
| 122 | + .setCommentMarker( '#' ) |
| 123 | + .get(); |
123 | 124 | records = csvFormat.parse( in ); |
124 | 125 | } |
125 | 126 | catch ( final IOException e ) |
@@ -208,10 +209,10 @@ public boolean process() |
208 | 209 | name = record.get( namecol ); |
209 | 210 |
|
210 | 211 | final Spot spot; |
211 | | - if (null != idcol) |
| 212 | + if ( null != idcol ) |
212 | 213 | { |
213 | 214 | // Hijack spot IDs: we force ID to match ID provided. |
214 | | - final int id = Integer.parseInt( record.get( idcol ) ); |
| 215 | + final int id = Integer.parseInt( record.get( idcol ) ); |
215 | 216 | spot = new Spot( id ); |
216 | 217 | spot.putFeature( Spot.POSITION_X, x ); |
217 | 218 | spot.putFeature( Spot.POSITION_Y, y ); |
@@ -275,7 +276,7 @@ public static void main( final String[] args ) |
275 | 276 | filePath, 30, |
276 | 277 | "x [nm]", "y [nm]", "z [nm]", "frame", |
277 | 278 | "photons", null, null, |
278 | | - 0., 0., 0.); |
| 279 | + 0., 0., 0. ); |
279 | 280 |
|
280 | 281 | if ( !importer.checkInput() || !importer.process() ) |
281 | 282 | { |
|
0 commit comments