Packages

  • package root
    Definition Classes
    root
  • package scalismo
    Definition Classes
    root
  • package io
    Definition Classes
    scalismo
  • object ImageIO

    Implements methods for reading and writing D-dimensional images

    Implements methods for reading and writing D-dimensional images

    WARNING! WE ARE USING an LPS WORLD COORDINATE SYSTEM

    VTK file format does not indicate the orientation of the image. Therefore, when reading from VTK, we assume that it is in RAI orientation. Hence, no magic is done, the same information (coordinates) present in the VTK file header are directly mapped to our coordinate system.

    This is also the case when writing VTK. Our image domain information (origin, spacing ..) is mapped directly into the written VTK file header.

    This is however not the case for Nifti files! Nifti file headers contain an affine transform from the ijk image coordinates to an RAS World Coordinate System (therefore supporting different image orientations). In order to read Nifti files coherently, we need to adapt the obtained RAS coordinates to our LPS system :

    This is done by mirroring the first two dimensions of each point after applying the affine transform

    The same mirroring is done again when writing an image to the Nifti format.

    Important for oblique images : The Nifti standard supports oblique images, that is images with a bounding box rotated compared to the world dimensions. Scalismo does not support such images. For such images, we offer the user a possibility to resample the image to a domain aligned with the world dimensions and with an RAI orientation. The integrity of the oblique image will be contained in the resampled one. This functionality can be activated by setting a flag appropriately in the scalismo.io.ImageIO.read3DScalarImage method.

    Note on Nifti's qform and sform :

    As mentioned above, the Nifti header contains a transform from the unit ijk grid to the RAS world coordinates of the grid. This transform can be encoded in 2 entries of the Nifti header, the qform and the sform. In some files, these 2 entries can both be present, and in some cases could even indicate different transforms. In Scalismo, when such a case happens, we favour the sform entry by default. If you wish instead to favour the qform transform, you can do so by setting a flag appropriately in the scalismo.io.ImageIO.read3DScalarImage method.

    Documentation on orientation :

    http://www.grahamwideman.com/gw/brain/orientation/orientterms.htm

    http://www.slicer.org/slicerWiki/index.php/Coordinate_systems

    http://brainder.org/2012/09/23/the-nifti-file-format/

    Definition Classes
    io
  • DiscreteScalarImage3DNifti
  • ScalarType
  • WriteNifti

object ScalarType extends Enumeration

An enumeration comprising all the data types that we can read and write, in VTK and Nifti formats.

Linear Supertypes
Enumeration, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ScalarType
  2. Enumeration
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. case class Val[O](vtkId: Int, niftiId: Short)(implicit evidence$1: Scalar[O], evidence$2: ClassTag[O]) extends ScalarType.Val with Product with Serializable
    Attributes
    protected
  2. abstract class Value extends Ordered[Value] with Serializable
    Definition Classes
    Enumeration
    Annotations
    @SerialVersionUID()
  3. class ValueSet extends AbstractSet[Value] with SortedSet[Value] with SortedSetOps[Value, SortedSet, ValueSet] with StrictOptimizedIterableOps[Value, Set, ValueSet] with Serializable
    Definition Classes
    Enumeration

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val Byte: Val[Byte]
  5. val Double: Val[Double]
  6. val Float: Val[Float]
  7. val Int: Val[Int]
  8. val Short: Val[Short]
  9. val UByte: Val[UByte]
  10. val UInt: Val[UInt]
  11. val UShort: Val[UShort]
  12. final def Value(i: Int, name: String): Value
    Attributes
    protected
    Definition Classes
    Enumeration
  13. final def Value(name: String): Value
    Attributes
    protected
    Definition Classes
    Enumeration
  14. final def Value(i: Int): Value
    Attributes
    protected
    Definition Classes
    Enumeration
  15. final def Value: Value
    Attributes
    protected
    Definition Classes
    Enumeration
  16. final def apply(x: Int): Value
    Definition Classes
    Enumeration
  17. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  18. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  19. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  21. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  22. def fromNiftiId(niftiId: Short): Value

    Return the ScalarType value corresponding to a given Nifti type constant

    Return the ScalarType value corresponding to a given Nifti type constant

    niftiId

    a Nifti type constant

    returns

    the corresponding ScalarType value

    Exceptions thrown

    IllegalArgumentException if no corresponding value was found.

  23. def fromType[T](implicit arg0: Scalar[T], arg1: scala.reflect.api.JavaUniverse.TypeTag[T]): Value

    Return the ScalarType value corresponding to a given type

    Return the ScalarType value corresponding to a given type

    T

    a scalar type

    returns

    the corresponding ScalarType value

    Exceptions thrown

    IllegalArgumentException if no corresponding value was found.

  24. def fromVtkId(vtkId: Int): Value

    Return the ScalarType value corresponding to a given VTK type constant

    Return the ScalarType value corresponding to a given VTK type constant

    vtkId

    a VTK type constant

    returns

    the corresponding ScalarType value

    Exceptions thrown

    IllegalArgumentException if no corresponding value was found.

  25. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  26. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  27. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  28. final def maxId: Int
    Definition Classes
    Enumeration
  29. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  30. var nextId: Int
    Attributes
    protected
    Definition Classes
    Enumeration
  31. var nextName: Iterator[String]
    Attributes
    protected
    Definition Classes
    Enumeration
  32. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  33. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  34. def ofFile(file: File): Try[Value]

    Return the ScalarType value corresponding to the data present in a given file.

    Return the ScalarType value corresponding to the data present in a given file. Only .vtk, .nii and .nia files are supported.

    file

    the file to check

    returns

    the scalar type present in the given file, wrapped in a scala.util.Success, or a scala.util.Failure explaining the error.

  35. def readResolve(): AnyRef
    Attributes
    protected
    Definition Classes
    Enumeration
  36. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  37. def toString(): String
    Definition Classes
    Enumeration → AnyRef → Any
  38. implicit def valueToVal[T](x: Value): Val[T]
  39. def values: ValueSet
    Definition Classes
    Enumeration
  40. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  41. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  42. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  43. final def withName(s: String): Value
    Definition Classes
    Enumeration
  44. implicit object ValueOrdering extends Ordering[Value]
    Definition Classes
    Enumeration

Inherited from Enumeration

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped