META 2.0 stores are planned to be opening in various Canadian cities in 2019 and beyond. We look forward to serving you through our Friendly Guides. Stay tuned for future news about store rollouts by signing up for our newsletter. MetaImage 1.6.0 Multilingual macOS 26 mb MetaImage is the ultimate tool to read, write and edit images metadata. This is first editor that allows you to edit EXIF, IPTC and XMP t.
MetaImage is the text-based tagged file format for medical images that resulted. We have now extended that file format to support a variety of objects that occur in medicine such a tubes (for vessels, needles, etc.), blobs (for arbitrary shaped objects), cubes, spheres, etc. The complete library is known at MetaIO.
The central code of MetaImage/MetaIO is quite stable. MetaImage has been in use for several years by a wide range of research at UNC, Chapel Hill. New features are occasionally added, but backward compatibility will always be maintained.
The upstream MetaIO Git repository:
Tipard mac video converter ultimate 9 1. MetaIO is being distributed with the following packages:
MetaIO is a hierarchy of C++ classes and functions. We have yet to find a modern C++ compiler that does not compile MetaIO. Know compatible compilers include G++ v2.95 and beyond (and probably previous), Microsoft Visual C++ 6.0, Sun’s CC on Solaris 2.6 and beyond, Intel compiler and compilers on other workstations including HPs, SGIs, and Alpha systems. Please contact us (Stephen R. Aylward, stephen.aylward@kitware.com or Julien Jomier, julien.jomier@kitware.com) if you encounter any incompatibilities between our code and your compiler.
MetaIO should be built as part of the standard ITK and VTK installations. It is also quite easy to use MetaIO from within these toolkits without using the rest of the toolkit.
The hierarchy of the software in the stand-alone MetaIO package is as follows:
The top level contains the source files, the header files, and the CMakeLists.txt file that is used by the CMake program to compile MetaIO. This document and the MetaObjects www pages are in the doc directory. A sequence of simple tests is available in the tests directory.
The hierarchy of the software in the Insight and InsightApplications distributions is as follows:
Routines that wrap MetaIO for ITK's image IO object factory are in
Routines that wrap MetaIO for reading and writing ITKS's Spatial Objects (tubes, blobs, ellipses, meshes, etc.) are in
Certain examples, such as the MetaImageViewer, also require FLTK (a cross-platform user interface library available from http://fltk.org). Install FLTK and then ITK and then InsightApplications to have every MetaIO example built. Numerous other examples and applications in InsightApplications also rely on FLTK.
See the file /Insight/Examples/MetaImageReadWrite for a working example on how to develop a program using MetaImage for IO.
The hierarchy of the software in the Visualization toolkit is as follows:
MetaIO can also be compiled outside of these toolkits. This is left as an exercise to the user (hint: requires the kwsys and zlib libraries). Instead of a stand-alone installation, we highly recommend using the distribution in ITK - if you build ITK, you get MetaIO for free!
This section assumes that you have data that you wish to process using an application that reads MetaImages. This section gives examples on how “convert” your data to the MetaImage format.
For uncompressed data, “conversion” to MetaImage is actually just a matter of specifying a MetaImage Headerfile (a “MetaHeader”) that describes and points to the file(s) containing your data.
For compressed data, you must first convert your data to a non-compressed format. One of the most robust image conversion software packages is ImageMagick (http://www.imagemagick.org/; Unix and PC versions available). It has an application called “convert” that handles most of the popular 2D image formats.
MetaImageImporter asks a series of questions about your data and then produces a MetaImage header file that points to your data and allows the MetaIO library to read your data.
MetaImageImporter is part of the InsightApplications repository. See http://www.itk.org for information on downloading and installing InsightApplications - the companion to the Insight repository.
MetaImageImporter now has a QT graphical user interface. Please see the documentation.
String to sha256. Otherwise, the following two sub-sections will step you through the conversion process. The first sub-section applies if all of your data is in one file, i.e., is a 'brick-of-bytes'. The second sub-section applies if your data is spread across files, e.g., is dicom or a tiff sequence.
A “brick of bytes” is a volume of image data stored in a single file possibly with preceding and trailing non-image data. A volume can be of any dimension (1 dimensional to N dimensional).
To correctly load these images, the minimal information that you need to know is:
For example, let’s say the data was 3 dimensional, had 256 x 256 x 64 voxels, used an unsigned short to represent the value at each voxel, and was stored in the file “image.raw”. The resulting MetaHeader (our naming convention would call this file “image.mhd”) file would read
That’s it, but this assumes quite a bit about the image data. Specifically, it assumes
Mac os office crack. If these assumptions are false, the data will not be loaded correctly by the application. To fix these problems, MetaIO allows you to specify additional tag/value pairs in the header:
where X is the number of bytes to skip at the beginning of the file before reading image data. If you know there are no trailing bytes (extra bytes at the end of the file) you can specify
and MetaImage will automatically calculate the number of extract bytes in the data file, assume they those bytes are at the head of the data file, and automatically skip them before beginning to read the image data.
where X is the distance between of the centers of the voxels along the x-dimension, Y is the spacing in the y-dimension, and Z is the spacing in the z-dimension. Therefore, to specify a 1x1x3mm voxel spacing, use
NOTE: If ElementSpacing is not specified, it is assumed to be equal to ElementSize. If neither is specified, both are assumed to be 1.
where X Y Z represent the size in the x, y, and z-dimensions respectively.
NOTE: If ElementSize is not specified, it is assumed to be equal to ElementSpacing. If neither is specified, both are assumed to be 1.
or
MSB (aka big-endian) ordering is common to SPARC and Motorola processors (e.g., Macintoshes). LSB (aka little-endian) ordering is common to Intel processors (e.g., PC compatibles).
Putting it all together, to “convert” a file containing the image data in a continuous block at the end of the file, specify the header
If the data is split into one slice per file, as is done with most DICOM object files, only the ElementDataFile tag’s option needs to change. Note that 3D DICOM object files are becoming popular, and some such DICOM files can be read using the above, volume, technique.
Since the MetaLibrary cannot directly parse DICOM headers, those headers must be skipped and the user must specify the image dimensions and other essential image information. For DICOM files, the MetaLibrary must automatically calculate the header size of each file (luckily for almost every DICOM object the image data is stored at the end of the file). For this reason, this method only works for uncompressed files.
To specify which files comprise the volume, they can be specified as an ordered list in the MetaHeader using the ElementDataFile=LIST option. The filenames should be listed at the end of the MetaHeader, after the ElementDataFile option, and the filenames should be separated by whitespace:
This method works even if there are spaces in the file paths and file names.
Notice that this method can become tedious if a large number of files need to be read. To alleviate this, a second way of specifying a series of files can be used if the filenames are numerically distinguished. That is, the file names should be able to be specified using a numeric substitution into a c-style printf-string, for a range of values. In pseudo-code:
The parameters of this system are numBegin, numEnd, numStep, and the c-style printf string (e.g., “baseName.%03d”). The begin, end, and step parameters appear in order after the c-style printf string:
The above MetaImage header will cause the files “baseName.001” to “baseName.100” to be read to create a 100-slice volume. This method works even if there are spaces in the file paths and file names. However, when spaces are present in the file path and/or file name, all three parameters (begin, end, and step) need to be specified as the last parameters. The remaining parameters (initially parsed based on spaces) are then joined back together (including spaces) to generate the file name.
In some cases, it may be helpful to skip slices in the volume. Changing the slice spacing and the ElementDataFileNumStep enacts this…
The complete set of MetaImage Tags are given in the Reference section of this document. The next section discusses how to use the MetaImage Library for image reading and writing in your own programs.
The base class of the MetaIO library is the MetaObject class. It defines a base set of tags that are common to all metaObjects such as MetaImages, MetaTubes, etc.
The tags are defined using the protected member functions SetupReadFields and SetupWriteFields. These functions create a list of MetaFieldRecords to define the name, type, interdependence, and necessity of each tag. Helper functions for defining the fields are in MetaUtils.cxx. The types are defined via enums in MetaTypes.h
The derived classes add tags to the list via their own SetupReadFields and SetupWriteFields member functions. The MetaImage subclass also re-implements the Read and Write methods since non tag data (i.e., the pixel values) must also be read. Compare the derived classes for MetaCube and MetaImage.
In this section we describe the metaObjects which have been implemented already. If you want to implement other objects, you can easily derive these classes. metaObject is the base class for metaIO. metaScene and metaGroup are also a useful objects that support multiple metaObjects.All these objects are described in details next.
Simple constructor
Read a metafile and store the result in the current object
Define the dimension of the object at construction time.
Specify the filename to read (Optional)
Read a MetaFile
Write a MetaFile
Print the info about the metaObject
Clear the information as well as the data of the metObject
Name:
Color:
ID:ID number of the current metaObject
Parent ID:ID number of the parent metaObject
Binary Data:Specify if the data is binary or not
Binary Data Byte Order:
Comments:
Object Typename and optional subtype (i.e. the type of the object)
Physical location (in millimeters and with respect to machine coordinate system or the patient) of the first element in the image. Physical orientation of the object is defined as an NDims x NDims matrix.
Offset: (equiv. to position and origin)
Position: (equiv. to offset and origin)
Origin: (equiv. to offset and position)
Rotation: (equiv. to orientation and transformMatrix)
Orientation: (equiv. to rotation and transformMatrix)
TransformMatrix: (equiv. to rotation and orientation)
Center of rotation of the object:
Anatomical Orientation:
Element Spacing:Physical Spacing (in same units as position)
For simplicity, some dynamic functions have been recently added. They allow the user to add fields dynamically.
The function AddUserField is defined by:
The user may also want to clear the fields created by using
To determine the value of a field
Note: When using GetUserField() function, the user is responsible for the deletion of the pointer created. See the following example for details.
All of the following objects derive from metaObject.
A blob is defined by a list of points that describe the object. The points can be inside the object (if obtained by connected-component for instance) or only on the surface. Note that a color (RGBA) can be associated which each point.
The required fields are:
To access the internal list of points user should use the GetPoints() function which returns the internal list by reference. Note that the list is a list of pointers to point and is deleted automatically by the object itself so the user does not need to free the allocated memory.
MetaEllipse is an N-Dimensional object to define ellipsoids like circles, spheres or even hyper-ellipsoids.
There are several ways to input the radius:
MetaGroup does not have added functionalities compared to metaObject. It allows to group object in a metafile.
Simple constructor by specifying the filename
Constructor by shared memory
Other constructors
HeaderSize: Return the size of the header.
Quantity: Total number of elements in the image.
SubQuantity: Number of elements in image spanning sub-dimensions. E.g., elements per line, 2D sub-image, 3D sub-volume.
ElementMin/Max: The default max returned is the largest allowed by ElemNBytes (12 bit uint16_t will give 4096 max). This may not represent the true max. Use _reCalc=true to force a calcuation of the actual max element value.
ElementByteOrderSwap: These functions are available only after ReadImageData() or if _read_and_close=TRUE when read
ConverTo: Converts to a new data type. Rescales using Min and Max.
Modality: Specify the modality of the image
Dimension size: Specify the size of the image in each dimension
SequenceID: DICOM designation of this image relative to other images acquired at the same time
ElementSize: Optional Field. Physical size (in MM) of each element in the image (0 = xSize, 1 = ySize, 2 = zSize)
ElementType: Pixel type
ElementNumberOfChannels: Number of channels
ElementData: Returns a pointer to the data.
ElementDataFileName: Set/Get the filename
MetaLandmark is a simple list of landmarks. Estudio de tiempos y movimientos meyers pdf.
The number of landmarks defining the object is set using the function
How the position of the points is stored in the file: By default the configuration is x y z red green blue alpha
To access the internal list of points user should use the GetPoints() function which returns the internal list by reference. Note that the list is a list of pointers to point and is deleted automatically by the object itself so the user does not need to free the allocated memory.
A metaLine is actually a polyline defined by a list of connected points.A point on the line has a given position, a normal and a color.
To set the position the local variable m_X should be filled in the point structure. The variable m_V which is a double pointer to a float is used to assess the normal. The normal has the dimension of the object minus one since a metaLine in a 3D space will have two normals (a plane).
Note that the user does not need to allocate the memory for those variables, this is done automatically in the constructor of the point.
To access the internal list of points user should use the GetPoints() function which returns the internal list by reference. Note that the list is a list of pointers to point and is deleted automatically by the object itself so the user does not need to free the allocated memory.
The definition of a metaSurface is quite similar to the metaLine’s, except for the normal which is only a NDim vector (i.e. an array of floats) where NDim is the dimension of the metaObject.
To access the internal list of points user should use the GetPoints() function which returns the internal list by reference. Note that the list is a list of pointers to point and is deleted automatically by the object itself so the user does not need to free the allocated memory.
A metaTube is a tubular structure defined by a list of connected points (like a metaLine) but more fields have been added for a complete representation, especially the one of blood vessels.To specify a point that belongs to the tube, the user can define: the position, the radius at that point, the normal(s), the tangent, the color, the Identification number, the medialness, the branchness, the ridgeness, and three alpha values that represents the ratio of the eigen values at that points.
Note that metaTube supports only 2D and 3D tubes.
Also for a metaTube, the ID of the root can be specified by the command Root(int rootID) and the ID of the parent point can also be assessed using ParentPoint(int parentpoint).
To access the internal list of points user should use the GetPoints() function which returns the internal list by reference. Note that the list is a list of pointers to point and is deleted automatically by the object itself so the user does not need to free the allocated memory.
A metaScene is a metaObject that contains a flat list of metaObjects.
Add an object to the scene:
Return the number of objects in the scene:
Get a list of objects present in the scene:
Here is the example of a metafile with a scene that contains metaObjects
MetaIO has also been chosen to support Spatial Objects IO. To obtain a complete documentation of Spatial Objects and how to read/write them out please see the Insight user’s manual available at www.itk.org.
The tags of MetaObject are:
In addition to the above tags, MetaImage provides the following tags: