class_docstr: Convenience class to encapsulate TCK file format.
  
  Notes
  -----
  MRtrix (so its file format: TCK) considers streamlines coordinates
  to be in world space (RAS+ and mm space). MRtrix refers to that space
  as the "real" or "scanner" space [#]_.
  
  Moreover, when streamlines are mapped back to voxel space [#]_, a
  streamline point located at an integer coordinate (i,j,k) is considered
  to be at the center of the corresponding voxel. This is in contrast with
  TRK's internal convention where it would have referred to a corner.
  
  NiBabel's streamlines internal representation follows the same
  convention as MRtrix.
  
  .. [#] http://www.nitrc.org/pipermail/mrtrix-discussion/2014-January/000859.html
  .. [#] http://nipy.org/nibabel/coordinate_systems.html#voxel-coordinates-are-in-voxel-space
class_docstr_tok: ["Convenience","class","to","encapsulate","TCK","file","format",".","Notes","--","--","-","MRtrix","(","so","its","file","format",":","TCK",")","considers","streamlines","coordinates","to","be","in","world","space","(","RAS+","and","mm","space",")",".","MRtrix","refers","to","that","space","as","the","``","real","''","or","``","scanner","''","space","[","#","]","_",".","Moreover",",","when","streamlines","are","mapped","back","to","voxel","space","[","#","]","_",",","a","streamline","point","located","at","an","integer","coordinate","(","i",",","j",",","k",")","is","considered","to","be","at","the","center","of","the","corresponding","voxel",".","This","is","in","contrast","with","TRK","'s","internal","convention","where","it","would","have","referred","to","a","corner",".","NiBabel","'s","streamlines","internal","representation","follows","the","same","convention","as","MRtrix",".","..","[","#","]","http",":","\/\/www.nitrc.org\/pipermail\/mrtrix-discussion\/2014-January\/000859.html","..","[","#","]","http",":","\/\/nipy.org\/nibabel\/coordinate_systems.html","#","voxel-coordinates-are-in-voxel-space"]
docstr: Check if the file is in TCK format.
  
  Parameters
  ----------
  fileobj : string or file-like object
      If string, a filename; otherwise an open file-like object in
      binary mode pointing to TCK file (and ready to read from the
      beginning of the TCK header). Note that calling this function
      does not change the file position.
  
  Returns
  -------
  is_correct_format : {True, False}
      Returns True if `fileobj` is compatible with TCK format,
      otherwise returns False.
docstr_tok: ["Check","if","the","file","is","in","TCK","format",".","Parameters","--","--","--","--","--","fileobj",":","string","or","file-like","object","If","string",",","a","filename",";","otherwise","an","open","file-like","object","in","binary","mode","pointing","to","TCK","file","(","and","ready","to","read","from","the","beginning","of","the","TCK","header",")",".","Note","that","calling","this","function","does","not","change","the","file","position",".","Returns","--","--","--","-","is_correct_format",":","{","True",",","False","}","Returns","True","if","`","fileobj","`","is","compatible","with","TCK","format",",","otherwise","returns","False","."]
code: def is_correct_format(cls, fileobj):
      """Check if the file is in TCK format.
  
      Parameters
      ----------
      fileobj : string or file-like object
          If string, a filename; otherwise an open file-like object in
          binary mode pointing to TCK file (and ready to read from the
          beginning of the TCK header). Note that calling this function
          does not change the file position.
  
      Returns
      -------
      is_correct_format : {True, False}
          Returns True if `fileobj` is compatible with TCK format,
          otherwise returns False.
      """
      with Opener(fileobj) as f:
          magic_number = f.read(len(cls.MAGIC_NUMBER))
          f.seek(-len(cls.MAGIC_NUMBER), os.SEEK_CUR)
  
      return magic_number == cls.MAGIC_NUMBER
  
imports: import os
  import warnings
  from contextlib import suppress
  import numpy
  from nibabel.openers import Opener
  from .array_sequence import ArraySequence
  from .header import Field
  from .tractogram import LazyTractogram, Tractogram, TractogramItem
  from .tractogram_file import DataError, DataWarning, HeaderError, HeaderWarning, TractogramFile
  from .utils import peek_next
label_desc: Use image node_id 2 for calling the TckFile obj's underlying member method code with example usage: obj.is_correct_format(cls, fileobj) and returns: unknown