text:
Data Mapping
============

The data mapping defines which `OSM feature types <http://wiki.openstreetmap.org/wiki/Map_Features>`_ should be imported in which table. The mapping is a YAML (or JSON) file.

See `example-mapping.yml <https://raw.githubusercontent.com/omniscale/imposm3/master/example-mapping.yml>`_ for an example.

.. note::
  The `YAML format <https://en.wikipedia.org/wiki/YAML>`_ uses indentations to indicate nesting. Tab characters are not allowed.
  Quotes around simple strings are optional with YAML. ``"simple_string"``, ``'simple_string'`` and ``simple_string`` are all equal. However, numbers and boolean values (``yes``, ``no``, ``true``, ``false``) need to be quoted when they should be interpreted as a string (for example, when filtering ``building: ['no']``).

Tables
------

The most important part is the ``tables`` definition. Each table is a YAML object with the table name as the key. Each table has a ``type``, a mapping definition and ``columns``.

``type``
~~~~~~~~

``type`` can be ``point``, ``linestring``, ``polygon``, ``geometry``, ``relation`` and ``relation_member``. ``geometry`` requires a special ``type_mappings``. :doc:`Relations are described in more detail here <relations>`.

``mapping``
~~~~~~~~~~~

``mapping`` defines which OSM key/values an element needs to have to be imported into this table. ``mapping`` is a YAML object with the OSM `key` as the object key and a list of all OSM `values` to be matched as the object value.
You can use ``__any__`` to match all values (e.g. ``amenity: [__any__]``). To match elements regardless of their tags use ``__any__: [__any__]``. You need to use :ref:`load_all<tags>` in this case so that Imposm has access to all tags.

To import all polygons with `tourism=zoo`, `natural=wood` or `natural=land` into the ``landusages`` table:

.. code-block:: yaml
   :emphasize-lines: 4-6

    tables:
      landusages:
        type: polygon
        mapping:
          natural: [wood, land]
          tourism: [zoo]
        …

``relation_types``
~~~~~~~~~~~~~~~~~~

``relation_types`` restricts which relation types should be imported. It is a list with `type` values, e.g. ``[route, master_route]``.

For tables of type ``relation`` and ``relation_member``: Only import relations which have this type value. You still need to have a mapping.

For tables of type ``polygon``: Only build multi-polygons for relations which have this type value. You still need to have a mapping. Defaults to ``[multipolygon, boundary, land_area]``.

.. code-block:: yaml

    tables:
      routes:
        type: relation
        relation_types: [route]
        mapping:
          route: [bus]

``columns``
~~~~~~~~~~~

``columns`` is a list of columns that Imposm should create for this table. Each column is a YAML object with a ``type`` and a ``name`` and optionally ``key``, ``args`` and ``from_member``.  The legacy name of ``columns`` parameter is ``fields``, but it should not be used. If both ``columns`` and ``fields`` exist in the same mapping, ``fields`` will be used. Support for ``fields` will be removed in the future versions.

``name``
^^^^^^^^^

This is the name of the resulting column.

``type``
^^^^^^^^

This defines the data type that Imposm should use for this column. There are two different classes of types. `Value types` are types that convert OSM tag values to a specific database type. Examples are ``string`` for street or place names, or ``bool`` for ``yes``, ``no``, ``true`` or ``false`` values.
`Element types` are types that dependent on the OSM element (node/way/relation). Examples are ``geometry`` for the geometry, ``mapping_key`` and ``mapping_value`` for the actual key and value that was mapped.

See :ref:`column_types` for documentation of all types.

``key``
^^^^^^^

``key`` defines the OSM `key` that should be used for this column. This is required for all `value types`.

``args``
^^^^^^^^

Some column types require additional arguments. Refer to the documentation of the type.

``from_member``
^^^^^^^^^^^^^^^

``from_member`` is only valid for tables of the type ``relation_member``. If this is set to ``true``, then tags will be used from the member instead of the relation.

``filters``
~~~~~~~~~~~

You can limit which elements should be inserted into a table with filters.
You can ``require`` specific tags or ``reject`` elements that have specific tags.
``require`` and ``reject`` accept keys and a list of values, similar to a ``mapping``. You can use ``__any__`` to require or reject all values (e.g. ``amenity: [__any__]``).

``require_regexp`` and ``reject_regexp`` can be used to filter values based on a regular expression. You can use the `Go Regex Tester <https://regex-golang.appspot.com/assets/html/index.html>`_ to test your regular expressions.

The following mapping only imports buildings with a `name` tag. Buildings with ``building=no`` or ``building=none`` or buildings with a non-numeric level are not imported.

.. code-block:: yaml

    tables:
      buildings:
        type: polygon
        filters:
          require:
            name: [__any__]
          reject:
            building: ['no', none]
          reject_regexp:
            level: '^\D+.*$'
        mapping:
          building: [__any__]
        columns:
          ...

.. note::

  Regular expressions in ``require_regexp`` and ``reject_regexp`` should be enclosed in single quotes (``'``). Otherwise YAML will interpret backslashes as escape sequences.

.. note::

  You can only filter tags that are referenced in the ``mapping`` or ``columns`` of any table. See :ref:`tags` on how to make additional tags available for filtering.

Example
~~~~~~~

The mapping below will create a ``tracks`` table with the following columns:

- ``osm_id`` with the ID of the way
- ``the_geom`` with a `LineString` geometry
- ``street_name`` with the content of the OSM `name` tag
- ``is_bridge`` with a ``true`` value if the OSM `bridge` tag is `true`-ish (``1``, ``yes`` or ``true``), otherwise it will be ``false``
- ``highway_type`` with the OSM `value` that was matched by the ``mapping`` of this table. In this example one of ``path``, ``track``, or ``classified``.

.. code-block:: yaml

    tables:
      tracks:
        type: linestring
        mapping:
          highway: [path, track, unclassified]
        columns:
        - {name: osm_id, type: id}
        - {name: the_geom, type: geometry}
        - {key: name, name: street_name, type: string}
        - {key: bridge, name: is_bridge, type: bool}
        - {name: highway_type, type: mapping_value}

``mappings``
~~~~~~~~~~~~

An OSM element is only inserted once even if a mapping matches multiple tags. Sometime it's convenient to have a geometry multiple times, e.g. a way with ``rail=tram`` and ``highway=secondary``.
``mappings`` allows to define multiple sub-mappings. Each sub-mapping requires a name and a separate mapping dictionary. The elements will be inserted into the table for each match of a sub-mapping.

.. code-block:: yaml
   :emphasize-lines: 4-10

    tables:
      transport:
        type: linestring
        mappings:
          rail:
            mapping:
              rail: [__any__]
          roads:
            mapping:
              highway: [__any__]
          …

``type_mappings``
~~~~~~~~~~~~~~~~~

A ``table`` with a ``type`` of ``geomery`` can contain different geometry types, such as points, linestrings, and/or polygons.
The ``type_mappings`` provides separate mapping for the required geometries types.

.. code-block:: yaml
   :emphasize-lines: 11-21

    tables:
      all:
        columns:
          - name: osm_id
            type: id
          - name: geometry
            type: geometry
          - name: tags
            type: hstore_tags
        type: geometry
        type_mappings:
          points:
            amenity: [__any__]
            poi: [__any__]
            shop: [__any__]
          linestrings:
            highway: [__any__]
          polygons:
            landuse: [__any__]
            poi: [__any__]
            shop: [__any__]

.. _column_types:

Column types
------------

Value types
~~~~~~~~~~~

``bool``
^^^^^^^^

Convert ``true``, ``yes`` and ``1`` values to ``true``, otherwise use ``false``.

``boolint``
^^^^^^^^^^^

Same as ``bool`` but stores a numeric ``1`` for ``true`` values, and ``0`` otherwise.

``string``
^^^^^^^^^^

The value as-is. Note that missing values will be inserted as an empty string and not as ``null``. This allows SQL queries like ``column NOT IN ('a', 'b')``.

``direction``
^^^^^^^^^^^^^

Convert ``true``, ``yes`` and ``1`` to the numeric ``1``, ``-1`` values to ``-1`` and other values to ``0``. This is useful for oneways where a -1 signals that a oneway goes in the opposite direction of the geometry.

``integer``
^^^^^^^^^^^

Convert values to an integer number. Other values will not be inserted. Useful for ``admin_levels`` for example.

``enumerate``
^^^^^^^^^^^^^

Enumerates a list of values and stores tag values as an integer.

The following `enum` column will contain ``1`` for ``landuse=forest``, ``4`` for ``landuse=grass`` and ``0`` for undefined values.

.. code-block:: yaml

  columns:
    - name: enum
      type: enumerate
      key: landuse
      args:
          values:
             - forest
             - park
             - cemetery
             - grass

``mapping_value`` will be used when ``key`` is not set or ``null``.

``wayzorder``
^^^^^^^^^^^^^

Calculate the z-order of an OSM highway or railway. Returns a numeric value that represents the importance of a way where ``motorway`` is the most important (9), and ``path`` or ``track`` are least important (0). ``bridge`` and ``tunnel``  will modify the value by -10/+10. ``layer`` will be multiplied by ten and added to the value. E.g. ``highway=motorway``, ``bridge=yes`` and ``layer=2`` will return 39 (9+10+2*10).

You can define your own ordering by adding a list of ``ranks``. The z-order value will be the index in the list (starting with 1). ``bridge``, ``tunnel``, and ``layer`` will modify the value by the number of items in the ``ranks`` list, instead of 10.
Use ``default`` to set the default rank.

::

  columns:
    - name: zorder
      type: wayzorder
      args:
          default: 5
          ranks:
             - footway
             - path
             - residential
             - primary
             - motorway

A ``motorway`` will have a ``zorder`` value of 5, a ``residential`` with ``bridge=yes`` will be 8 (3+5).

``categorize``
^^^^^^^^^^^^^^

Stores a number depending on a value, similar to ``enumerate``. However, ``categorize`` allows you to explicitly configure the number for each value, multiple values can have the same number and it can search in multiple keys. You can use this to implement a scale rank for sorting elements depending on their relative importance.

::

    - args:
        default: 0
        values: {
          FR: 10, NL: 8, LU: 3,
        }
      keys:
      - country_code_iso3166_1_alpha_2
      - ISO3166-1:alpha2
      - ISO3166-1
      name: scalerank
      type: categorize_int

``geojson_intersects`` and ``geojson_intersects_field``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Checks whether the geometry of the element intersects geometries from a provided GeoJSON file. ``geojson_intersects`` returns true if it intersects any geometry. ``geojson_intersects_field`` returns a string property of the intersected feature.

::

    - args:
        geojson: special_interest_areas.geojson
      name: in_special_interest_area
      type: geojson_intersects

::

    - args:
        geojson: special_interest_areas.geojson
        property: area
      name: special_interest_area_name
      type: geojson_intersects_field

Element types
~~~~~~~~~~~~~

``id``
^^^^^^

The ID of the OSM node, way or relation. Relation IDs are negated (-1234 for ID 1234) to prevent collisions with way IDs.

``mapping_key``
^^^^^^^^^^^^^^^

The OSM `key` that was matched by this table mapping (`highway`, `building`, `nature`, `landuse`, etc.).

.. note:: Imposm will choose the first key of the table mapping if an OSM element has multiple tags that match.
  For example: `mapping_key` will use `natural` for an OSM element with `landuse=forest` and `natural=wood` tags, if `natural` comes before `landuse` in the table mapping. You need to define an explicit column if you need the value of a specific tag (e.g. `{"type": "string", "name": "landuse", "key": "landuse"}`).

``mapping_value``
^^^^^^^^^^^^^^^^^

The OSM `value` that was matched by this table mapping (`primary`, `secondary`, `yes`, `forest`, etc.).

.. note:: The note of ``mapping_key`` above applies to ``mapping_values`` as well.

``geometry``
^^^^^^^^^^^^

The geometry of the OSM element.

``validated_geometry``
^^^^^^^^^^^^^^^^^^^^^^

Like `geometry`, but the geometries will be validated and repaired when this table is used as a source for a generalized table. Must only be used for `polygon` tables.

``area``
^^^^^^^^

Area of polygon geometries in the unit of the selected projection (m² or degrees²). Note that the area is only accurate at the equator for EPSG:4326 and EPSG:3857 and gets off the more the geometry moves to the poles. It's still good enough to sort features by area for rendering purposes.

``webmerc_area``
^^^^^^^^^^^^^^^^

Area of polygon geometries in m². This field only works for the webmercator projection (EPSG:3857). The latitude of the geometry is considered when calculating the area. `This area is not precise`. Polygons lower than 70° latitude should have a ``webmerc_area`` within ±20% of the true size. However, long polygons like a runway can exhibit a much larger error.

``hstore_tags``
^^^^^^^^^^^^^^^

Stores tags in an `hstore` column. Requires the `PostgreSQL hstore extension <http://www.postgresql.org/docs/9.6/static/hstore.html>`_. You can select tags with the ``include`` option, otherwise all tags will be inserted.

In any case, ``hstore_tags`` will only insert tags that are referenced in the ``mapping`` or ``columns`` of any table. See :ref:`tags` on how to make additional tags available for import.

.. TODO
.. "string_suffixreplace": {"string_suffixreplace", "string", nil, MakeSuffixReplace},

Element types for ``relation_member``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The following types are only valid for tables of the type ``relation_member``.

``member_id``
^^^^^^^^^^^^^

The OSM ID of the relation member.

``member_type``
^^^^^^^^^^^^^^^

The type of the relation member. 0 for nodes, 1 for ways and 2 for relations.

``member_role``
^^^^^^^^^^^^^^^

The role of the relation member as a string, e.g. `outer`, `stop`, etc.

``member_index``
^^^^^^^^^^^^^^^^

The index of the member in the relation, starting from 0. E.g. the first member is 0, second member is 1, etc.
This can be used to query bus stops of a route relation in the right order.

Generalized Tables
------------------

Generalized tables allow you to create a copy of an imported table with simplified/generalized geometries. You can use these generalized tables for rendering low map scales, where a high spatial resolution is not required.

Each generalize table is a YAML object with the new table name as the key. Each generalize table has a ``source`` and a ``tolerance`` and optionally an ``sql_filter``.

``source`` is the table name of another Imposm table from the same mapping file. You can also reference another generalized table, to create multiple generalizations of the same data.

``tolerance`` is the `resolution` used for the Douglas-Peucker simplification. It has the same unit as the import `-srid`, i.e. meters for EPSG:3857 and degrees for EPSG:4326. Imposm uses `PostGIS ST_SimplifyPreserveTopology <http://postgis.net/docs/ST_SimplifyPreserveTopology.html>`_.

The optional ``sql_filter`` can be used to limit the rows that will be generalized. You can use it to drop geometries that are to small for the target map scale.

.. code-block:: yaml

    generalized_tables:
      waterareas_gen_50:
        source: waterareas
        sql_filter: ST_Area(geometry)>50000.000000
        tolerance: 50.0

.. _tags:

Tags
----

Imposm caches only tags that are required for a ``mapping`` or for any ``columns``. This keeps the cache small as it does not store any tags that are not required for the import. You can change this if you want to import other tags, e.g with the ``hstore_tags`` column type.

Add ``load_all`` to the ``tags`` object inside your mapping file. You can still exclude tags with the ``exclude`` option. ``exclude`` supports a simple shell file name pattern matching. ``exclude`` has only effect when ``load_all`` is enabled.

Alternatively you can list all tags that you want to include with the ``include`` option. ``include`` does not support pattern matching and it has no effect when ``load_all`` is used.

To load all tags except ``created_by``, ``source``, and ``tiger:county``, ``tiger:tlid``, ``tiger:upload_uuid``, etc:

.. code-block:: yaml

    tags:
      load_all: true,
      exclude: [created_by, source, "tiger:*"]

To load specific data about amenities for inclusion into an `hstore_tags` column:

.. code-block:: yaml

    tags:
      include: [operator, opening_hours, wheelchair, website, phone, cuisine]

.. _Areas:

Areas
-----

A closed way is way where the first and last nodes are identical. These closed ways are used to represent elements like building, forest or park polygons, but they can also represent linear (non-polygon) features, like a roundabout or a race track.

OpenStreetMap uses the `area <http://wiki.openstreetmap.org/wiki/Key:area>`_ tag to specify if a closed way is an area (polygon) or a linear feature (linestring). For example ``highway=pedestrian, area=yes`` is a polygon feature.

By default, Imposm inserts all closed ways into polygon tables as long as ``area`` is not ``no`` and linestring tables will contain all closed ways as long as the ``area`` is not ``yes``.
However, the ``area`` tag is missing from most OSM elements, as buildings, landuse, etc. should be interpreted as ``area=yes`` by default and highways for example are ``area=no`` by default.

You can configure these default interpretations with the ``areas`` option.

.. code-block:: yaml

    areas:
      area_tags: [building, landuse, leisure, natural, aeroway]
      linear_tags: [highway, barrier]

With this ``areas`` configuration, ``highway`` elements are only inserted into polygon tables if there is an ``area=yes`` tag. ``aeroway`` elements are only inserted into linestring tables if there is an ``area=no`` tag.


text:
Database and Storage
====================

BlockBall uses .yaml files to store meta information about your configured arenas.

Also, BlockBall uses a SQLite database per default which is the file called BlockBall.db to store stats for your players like winrate, amount of participation in games.

If you rename or delete the file it gets automatically regenerated but all of your saves are lost. So it might be
useful to copy the BlockBall plugin folder from time to time in order to create backups.

One option you should consider is using a MySQL database instead of a SQLite database for stats, the advantages and how to set it up
are listed `here. <../faq/howmysql.html>`_

Editing the arena files
~~~~~~~~~~~~~~~~~~~~~~~

You can also edit the files directly without using the Ingame Chat-UI, however many unexpected errors can occur.

The arena files are located in the following folder (The folder and file icons may differ to your system):

.. image:: ../_static/images/storage1.png

.. image:: ../_static/images/storage2.png

.. image:: ../_static/images/storage3.png

.. image:: ../_static/images/storage4.png

redpajama_set_name: RedPajamaGithub


text:
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>http::basic_fields::find</title>
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../index.html" title="Chapter 1. Boost.Beast">
<link rel="up" href="../boost__beast__http__basic_fields.html" title="http::basic_fields">
<link rel="prev" href="erase/overload3.html" title="http::basic_fields::erase (3 of 3 overloads)">
<link rel="next" href="find/overload1.html" title="http::basic_fields::find (1 of 2 overloads)">

Home
Libraries
People
FAQ
More

http::basic_fields::find

Returns an iterator to the case-insensitive matching
          field.

const_iterator
find(
    field name) const;
  » more...

          Returns an iterator to the case-insensitive matching field name.

const_iterator
find(
    string_view name) const;
  » more...

Copyright © 2016, 2017 Vinnie Falco

        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)


text:
using System;
using System.Runtime.InteropServices;

namespace SharpVk.Interop
{
    /// <summary>
    ///
    /// </summary>
    [StructLayout(LayoutKind.Sequential)]
    public unsafe partial struct PhysicalDevicePointClippingProperties
    {
        /// <summary>
        /// The type of this structure.
        /// </summary>
        public SharpVk.StructureType SType;

        /// <summary>
        /// Null or an extension-specific structure.
        /// </summary>
        public void* Next;

        /// <summary>
        ///
        /// </summary>
        public SharpVk.PointClippingBehavior PointClippingBehavior;
    }
}


text:
package de.gessnerfl.fakesmtp.config;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.InjectionPoint;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;

@Configuration
public class LoggerConfig {

    @Bean
    @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
    public Logger logger(InjectionPoint ip){
        return LoggerFactory.getLogger(ip.getMember().getDeclaringClass());
    }
}


text:
package com.mindorks.placeholderview.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Created by janisharali on 16/02/18.
 */
@Retention(RetentionPolicy.SOURCE)
@Target(ElementType.METHOD)
public @interface Recycle {
}


text:
#include "WayPoint.hpp"
#include <sstream>
#include "Logger.hpp"

/**
 *
 */
WayPoint::WayPoint( const std::string& aName) :
				name( aName)
{
}
/**
 *
 */
WayPoint::WayPoint( const std::string& aName,
					const Point& aPosition) :
				name( aName),
				position( aPosition)
{
}
/**
 *
 */
WayPoint::~WayPoint()
{
}
/**
 *
 */
void WayPoint::setName( const std::string& aName)
{
	name = aName;
	notifyObservers();
}
/**
 *
 */
Size WayPoint::getSize() const
{
	return size;
}
/**
 *
 */
void WayPoint::setSize( const Size& aSize,
						bool aNotifyObservers /*= true*/)
{
	size = aSize;
	if (aNotifyObservers == true)
	{
		notifyObservers();
	}
}
/**
 *
 */
void WayPoint::setPosition( const Point& aPosition,
							bool aNotifyObservers /*= true*/)
{
	position = aPosition;
	if (aNotifyObservers == true)
	{
		notifyObservers();
	}
}
/**
 *
 */
Region WayPoint::getRegion() const
{
	// x and y are pointing to top left now
	int x = position.x - (size.x / 2);
	int y = position.y - (size.y / 2);

	Point originalUpperLeft( x, y);
	Point originalUpperRight( x + size.x, y);
	Point originalBottomLeft( x, y + size.y);
	Point originalBottomRight( x + size.x, y + size.y);

	Point originalPoints[] = { originalUpperRight, originalUpperLeft, originalBottomLeft, originalBottomRight };

	return Region( 4, originalPoints);
}
/**
 *
 */
bool WayPoint::intersects( const Region& aRegion) const
{
	return getRegion().Intersect( aRegion);
}
/**
 *
 */
std::string WayPoint::asString() const
{
	std::ostringstream os;

	os << "WayPoint " << name << " at (" << position.x << "," << position.y << ")";

	return os.str();
}
/**
 *
 */
std::string WayPoint::asDebugString() const
{
	std::ostringstream os;

	os << "WayPoint:\n";
	os << name << " at (" << position.x << "," << position.y << ")";

	return os.str();
}


text:
<?php

namespace App\Services;

use Dotenv\Dotenv;
use Illuminate\Database\Capsule\Manager as Capsule;

class Boot
{
    public static function loadEnv()
    {
        // Env
        $env = new Dotenv(BASE_PATH);
        $env->load();
    }

    public static function setDebug()
    {
        // debug
        if (Config::get('debug') == "true") {
            define("DEBUG", true);
        }
    }

    public static function setVersion($version)
    {
        $System_Config['version'] = $version;
    }

    public static function setTimezone()
    {
        // config time zone
        date_default_timezone_set(Config::get('timeZone'));
    }

    public static function bootDb()
    {
        // Init Eloquent ORM Connection
        $capsule = new Capsule;
        $capsule->addConnection(Config::getDbConfig(), 'default');
        if (Config::get('enable_radius')=='true') {
            $capsule->addConnection(Config::getRadiusDbConfig(), 'radius');
        }

        if (Config::get('enable_wecenter')=='true') {
            $capsule->addConnection(Config::getWecenterDbConfig(), 'wecenter');
        }
        $capsule->bootEloquent();
    }
}


text:
var injector   = require('injector')
  , Sequelize  = require('sequelize')
  , debug      = require('debug')
  , utils      = require('utils')
  , Module     = injector.getInstance('Module')
  , Model      = injector.getInstance('Model')
  , inflect    = injector.getInstance('inflect')
  , ormLib     = utils.model.orm;

module.exports = Module.extend(
{
  models: {},

  /**
   * A stored reference to the instance of sequelize that has a database connection
   * @type {Sequelize}
   */
  sequelize: null,

  /**
   * preSetup event hook, that gets emitted inside of this.setup() before anything is actually done,
   * this forms part of the constructor for this module.
   *
   * We use this hook to setup a connection to the DB (through sequelize) and to setup any and all
   * debugging options that are available.
   *
   * @return {undefined}
   */
  preSetup: function() {
    var dbConfig    = this.config.db
      , queryLogger = debug('cleverstack:queryLog');

    if (!!dbConfig.options.logging || queryLogger.enabled) {
      if (!queryLogger.enabled) {
        debug.enable('cleverstack:queryLog');
        queryLogger = debug('cleverstack:queryLog');
      }
      dbConfig.options.logging = queryLogger;
    }

    if (this.debug.enabled) {
      this.debug('Opening database connection to ' + dbConfig.options.dialect + '...');
    }
    this.sequelize = new Sequelize(dbConfig.database, dbConfig.username, dbConfig.password, dbConfig.options);
  },

  /**
   * preInit event hook, that gets emitted inside of this.init() before anything is actually done,
   * this forms part of the constructor for this module.
   *
   * We use this hook to add sequelize dependencies into the injector
   *
   * @return {undefined}
   */
  preInit: function() {
    injector.instance('Sequelize', Sequelize);
    injector.instance('sequelize', this.sequelize);
  },

  /**
   * modulesLoaded event hook, that gets emitted by the ModuleLoader after all modules,
   * have loaded, including all of their models, so now we can define all of their associations.
   *
   * After associating every model with their associated models we must emit the 'ready' event
   * so that the ModuleLoader can progress its load() further.
   *
   * @return {undefined}
   */
  modulesLoaded: function() {
    ormLib.associations.define.apply(this, [this.config.modelAssociations]);
    this.emit('ready');
  },

  parseModelSchema: function(Static) {
    var parseDebug = this.proxy(function(msg) {
        this.debug(Static.modelName + 'Model: ' + msg);
      })
      , sequelizeConf = { paranoid: false, timestamps: false }
      , fields = {};

    if (this.models[Static.modelName] !== undefined) {
      parseDebug('Returning previously parsed and generated model...');
      return this.models[Static.modelName];
    }

    parseDebug('Parsing schema for model...');
    Object.keys(Static.fields).forEach(this.proxy('defineField', Static, fields));

    parseDebug('Configuring static object for sequelize...');

    this.setupOptions(parseDebug, sequelizeConf, Static);

    this.setupBehaviours(parseDebug, sequelizeConf, Static);

    // @TODO this is a templ hack to get functions available for queries
    Static.fn = this.sequelize.fn;
    Static.col = this.sequelize.col;

    parseDebug('Setting sequelize as the connection (adapter) for the Model...');
    Static.connection = this.sequelize;

    parseDebug('Generating new sequelize model using computed schema...');
    var model = this.sequelize.define(Static.modelName, fields, sequelizeConf);

    parseDebug('Caching completed native model...');
    this.models[Static.modelName] = model;

    return model;
  },

  setupOptions: function(parseDebug, sequelizeConf, Static) {
    parseDebug('Setup options...');

    if (Static.dbName !== false ) {
      parseDebug('Setting dbName=' + Static.dbName + ' (sequelize tableName option)...');
      sequelizeConf.tableName = Static.dbName;
    }

    if (Static.freezeDbName !== false) {
      parseDebug('Setting freezeDbName=' + Static.freezeDbName + ' (sequelize freezeTableName option)...');
      sequelizeConf.freezeTableName = Static.freezeDbName;
    }

    if (Static.underscored !== undefined) {
      parseDebug('Setting underscored=' + Static.underscored + '...');
      sequelizeConf.underscored = Static.underscored;
    }

    if (Static.engine !== false) {
      parseDebug('Setting engine=' + Static.engine + '...');
      sequelizeConf.engine = Static.engine;
    }

    if (Static.charset !== false ) {
      parseDebug('Setting charset=' + Static.charset + '...');
      sequelizeConf.charset = Static.charset;
    }

    if (Static.comment !== false ) {
      parseDebug('Setting comment=' + Static.comment + '...');
      sequelizeConf.comment = Static.comment;
    }

    if (Static.collate !== false ) {
      parseDebug('Setting collate=' + Static.collate + '...');
      sequelizeConf.collate = Static.collate;
    }

    if (Static.indexes !== false) {
      parseDebug('Setting indexes...');
      sequelizeConf.indexes = Static.indexes;
    }
  },

  setupBehaviours: function(parseDebug, sequelizeConf, Static) {
    parseDebug('Setup behaviours...');

    if (!!Static.softDeletable) {
      parseDebug('is softDeletable (' + Static.deletedAt + ')');

      sequelizeConf.paranoid = Static.softDeletable;
      sequelizeConf.deletedAt = Static.deletedAt;

      if (Static.deletedAt !== 'deletedAt') {
        Static.aliases.push({
          key         : 'deletedAt',
          columnName  : Static.deletedAt
        });
      }
    }

    if (!!Static.timeStampable) {
      parseDebug('is timeStampable (' + Static.timeStampable + ')');

      sequelizeConf.timestamps = Static.timeStampable;
      sequelizeConf.createdAt = Static.createdAt;
      sequelizeConf.updatedAt = Static.updatedAt;
    }
  },

  defineField: function(Static, fields, name) {
    var fieldDefinition = {}
      , columnName      = name
      , options         = Static.fields[name];

    // Allow direct syntax
    if (typeof options !== 'object' || options instanceof Array) {
      options = {
        type: options
      };
    }

    // Handle array of "Something"
    if (options.type instanceof Array || options.type === Array) {
      options.of = (options.type.length > 0 && options.type[0] !== undefined) ? options.type[0] : String;
      options.type = Array;
    }

    // Get the type
    fieldDefinition.type = this.getFieldType(Static, options, name);

    if (options.columnName) {
      columnName      = options.columnName;
      options.field   = columnName;
    } else if (!!Static.underscored && inflect.underscore(name).split('_').length > 1) {
      columnName      = inflect.underscore(name);
      options.field   = columnName;
    }

    // Handle options
    ['allowNull', 'primaryKey', 'autoIncrement', 'unique', 'default', 'comment'].forEach(function(optionName) {
      if (options[optionName] !== undefined) {
        if (optionName === 'primaryKey') {
          Static.primaryKeys.push(name);
          if (!Static.primaryKey) {
            Static.hasPrimaryKey = true;
            Static.singlePrimaryKey = true;
            Static.primaryKey = name;
          } else {
            Static.singlePrimaryKey = false;
          }
        }

        fieldDefinition[optionName === 'default' ? 'defaultValue' : optionName] = options[optionName];
      }
    });

    fields[columnName] = fieldDefinition;
  },

  getFieldType: function(Static, options, name) {
    var field;

    switch(options.type.type || options.type) {

    case Number:
      field = this.numberType(options);
      break;
    case String:
      if (options.length) {
        field = Sequelize.STRING(options.length);
      } else {
        field = Sequelize.STRING;
      }
      break;
    case Boolean:
      field = Sequelize.BOOLEAN;
      break;
    case Date:
      field = Sequelize.DATE;
      break;
    case Array:
      field = options.of ? Sequelize.ARRAY(this.getFieldType(Static, { type: options.of })) : Sequelize.ARRAY(Sequelize.STRING);
      break;
    case Buffer:
      field = Sequelize.STRING.BINARY;
      break;
    case Model.Types.ENUM:
      field = Sequelize.ENUM(options.values);
      break;
    case Model.Types.TINYINT:
      field = this.tinyIntType(options);
      break;
    case Model.Types.BIGINT:
      field = this.bigIntType(options);
      break;
    case Model.Types.FLOAT:
      field = this.floatType(options);
      break;
    case Model.Types.DECIMAL:
      field = this.decimalType(options);
      break;
    case Model.Types.TEXT:
      field = Sequelize.TEXT;
      break;
    case undefined:
      throw new Error(['You must define the type of field that', '"' + name + '"', 'is on the', '"' + Static.modelName + '" model'].join(' '));
    default:
      throw new Error(['You must define a valid type for the field named', '"' + name + '"', 'on the', '"' + Static.modelName + '" model'].join(' '));
    }

    return field;
  },

  numberType: function(options) {
    var field = !!options.length ? Sequelize.INTEGER(options.length) : Sequelize.INTEGER;
    if (!!options.unsigned && !!options.zerofill) {
      field = field.UNSIGNED.ZEROFILL;
    } else if (!!options.unsigned && !options.zerofill) {
      field = field.UNSIGNED;
    } else if (!options.unsigned && !!options.zerofill) {
      field = field.ZEROFILL;
    }
    return field;
  },

  tinyIntType: function(options) {
    var field = !!options.length ? 'TINYINT(' + options.length + ')' : 'TINYINT';
    if (!!options.unsigned && !!options.zerofill) {
      field += ' UNSIGNED ZEROFILL';
    } else if (!!options.unsigned && !options.zerofill) {
      field += ' UNSIGNED';
    } else if (!options.unsigned && !!options.zerofill) {
      field += ' ZEROFILL';
    }
    return field;
  },

  bigIntType: function(options) {
    var field = !!options.length ? Sequelize.BIGINT(options.length) : Sequelize.BIGINT;
    if (!!options.unsigned && !!options.zerofill) {
      field = field.UNSIGNED.ZEROFILL;
    } else if (!!options.unsigned && !options.zerofill) {
      field = field.UNSIGNED;
    } else if (!options.unsigned && !!options.zerofill) {
      field = field.ZEROFILL;
    }
    return field;
  },

  floatType: function(options) {
    var field = Sequelize.FLOAT;
    if (!!options.decimals) {
      field = Sequelize.FLOAT(options.length, options.decimals);
    } else if (!!options.length) {
      field = Sequelize.FLOAT(options.length);
    }

    if (!!options.unsigned && !!options.zerofill) {
      field = field.UNSIGNED.ZEROFILL;
    } else if (!!options.unsigned && !options.zerofill) {
      field = field.UNSIGNED;
    } else if (!options.unsigned && !!options.zerofill) {
      field = field.ZEROFILL;
    }
    return field;
  },

  decimalType: function(options) {
    var field = Sequelize.DECIMAL;
    if (!!options.scale) {
      field = Sequelize.DECIMAL(options.precision, options.scale);
    } else if (!!options.precision) {
      field = Sequelize.DECIMAL(options.precision);
    }
    return field;
  }
});


text:
package net.sf.neem.impl;

import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.UnknownHostException;
import java.nio.ByteBuffer;

/**
 * Address manipulation utilities. Provides methods to read/write
 * InetSocketAddress addresses from/to a ByteBuffers.
 */
public abstract class Addresses {
    /**
     * Read a socket address from an array of ByteBuffers into an
     * InetSocketAddress.
     *
     * @param msg
     *            The buffer from which to read the address from.
     * @return The address read.
     */
    public static InetSocketAddress readAddressFromBuffer(ByteBuffer[] msg) {
        InetSocketAddress addr = null;
        int port = 0;
        byte[] dst = null;
        InetAddress ia = null;

        ByteBuffer buf = Buffers.sliceCompact(msg, 6);
        dst = new byte[4];
        buf.get(dst, 0, dst.length);
        port = buf.getShort() & 0xffff;
        try {
            ia = InetAddress.getByAddress(dst);
        } catch (UnknownHostException e) {
            // We are sure that this does not happen, as the
            // byte array is created with the correct size.
        }
        addr = new InetSocketAddress(ia, port);
        return addr;
    }

    /**
     * Write a socket address to a ByteBuffer.
     *
     * @param addr
     *            The address to be written.
     */
    public static ByteBuffer writeAddressToBuffer(InetSocketAddress addr) {
        ByteBuffer msg = null;

        msg = ByteBuffer.allocate(6);
        msg.put(addr.getAddress().getAddress());
        int port = addr.getPort();
        msg.putShort((short) port);
        msg.flip();
        return msg;
    }

    private Addresses() {
    }
}


text:
SilverStripe FlexSlider module
==================

This module provide all the requirements to use FlexSlider 2.6 in your website.

Use the following code in your page:

    private static $has_many = array(
        'Slides' => 'FlexSliderSlide'
    );

    function getCMSFields() {
        $fields = parent::getCMSFields();

        FlexSliderSlide::attach($fields,$this);

        return $fields;
    }

And simply require the slider in your template:

    <% include FlexSlider %>

Full screen slider
----------------------------------

For a nice full screen slider, images must be set as background. You can use
this in your template instead:

    <% include FlexSliderBackground %>

Make sure to have the following css:

    html,
    body {
      height: 100%;
      min-height: 100%;
    }

The default css has been updated to support fullscreen with the flexslider-fullscreen
class.

Manually trigger requirements
----------------------------------

    function init() {
        parent::init();

        FlexSliderSlide::requirements();
    }

Configuration
----------------------------------

- custom_styles: Allows you to specify a custom stylesheet instead of the default one.
A sample custom stylesheet using elegant icons is provided.

- custom_init: Don't use auto init and use your own code to specify your options

- animation: Default animation to be used.

- image_width: Automatically resize image

Compatibility
==================
Tested with 3.1, 3.2

Maintainer
==================
LeKoala - thomas@lekoala.be


text:
\documentclass[ignorenonframetext,]{beamer}
\setbeamertemplate{caption}[numbered]
\setbeamertemplate{caption label separator}{: }
\setbeamercolor{caption name}{fg=normal text.fg}
\beamertemplatenavigationsymbolsempty
\usepackage{lmodern}
\usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex}
\usepackage{fixltx2e} % provides \textsubscript
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
  \usepackage[T1]{fontenc}
  \usepackage[utf8]{inputenc}
\else % if luatex or xelatex
  \ifxetex
    \usepackage{mathspec}
  \else
    \usepackage{fontspec}
  \fi
  \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}
\fi
\usetheme{AnnArbor}
\usecolortheme{dolphin}
\usefonttheme{professionalfonts}
% use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
% use microtype if available
\IfFileExists{microtype.sty}{%
\usepackage{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\newif\ifbibliography
\usepackage{color}
\usepackage{fancyvrb}
\newcommand{\VerbBar}{|}
\newcommand{\VERB}{\Verb[commandchars=\\\{\}]}
\DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\}}
% Add ',fontsize=\small' for more characters per line
\usepackage{framed}
\definecolor{shadecolor}{RGB}{248,248,248}
\newenvironment{Shaded}{\begin{snugshade}}{\end{snugshade}}
\newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.13,0.29,0.53}{\textbf{{#1}}}}
\newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.13,0.29,0.53}{{#1}}}
\newcommand{\DecValTok}[1]{\textcolor[rgb]{0.00,0.00,0.81}{{#1}}}
\newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.00,0.00,0.81}{{#1}}}
\newcommand{\FloatTok}[1]{\textcolor[rgb]{0.00,0.00,0.81}{{#1}}}
\newcommand{\ConstantTok}[1]{\textcolor[rgb]{0.00,0.00,0.00}{{#1}}}
\newcommand{\CharTok}[1]{\textcolor[rgb]{0.31,0.60,0.02}{{#1}}}
\newcommand{\SpecialCharTok}[1]{\textcolor[rgb]{0.00,0.00,0.00}{{#1}}}
\newcommand{\StringTok}[1]{\textcolor[rgb]{0.31,0.60,0.02}{{#1}}}
\newcommand{\VerbatimStringTok}[1]{\textcolor[rgb]{0.31,0.60,0.02}{{#1}}}
\newcommand{\SpecialStringTok}[1]{\textcolor[rgb]{0.31,0.60,0.02}{{#1}}}
\newcommand{\ImportTok}[1]{{#1}}
\newcommand{\CommentTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textit{{#1}}}}
\newcommand{\DocumentationTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{{#1}}}}}
\newcommand{\AnnotationTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{{#1}}}}}
\newcommand{\CommentVarTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{{#1}}}}}
\newcommand{\OtherTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{{#1}}}
\newcommand{\FunctionTok}[1]{\textcolor[rgb]{0.00,0.00,0.00}{{#1}}}
\newcommand{\VariableTok}[1]{\textcolor[rgb]{0.00,0.00,0.00}{{#1}}}
\newcommand{\ControlFlowTok}[1]{\textcolor[rgb]{0.13,0.29,0.53}{\textbf{{#1}}}}
\newcommand{\OperatorTok}[1]{\textcolor[rgb]{0.81,0.36,0.00}{\textbf{{#1}}}}
\newcommand{\BuiltInTok}[1]{{#1}}
\newcommand{\ExtensionTok}[1]{{#1}}
\newcommand{\PreprocessorTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textit{{#1}}}}
\newcommand{\AttributeTok}[1]{\textcolor[rgb]{0.77,0.63,0.00}{{#1}}}
\newcommand{\RegionMarkerTok}[1]{{#1}}
\newcommand{\InformationTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{{#1}}}}}
\newcommand{\WarningTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{{#1}}}}}
\newcommand{\AlertTok}[1]{\textcolor[rgb]{0.94,0.16,0.16}{{#1}}}
\newcommand{\ErrorTok}[1]{\textcolor[rgb]{0.64,0.00,0.00}{\textbf{{#1}}}}
\newcommand{\NormalTok}[1]{{#1}}
\usepackage{longtable,booktabs}
\usepackage{caption}
% These lines are needed to make table captions work with longtable:
\makeatletter
\def\fnum@table{\tablename~\thetable}
\makeatother
\usepackage{graphicx,grffile}
\makeatletter
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
\def\maxheight{\ifdim\Gin@nat@height>\textheight0.8\textheight\else\Gin@nat@height\fi}
\makeatother
% Scale images if necessary, so that they will not overflow the page
% margins by default, and it is still possible to overwrite the defaults
% using explicit options in \includegraphics[width, height, ...]{}
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}

% Prevent slide breaks in the middle of a paragraph:
\widowpenalties 1 10000
\raggedbottom

\AtBeginPart{
  \let\insertpartnumber\relax
  \let\partname\relax
  \frame{\partpage}
}
\AtBeginSection{
  \ifbibliography
  \else
    \let\insertsectionnumber\relax
    \let\sectionname\relax
    \frame{\sectionpage}
  \fi
}
\AtBeginSubsection{
  \let\insertsubsectionnumber\relax
  \let\subsectionname\relax
  \frame{\subsectionpage}
}

\setlength{\emergencystretch}{3em}  % prevent overfull lines
\providecommand{\tightlist}{%
  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{0}

% \pgfdeclareimage[width=1cm]{logo}{./figures/monkeyTypewriter.png}
%\logo{\pgfuseimage{logo}}

\institute{University of Virginia}
\definecolor{links}{RGB}{42, 27, 129}
\definecolor{mypink2}{RGB}{219, 48, 122}
%\hypersetup{colorlinks,linkcolor=links,urlcolor=mypink2}
\usefonttheme{professionalfonts}

% \setbeamerfont{note page}{family*=pplx,size=\footnotesize} % Palatino for notes

\setbeamerfont{subtitle}{size=\small}

\definecolor{uvablue}{RGB}{0,85,150}
\definecolor{uvalibraryorange}{RGB}{252,175,23}
\definecolor{uvacream}{RGB}{241,229,199}
\definecolor{uvalightblue}{RGB}{163,220,230}

\setbeamercolor{block body}{bg=green,fg=green}
\setbeamercolor{block body alerted}{bg=green,fg=green}
\setbeamercolor{block body example}{bg=green,fg=green}

\setbeamercolor{caption name}{fg=uvablue}

\setbeamercolor{headline}{fg=uvacream,bg=uvacream}
\setbeamercolor{section}{fg=uvalibraryorange,bg=uvablue}
\setbeamercolor{frametitle}{fg=uvalibraryorange,bg=uvablue}
\setbeamercolor{palette primary}{bg=uvalibraryorange,fg=uvablue}
\setbeamercolor{palette secondary}{bg=uvablue,fg=uvablue}
\setbeamercolor{palette tertiary}{bg=uvalibraryorange,fg=uvablue}
\setbeamercolor{palette quarternary}{fg=uvalibraryorange,bg=uvablue}
\setbeamercolor{palette sidebar primary}{bg=uvalibraryorange,fg=uvablue}
\setbeamercolor{palette sidebar secondary}{fg=uvablue,bg=uvablue}
\setbeamercolor{palette sidebar tertiary}{fg=uvalibraryorange,bg=uvablue}
\setbeamercolor{palette sidebar quarternary}{fg=uvalibraryorange,bg=uvablue}
\setbeamercolor{structure}{bg=uvablue}

\useinnertheme{rectangles}

\titlegraphic{\vspace{-7.5mm}\includegraphics[width=0.45\paperwidth]{./figures/monkeyTypewriter.png}}

\title{``Dr.~Tustison (UVA) presentation''}
\author{Nick Tustison}
\date{}

\begin{document}
\frame{\titlepage}

\section{Developers and
collaborators}\label{developers-and-collaborators}

\begin{frame}{Founders: Brian and Nick}

\includegraphics{./figures/brian_and_nick.png}

\end{frame}

\begin{frame}

\includegraphics{./figures/antsCollaborators2.png}

\(+\) \href{http://neuro.debian.net/pkgs/ants.html}{neurodebian},
\href{http://www.slicer.org/}{slicer},
\href{https://github.com/BRAINSia/BRAINSTools}{brainsfit},
\href{http://nipy.sourceforge.net/nipype/}{nipype},
\href{http://www.itk.org}{itk} and more \ldots{}

\end{frame}

\section{ANTs lineage}\label{ants-lineage}

\begin{frame}{Image mapping and perception: 1877}

Francis Galton: \emph{Can we see criminality in the face?}

\includegraphics{./figures/galton.png}

\emph{What about syphilis, mental illness?}

\end{frame}

\begin{frame}{Speaking of criminality\ldots{}}

\emph{Can we say anything about the U.S. Congress?}

\includegraphics{./background/figures/congressPersons.png}

\textbf{Maybe they should have used
\href{https://github.com/ntustison/CongressionalFaceTemplates}{ANTs}?}

\end{frame}

\begin{frame}{Image mapping \& biology: 1917}

D'Arcy Thompson: \emph{Comparison of related forms}

\includegraphics{./figures/dthompson.png} --\textgreater{}

\end{frame}

\begin{frame}{Image mapping \& biology: Current}

 \emph{Look where we are now!}
\includegraphics{./background/figures/r16xr85.png}

\end{frame}

\section{Major ANTs utilities}\label{major-ants-utilities}

\begin{frame}{Donoho?}

 \emph{``Papers are just advertisements for the science.''}

\end{frame}

\begin{frame}{Neuro tools}

\includegraphics{./tools/figures/coreANtsToolsNeuro.png}

\end{frame}

\begin{frame}{Pulmonary tools}

\includegraphics{./tools/figures/coreANtsToolsLung.png}

\end{frame}

\begin{frame}{Symmetric Normalization (SyN)}

\(\int_{t=0}^{0.5} \left(\|\mathbf{v}_1(x,t)\|_L^2 + \|\mathbf{v}_2(x,t)\|_L^2\right)dt + \|I\left(\phi_1(x,0.5)\right) - J_i\left(\phi_2(x,0.5)\right)\|^2\)

\includegraphics{./papers/figures/fishes.png}

--\textgreater{}

NOtes: * Previously discussed Brians work * The variant most widely used
--\textgreater{}

\end{frame}

\begin{frame}{Diffeomoprhisms: differentiable map with diff. inverse}

\includegraphics{./figures/highresdiffeos.jpg}

\end{frame}

\begin{frame}{Diffeomorphisms: image parameterization in a metric space}

\includegraphics{./figures/shape_appearance.png}

\end{frame}

\begin{frame}{Beyond original SyN}

\small

\includegraphics{./papers/figures/Frontiers_ITK.png}

\includegraphics{./papers/figures/Frontiers_BSplineSyN.png}

\end{frame}

\begin{frame}[fragile]{\texttt{antsRegistration}}

\begin{Shaded}
\begin{Highlighting}[]
\NormalTok{$ }\KeywordTok{antsRegistration} \NormalTok{--help}

\KeywordTok{COMMAND}\NormalTok{:}
     \KeywordTok{antsRegistration}
          \KeywordTok{This} \NormalTok{program is a user-level registration application meant to utilize}
          \KeywordTok{ITKv4-only} \NormalTok{classes. The user can specify any number of }\StringTok{"stages"} \NormalTok{where a stage}
          \KeywordTok{consists} \NormalTok{of a transform}\KeywordTok{;} \KeywordTok{an} \NormalTok{image metric}\KeywordTok{;} \KeywordTok{and} \NormalTok{iterations, shrink factors, and}
          \KeywordTok{smoothing} \NormalTok{sigmas for each level.Note that dimensionality, metric, transform,}
          \KeywordTok{output}\NormalTok{, convergence, shrink-factors and smoothing-sigmas parameters are}
          \KeywordTok{mandatory.}

\KeywordTok{OPTIONS}\NormalTok{:}
     \KeywordTok{--version}
          \KeywordTok{Get} \NormalTok{Version Information.}

     \KeywordTok{-d}\NormalTok{, --dimensionality 2/3}
          \KeywordTok{This} \NormalTok{option forces the image to be treated as a specified-dimensional image. If}
          \KeywordTok{not} \NormalTok{specified, we try to infer the dimensionality from the input image.}

     \KeywordTok{-o}\NormalTok{, --output outputTransformPrefix}
                  \NormalTok{[}\KeywordTok{outputTransformPrefix}\NormalTok{,}\KeywordTok{<}\NormalTok{outputWarpedImage}\KeywordTok{>}\NormalTok{,}\KeywordTok{<}\NormalTok{outputInverseWarpedImage}\KeywordTok{>}\NormalTok{]}
          \KeywordTok{Specify} \NormalTok{the output transform prefix (output format is .nii.gz )}\KeywordTok{.} \KeywordTok{Optionally}\NormalTok{, one}
          \KeywordTok{can} \NormalTok{choose to warp the moving image to the fixed space and, if the inverse}
          \KeywordTok{transform} \NormalTok{exists, one can also output the warped fixed image. Note that only the}
          \KeywordTok{images} \NormalTok{specified in the first metric call are warped. Use antsApplyTransforms to}
          \KeywordTok{warp} \NormalTok{other images using the resultant transform(s)}\KeywordTok{.}

     \KeywordTok{-j}\NormalTok{, --save-state saveSateAsTransform}
          \KeywordTok{Specify} \NormalTok{the output file for the current state of the registration. The state}
          \KeywordTok{file} \NormalTok{is written to an hdf5 composite file. It is specially usefull if we want to}
          \KeywordTok{save} \NormalTok{the current state of a SyN registration to the disk, so we can load and}
          \KeywordTok{restore} \NormalTok{that later to continue the next registration process directly started}
          \KeywordTok{from} \NormalTok{the last saved state. The output file of this flag is the same as the}
          \KeywordTok{write-composite-transform}\NormalTok{, unless the last transform is a SyN transform. In that}
          \KeywordTok{case}\NormalTok{, the inverse displacement field of the SyN transform is also added to the}
          \NormalTok{output composite transform. Again notice that this file cannot be treated as a}
          \NormalTok{transform, and restore-state option must be used to load the written file by}
          \NormalTok{this flag.}

     \NormalTok{-k, --restore-state restoreStateAsATransform}
          \NormalTok{Specify the initial state of the registration which get immediately used to}
          \NormalTok{directly initialize the registration process. The flag is mutually exclusive}
          \NormalTok{with other intialization flags.If this flag is used, none of the}
          \NormalTok{initial-moving-transform and initial-fixed-transform cannot be used.}

     \NormalTok{-a, --write-composite-transform 1/(0)}
          \NormalTok{Boolean specifying whether or not the composite transform (and its inverse, if}
          \NormalTok{it exists) should be written to an hdf5 composite file. This is false by default}
          \NormalTok{so that only the transform for each stage is written to file.}
          \NormalTok{<VALUES>: 0}

     \NormalTok{-p, --print-similarity-measure-interval <unsignedIntegerValue>}
          \NormalTok{Prints out the CC similarity metric measure between the full-size input fixed}
          \NormalTok{and the transformed moving images at each iteration a value of 0 (the default)}
          \NormalTok{indicates that the full scale computation should not take placeany value greater}
          \NormalTok{than 0 represents the interval of full scale metric computation.}
          \NormalTok{<VALUES>: 0}

     \NormalTok{-v, --write-interval-volumes <unsignedIntegerValue>}
          \NormalTok{Writes out the output volume at each iteration. It helps to present the}
          \NormalTok{registration process as a short movie a value of 0 (the default) indicates that}
          \NormalTok{this option should not take placeany value greater than 0 represents the}
          \NormalTok{interval between the iterations which outputs are written to the disk.}
          \NormalTok{<VALUES>: 0}

     \NormalTok{-z, --collapse-output-transforms (1)/0}
          \NormalTok{Collapse output transforms. Specifically, enabling this option combines all}
          \NormalTok{adjacent transforms wherepossible. All adjacent linear transforms are written to}
          \NormalTok{disk}\KeywordTok{ in} \NormalTok{the forman itk affine transform }\KeywordTok{(}\NormalTok{called xxxGenericAffine.mat}\KeywordTok{).}
          \KeywordTok{Similarly}\NormalTok{, all adjacent displacement field transforms are combined when written}
          \KeywordTok{to} \NormalTok{disk (e.g. xxxWarp.nii.gz and xxxInverseWarp.nii.gz (if available))}\KeywordTok{.Also}\NormalTok{, an}
          \KeywordTok{output} \NormalTok{composite transform including the collapsed transforms is written to the}
          \KeywordTok{disk} \NormalTok{(called outputCollapsed(Inverse)}\KeywordTok{Composite}\NormalTok{)}\KeywordTok{.}
          \KeywordTok{<VALUES>}\NormalTok{: 1}

     \KeywordTok{-i}\NormalTok{, --initialize-transforms-per-stage (1)}\KeywordTok{/0}
          \KeywordTok{Initialize} \NormalTok{linear transforms from the previous stage. By enabling this option,}
          \KeywordTok{the} \NormalTok{current linear stage transform is directly intialized from the previous}
          \KeywordTok{stage}\StringTok{'s linear transform; this allows multiple linear stages to be run where}
\StringTok{          each stage directly updates the estimated linear transform from the previous}
\StringTok{          stage. (e.g. Translation -> Rigid -> Affine).}
\StringTok{          <VALUES>: 0}

\StringTok{     -n, --interpolation Linear}
\StringTok{                         NearestNeighbor}
\StringTok{                         MultiLabel[<sigma=imageSpacing>,<alpha=4.0>]}
\StringTok{                         Gaussian[<sigma=imageSpacing>,<alpha=1.0>]}
\StringTok{                         BSpline[<order=3>]}
\StringTok{                         CosineWindowedSinc}
\StringTok{                         WelchWindowedSinc}
\StringTok{                         HammingWindowedSinc}
\StringTok{                         LanczosWindowedSinc}
\StringTok{          Several interpolation options are available in ITK. These have all been made}
\StringTok{          available. Currently the interpolator choice is only used to warp (and possibly}
\StringTok{          inverse warp) the final output image(s).}

\StringTok{     -g, --restrict-deformation PxQxR}
\StringTok{          This option allows the user to restrict the optimization of the displacement}
\StringTok{          field, translation, rigid or affine transform on a per-component basis. For}
\StringTok{          example, if one wants to limit the deformation or rotation of 3-D volume to the}
\StringTok{          first two dimensions, this is possible by specifying a weight vector of '}\NormalTok{1x1x0}\StringTok{'}
\StringTok{          for a deformation field or '}\NormalTok{1x1x0x1x1x0}\StringTok{' for a rigid}
\StringTok{          transformation.Low-dimensional restriction only works if there are no preceding}
\StringTok{          transformations.}

\StringTok{     -q, --initial-fixed-transform initialTransform}
\StringTok{                                   [initialTransform,<useInverse>]}
\StringTok{                                   [fixedImage,movingImage,initializationFeature]}
\StringTok{          Specify the initial fixed transform(s) which get immediately incorporated into}
\StringTok{          the composite transform. The order of the transforms is stack-esque in that the}
\StringTok{          last transform specified on the command line is the first to be applied. In}
\StringTok{          addition to initialization with ITK transforms, the user can perform an initial}
\StringTok{          translation alignment by specifying the fixed and moving images and selecting an}
\StringTok{          initialization feature. These features include using the geometric center of the}
\StringTok{          images (=0), the image intensities (=1), or the origin of the images (=2).}

\StringTok{     -r, --initial-moving-transform initialTransform}
\StringTok{                                    [initialTransform,<useInverse>]}
\StringTok{                                    [fixedImage,movingImage,initializationFeature]}
\StringTok{          Specify the initial moving transform(s) which get immediately incorporated into}
\StringTok{          the composite transform. The order of the transforms is stack-esque in that the}
\StringTok{          last transform specified on the command line is the first to be applied. In}
\StringTok{          addition to initialization with ITK transforms, the user can perform an initial}
\StringTok{          translation alignment by specifying the fixed and moving images and selecting an}
\StringTok{          initialization feature. These features include using the geometric center of the}
\StringTok{          images (=0), the image intensities (=1), or the origin of the images (=2).}

\StringTok{     -m, --metric CC[fixedImage,movingImage,metricWeight,radius,<samplingStrategy=\{None,Regular,Random\}>,<samplingPercentage=[0,1]>]}
\StringTok{                  MI[fixedImage,movingImage,metricWeight,numberOfBins,<samplingStrategy=\{None,Regular,Random\}>,<samplingPercentage=[0,1]>]}
\StringTok{                  Mattes[fixedImage,movingImage,metricWeight,numberOfBins,<samplingStrategy=\{None,Regular,Random\}>,<samplingPercentage=[0,1]>]}
\StringTok{                  MeanSquares[fixedImage,movingImage,metricWeight,radius=NA,<samplingStrategy=\{None,Regular,Random\}>,<samplingPercentage=[0,1]>]}
\StringTok{                  Demons[fixedImage,movingImage,metricWeight,radius=NA,<samplingStrategy=\{None,Regular,Random\}>,<samplingPercentage=[0,1]>]}
\StringTok{                  GC[fixedImage,movingImage,metricWeight,radius=NA,<samplingStrategy=\{None,Regular,Random\}>,<samplingPercentage=[0,1]>]}
\StringTok{                  ICP[fixedPointSet,movingPointSet,metricWeight,<samplingPercentage=[0,1]>,<boundaryPointsOnly=0>]}
\StringTok{                  PSE[fixedPointSet,movingPointSet,metricWeight,<samplingPercentage=[0,1]>,<boundaryPointsOnly=0>,<pointSetSigma=1>,<kNeighborhood=50>]}
\StringTok{                  JHCT[fixedPointSet,movingPointSet,metricWeight,<samplingPercentage=[0,1]>,<boundaryPointsOnly=0>,<pointSetSigma=1>,<kNeighborhood=50>,<alpha=1.1>,<useAnisotropicCovariances=1>]}
\StringTok{                  IGDM[fixedImage,movingImage,metricWeight,fixedMask,movingMask,<neighborhoodRadius=0x0>,<intensitySigma=0>,<distanceSigma=0>,<kNeighborhood=1>,<gradientSigma=1>]}
\StringTok{          These image metrics are available--- CC: ANTS neighborhood cross correlation,}
\StringTok{          MI: Mutual information, Demons: (Thirion), MeanSquares, and GC: Global}
\StringTok{          Correlation. The "metricWeight" variable is used to modulate the per stage}
\StringTok{          weighting of the metrics. The metrics can also employ a sampling strategy}
\StringTok{          defined by a sampling percentage. The sampling strategy defaults to '}\NormalTok{None}\StringTok{' (aka}
\StringTok{          a dense sampling of one sample per voxel), otherwise it defines a point set over}
\StringTok{          which to optimize the metric. The point set can be on a regular lattice or a}
\StringTok{          random lattice of points slightly perturbed to minimize aliasing artifacts.}
\StringTok{          samplingPercentage defines the fraction of points to select from the domain. In}
\StringTok{          addition, three point set metrics are available: Euclidean (ICP), Point-set}
\StringTok{          expectation (PSE), and Jensen-Havrda-Charvet-Tsallis (JHCT).}

\StringTok{     -t, --transform Rigid[gradientStep]}
\StringTok{                     Affine[gradientStep]}
\StringTok{                     CompositeAffine[gradientStep]}
\StringTok{                     Similarity[gradientStep]}
\StringTok{                     Translation[gradientStep]}
\StringTok{                     BSpline[gradientStep,meshSizeAtBaseLevel]}
\StringTok{                     GaussianDisplacementField[gradientStep,updateFieldVarianceInVoxelSpace,totalFieldVarianceInVoxelSpace]}
\StringTok{                     BSplineDisplacementField[gradientStep,updateFieldMeshSizeAtBaseLevel,totalFieldMeshSizeAtBaseLevel,<splineOrder=3>]}
\StringTok{                     TimeVaryingVelocityField[gradientStep,numberOfTimeIndices,updateFieldVarianceInVoxelSpace,updateFieldTimeVariance,totalFieldVarianceInVoxelSpace,totalFieldTimeVariance]}
\StringTok{                     TimeVaryingBSplineVelocityField[gradientStep,velocityFieldMeshSize,<numberOfTimePointSamples=4>,<splineOrder=3>]}
\StringTok{                     SyN[gradientStep,updateFieldVarianceInVoxelSpace,totalFieldVarianceInVoxelSpace]}
\StringTok{                     BSplineSyN[gradientStep,updateFieldMeshSizeAtBaseLevel,totalFieldMeshSizeAtBaseLevel,<splineOrder=3>]}
\StringTok{                     Exponential[gradientStep,updateFieldVarianceInVoxelSpace,velocityFieldVarianceInVoxelSpace,<numberOfIntegrationSteps>]}
\StringTok{                     BSplineExponential[gradientStep,updateFieldMeshSizeAtBaseLevel,velocityFieldMeshSizeAtBaseLevel,<numberOfIntegrationSteps>,<splineOrder=3>]}
\StringTok{          Several transform options are available. The gradientStep or learningRate}
\StringTok{          characterizes the gradient descent optimization and is scaled appropriately for}
\StringTok{          each transform using the shift scales estimator. Subsequent parameters are}
\StringTok{          transform-specific and can be determined from the usage. For the B-spline}
\StringTok{          transforms one can also specify the smoothing in terms of spline distance (i.e.}
\StringTok{          knot spacing).}

\StringTok{     -c, --convergence MxNxO}
\StringTok{                       [MxNxO,<convergenceThreshold=1e-6>,<convergenceWindowSize=10>]}
\StringTok{          Convergence is determined from the number of iterations per level and is}
\StringTok{          determined by fitting a line to the normalized energy profile of the last N}
\StringTok{          iterations (where N is specified by the window size) and determining the slope}
\StringTok{          which is then compared with the convergence threshold.}

\StringTok{     -s, --smoothing-sigmas MxNxO...}
\StringTok{          Specify the sigma of gaussian smoothing at each level. Units are given in terms}
\StringTok{          of voxels ('}\NormalTok{vox}\StringTok{') or physical spacing ('}\NormalTok{mm}\StringTok{'). Example usage is '}\NormalTok{4x2x1mm}\StringTok{' and}
\StringTok{          '}\NormalTok{4x2x1vox}\StringTok{' where no units implies voxel spacing.}

\StringTok{     -f, --shrink-factors MxNxO...}
\StringTok{          Specify the shrink factor for the virtual domain (typically the fixed image) at}
\StringTok{          each level.}

\StringTok{     -u, --use-histogram-matching}
\StringTok{          Histogram match the images before registration.}

\StringTok{     -l, --use-estimate-learning-rate-once}
\StringTok{          turn on the option that lets you estimate the learning rate step size only at}
\StringTok{          the beginning of each level. * useful as a second stage of fine-scale}
\StringTok{          registration.}

\StringTok{     -w, --winsorize-image-intensities [lowerQuantile,upperQuantile]}
\StringTok{          Winsorize data based on specified quantiles.}

\StringTok{     -x, --masks [fixedImageMask,movingImageMask]}
\StringTok{          Image masks to limit voxels considered by the metric.}

\StringTok{     --float}
\StringTok{          Use '}\NormalTok{float}\StringTok{' instead of '}\NormalTok{double}\StringTok{' for computations.}
\StringTok{          <VALUES>: 0}

\StringTok{     -v, --verbose (0)/1}
\StringTok{          Verbose output.}

\StringTok{     -h}
\StringTok{          Print the help menu (short version).}

\StringTok{     --help}
\StringTok{          Print the help menu. Will also print values used on the current command line}
\StringTok{          call.}
\end{Highlighting}
\end{Shaded}

\end{frame}

\begin{frame}{Template building: creating the average Joe}

\includegraphics{./papers/figures/template0.jpg}

\end{frame}

\begin{frame}{``Attractiveness'' \(\rightarrow\) mental processing?}

\includegraphics{./papers/figures/template1.jpg}

\end{frame}

\begin{frame}{What about brains?}

\includegraphics{./papers/figures/template3.jpg}

\end{frame}

\begin{frame}{Templates facilitate computation}

\includegraphics{./papers/figures/template4.jpg}

\end{frame}

\begin{frame}{Gender?}

\includegraphics{./papers/figures/template5.jpg}

\end{frame}

\begin{frame}{Nonparametric nonuniform intensity normalization (N3)}

\begin{itemize}
\item
  Developed at the Montreal Neurological Institute (John Sled, 1998)
\item
  Part of the standard preprocessing protocol in large scale projects
  such as ADNI
\item
  The traditional de facto standard in MRI bias correction

  \begin{itemize}
  \tightlist
  \item
    good performance
  \item
    \emph{public availability}
  \end{itemize}
\item
  Public availability --- set of perl scripts coordinating various C++
  programs
\item
  ``\emph{Let's incorporate N3 into ANTs!}''
\end{itemize}

\end{frame}

\begin{frame}{Nonparametric nonuniform intensity normalization (N3)}

\includegraphics{./tools/n4/figures/whyN4.png}

\end{frame}

\begin{frame}[fragile]{N4 (``Nick's N3'')}

\begin{itemize}
\item
  comparative
  \href{http://www.ncbi.nlm.nih.gov/pubmed/20378467}{evaluation}
\item
  small spline distances (useful for higher magnet strengths)
\item
  multiresolution
\item
  weighted regional mask (used in
  \href{https://github.com/stnava/ANTs/blob/master/Scripts/antsAtroposN4.sh}{\texttt{antsAtroposN4.sh}})
\item
  fast execution times
\item
  \emph{publicly available}
\item
  tested nightly within the ITK dashboard system
\end{itemize}

\end{frame}

\begin{frame}{Atropos: flexible code base}

``20+ years of development. \emph{Show me the code!}''

\includegraphics{./tools/atropos/figures/atropos.png}

\end{frame}

\begin{frame}{Atropos + N4 \(\rightarrow\) \texttt{antsAtroposN4.sh}}

\includegraphics{./tools/atropos/figures/atroposFlow.png}

\end{frame}

\begin{frame}[fragile]{\texttt{DenoiseImage} --- contribution from Jose
Manjon}

\includegraphics{./tools/figures/denoising.png}

\begin{Shaded}
\begin{Highlighting}[]
\NormalTok{$ }\KeywordTok{DenoiseImage} \NormalTok{--help}

\KeywordTok{COMMAND}\NormalTok{:}
     \KeywordTok{DenoiseImage}
          \KeywordTok{Denoise} \NormalTok{an image using a spatially adaptive filter originally described in J. V.}
          \KeywordTok{Manjon}\NormalTok{, P. Coupe, Luis Marti-Bonmati, D. L. Collins, and M. Robles. Adaptive}
          \KeywordTok{Non-Local} \NormalTok{Means Denoising of MR Images With Spatially Varying Noise Levels,}
          \KeywordTok{Journal} \NormalTok{of Magnetic Resonance Imaging, 31:192-203, June 2010.}

\KeywordTok{OPTIONS}\NormalTok{:}
     \KeywordTok{-d}\NormalTok{, --image-dimensionality 2/3/4}
          \KeywordTok{This} \NormalTok{option forces the image to be treated as a specified-dimensional image. If}
          \KeywordTok{not} \NormalTok{specified, the program tries to infer the dimensionality from the input}
          \KeywordTok{image.}

     \KeywordTok{-i}\NormalTok{, --input-image inputImageFilename}
          \KeywordTok{A} \NormalTok{scalar image is expected as input for noise correction.}

     \KeywordTok{-n}\NormalTok{, --noise-model Rician/(Gaussian)}
          \KeywordTok{Employ} \NormalTok{a Rician or Gaussian noise model.}

     \KeywordTok{-x}\NormalTok{, --mask-image maskImageFilename}
          \KeywordTok{If} \NormalTok{a mask image is specified, denoising is only performed in the mask region.}

     \KeywordTok{-s}\NormalTok{, --shrink-factor (1)}\KeywordTok{/2/3/...}
          \KeywordTok{Running} \NormalTok{noise correction on large images can be time consuming. To lessen}
          \KeywordTok{computation} \NormalTok{time, the input image can be resampled. The shrink factor, specified}
          \KeywordTok{as} \NormalTok{a single integer, describes this resampling. Shrink factor = 1 is the}
          \KeywordTok{default.}

     \KeywordTok{-p}\NormalTok{, --patch-radius 1}
                        \KeywordTok{1x1x1}
          \KeywordTok{Patch} \NormalTok{radius. Default = 1x1x1}

     \KeywordTok{-r}\NormalTok{, --search-radius 3}
                         \KeywordTok{3x3x3}
          \KeywordTok{Search} \NormalTok{radius. Default = 3x3x3.}

     \KeywordTok{-o}\NormalTok{, --output correctedImage}
                  \NormalTok{[}\KeywordTok{correctedImage}\NormalTok{,}\KeywordTok{<}\NormalTok{noiseImage}\KeywordTok{>}\NormalTok{]}
          \KeywordTok{The} \NormalTok{output consists of the noise corrected version of the input image.}
          \KeywordTok{Optionally}\NormalTok{, one can also output the estimated noise image.}

     \KeywordTok{--version}
          \KeywordTok{Get} \NormalTok{Version Information.}

     \KeywordTok{-v}\NormalTok{, --verbose (0)}\KeywordTok{/1}
          \KeywordTok{Verbose} \NormalTok{output.}

     \KeywordTok{-h}
          \KeywordTok{Print} \NormalTok{the help menu (short version)}\KeywordTok{.}

     \KeywordTok{--help}
          \KeywordTok{Print} \NormalTok{the help menu.}
          \KeywordTok{<VALUES>}\NormalTok{: 1}
\end{Highlighting}
\end{Shaded}

\end{frame}

\begin{frame}{Multi-atlas segmentation}

\includegraphics{./tools/jointfusion/figures/jointLabelFusion.png}

\end{frame}

\begin{frame}{New work: joint intensity fusion}

\includegraphics{./tools/jointfusion/figures/jointIntensityFusion.png}

\end{frame}

\begin{frame}{Possible uses}

\begin{itemize}
\item
  ``Correct'' images

  \begin{itemize}
  \item
    motion correction
  \item
    ``remove'' lesions
  \end{itemize}
\item
  Project atlas set intensity signature
\item
  Use in ``corrective learning''
\end{itemize}

\end{frame}

\section{Putting it all together---the ANTs cortical thickness
pipeline}\label{putting-it-all-togetherthe-ants-cortical-thickness-pipeline}

\begin{frame}{Cortical thickness studies}

\begin{longtable}[c]{@{}ll@{}}
\toprule
Column1 & Column2\tabularnewline
\midrule
\endhead
Tetris-playing ability & chronic pancreatitis\tabularnewline
Huntington's disease & obsessive-compulsive disorder\tabularnewline
schizophrenia & ADHD\tabularnewline
bipolar disorder & obesity\tabularnewline
Alzheimer's disease & heritable depression\tabularnewline
frontotemporal dementia & elderly depression\tabularnewline
Parkinson's disease & age\tabularnewline
Williams syndrome & gender\tabularnewline
multiple sclerosis & handedness\tabularnewline
autism & intelligence\tabularnewline
migraines & athletic ability\tabularnewline
chronic smoking & meditative practices\tabularnewline
alcoholism & musical ability\tabularnewline
cocaine addiction & tendency toward criminality\tabularnewline
Tourette syndrome in children & childhood sexual abuse in female
adolescents\tabularnewline
scoliosis in female adolescents & traumatic brain injury\tabularnewline
early-onset blindness & untreated male-to-female
transsexuality\tabularnewline
\bottomrule
\end{longtable}

\end{frame}

\begin{frame}{The ANTs structural brain mapping workflow}

\includegraphics{./evaluation/figures/pipeline.png}

\end{frame}

\begin{frame}{Template building}

\emph{Tailor data to your specific cohort}

\includegraphics{./evaluation/figures/templates.png}

\end{frame}

\begin{frame}{Template priors}

\includegraphics{./evaluation/figures/templatePriors.png}

\end{frame}

\begin{frame}{Cortical thickness maps}

\includegraphics{./evaluation/figures/corticalThicknessEstimation.png}

In contrast to FreeSurfer which warps coupled surface meshes to segment
the gray matter, \emph{ANTs} diffeomorphically registers the white
matter to the combined gray/white matters while simultaneously
estimating thickness.

\end{frame}

\begin{frame}

\emph{But without ground truth, how does one evaluate the pipeline?}

\end{frame}

\begin{frame}{Predict age and gender}

\(AGE \sim VOLUME + GENDER + \sum_{i=1}^{62} T(DKT_i)\)

\end{frame}

\begin{frame}{Prediction from cortical thickness data}

\includegraphics{./evaluation/figures/evaluation.png}

\end{frame}

\section{But, wait, there's more!}\label{but-wait-theres-more}

\begin{frame}{ANTs tools are multivariate}

\includegraphics{./evaluation/figures/rfRmse05ANTsT1T2.png}

\end{frame}

\begin{frame}{Longitudinal processing}

\includegraphics{./longitudinal/figures/longitudinalPipeline.png}

\end{frame}

\section{Joint label/intensity
fusion}\label{joint-labelintensity-fusion}

\begin{frame}{Multi-atlas labeling}

\includegraphics{./competitions/figures/NKI30_MALF.png}

\end{frame}

\begin{frame}{Multi-atlas segmentation}

\includegraphics{./tools/jointfusion/figures/jointLabelFusion.png}

\end{frame}

\begin{frame}{Multi-atlas 2012 results}

\includegraphics{./competitions/figures/MALF2012.png}

\end{frame}

\begin{frame}{New work: joint intensity fusion}

\includegraphics{./tools/jointfusion/figures/jointIntensityFusion.png}

\hypertarget{refs}{}

\end{frame}

\end{document}


text:
package com.vlath.keyboard.latin.common;

import androidx.annotation.NonNull;

import java.util.ArrayList;

/**
 * Utility methods for working with collections.
 */
public final class CollectionUtils {
    private CollectionUtils() {
        // This utility class is not publicly instantiable.
    }

    /**
     * Converts a sub-range of the given array to an ArrayList of the appropriate type.
     * @param array Array to be converted.
     * @param start First index inclusive to be converted.
     * @param end Last index exclusive to be converted.
     * @throws IllegalArgumentException if start or end are out of range or start > end.
     */
    @NonNull
    public static <E> ArrayList<E> arrayAsList(@NonNull final E[] array, final int start,
            final int end) {
        if (start < 0 || start > end || end > array.length) {
            throw new IllegalArgumentException("Invalid start: " + start + " end: " + end
                    + " with array.length: " + array.length);
        }

        final ArrayList<E> list = new ArrayList<>(end - start);
        for (int i = start; i < end; i++) {
            list.add(array[i]);
        }
        return list;
    }
}