Vinci Matlab Interface
4.01.0
|
Instances of this class represent one image within Vinci. More...
Public Member Functions | |
function | Image (in connection, in imageId) |
Creates a new proxy for an image within Vinci. | |
function | getSamplingMode (in obj) |
Returns the sampling mode used when rendering this image. | |
function | setSamplingMode (in obj, in samplingMode) |
Sets the sampling mode used by Vinci when rendering this image. | |
function | loadImageIntoBuffer (in obj, in filename, in varargin) |
Loads an image into the image buffer specified by this Vinci.Image object. | |
function | loadFlatImageIntoBuffer (in obj, in filename, in dims, in pixelsize, in headerSize, in varargin) |
Loads an image from a flat file into the image buffer specified by this Vinci.Image object. | |
function | getDObjects (in obj) |
Returns a vector of all display objects associated with this image. | |
function | getRois (in obj) |
Returns a cell array containing all rois of this image. | |
function | getImageVolume (in obj) |
Returns the volume of an image as a 3d array. | |
function | setImageVolume (in obj, in volume) |
Sets the image volume to a new value. | |
function | getResliceParameters (in obj) |
GETRESLICEPARAMETERS Returns the reslicing parameters of the image. | |
function | setResliceParameters (in obj, in reslice) |
SETRESLICEPARAMETERS Sets the reslicing parameters of the image. | |
function | getMetaInformation (in obj) |
GETMETAINFORMATION Returns metainformation about the image. | |
function | writeBackMetaInformation (in obj, in metainfo) |
function | createRoiRect (in obj, in varargin) |
Creates a new rectangular roi associated with this image object. | |
function | createRoiEllipse (in obj, in varargin) |
Creates a new ellipsoid roi associated with this image object. | |
function | createRoiPolygon (in obj, in varargin) |
Creates a new polygonal roi associated with this image object. | |
function | createAnnotation (in obj, in varargin) |
Creates a new text annotation associated with this image object. | |
function | createProfile (in obj, in varargin) |
Creates a new profile associated with this image object. | |
function | createMeasure (in obj, in varargin) |
Creates a new measure associated with this image object. | |
function | createDisplayGroup (in obj, in varargin) |
Creates a new display group associated with this image object. | |
function | setLinkChannel (in obj, in type) |
Sets the link channel of the image. | |
function | setPalette (in obj, in paletteName, in minPercent, in maxPercent) |
Sets the color palette used by the image. | |
function | clearImage (in obj) |
Clears image buffer and unloads the image. | |
function | cloneImage (in obj, in newVolume, in varargin) |
Creates a copy of the image and replaces the image volume. | |
function | sendMessageToMe (in obj, in xmlStr) |
Sends a message to Vinci's counterpart of the VinciObject and receives an answer. | |
function | sendMessageToTarget (in obj, in target, in xmlStr) |
Sends a message to some target and receives an answer. | |
function | sendMessageToMeNoAnswer (in obj, in xmlStr) |
Sends a message to the VinciObject and tells Vinci to don't send an answer. | |
function | sendMessageToTargetNoAnswer (in obj, in target, in xmlStr) |
Sends a message to some target and tells Vinci to don't send an answer. | |
function | getTargetPartNumber (in obj, in partName) |
Returns the number specified in a part of a target name. | |
Static Public Member Functions | |
static function | loadImage (in connection, in filename, in varargin) |
Loads an image from a file into Vinci and returns a Vinci.Image object, which represents this image. | |
static function | loadFlatImage (in connection, in filename, in dims, in pixelsize, in headerSize, in varargin) |
Loads an image from a flat file. | |
static function | createImageFromMemory (in connection, in volume, in varargin) |
Creates a new image. | |
static function | getAllImages (in connection, in includeUndefined) |
Returns a list containing Vinci.Image objects for all images in Vinci. | |
static function | getIdFromTarget (in connect, in target) |
static function | getTargetNameQuery (in id) |
static function | getTargetFromId (in connect, in id) |
Public Attributes | |
Property | PixelSize |
The size of a pixel in mm as a triple [x, y, z]. | |
Property | PatientName |
The name of the patient in the image. | |
Property | PatientID |
The Id of the patient in the image. | |
Property | Comment |
An additional comment. | |
Property | Dim |
DIM. | |
Property | RotAngles |
RotAngles. | |
Property | RotCenter |
RotCenter. | |
Property | Offset |
Offset. | |
Property | SmplDimension |
SamplingDimensions. | |
Property | CutPosition |
Pos. | |
Property | Zoom |
Zoom. | |
Property< ReadOnly > | FirstFrame |
The number of the first frame in the time series. | |
Property< ReadOnly > | FrameNumber |
The number of this frame in the time series. | |
Property< ReadOnly > | TimeAbsolute |
TIMEABSOLUTE. | |
Property< ReadOnly > | FrameStartSec |
The start time of this frame in seconds. | |
Property< ReadOnly > | FrameDurationSec |
The duration of the measurement of this frame in seconds. | |
Property< ReadOnly > | Min |
The minimum value in the image volume. | |
Property< ReadOnly > | Max |
The maximum value in the image volume. | |
Property< ReadOnly > | PatientDOB |
The day of birth of the patient. | |
Property< ReadOnly > | StudyDate |
The date at which the study took place. | |
Property< ReadOnly > | RadioPharmaceutical |
The radio pharamceutical used. | |
Property< ReadOnly > | DataUnits |
The unit of the voxels in the image volume. | |
Property< ReadOnly > | FormatType |
The fileformat of the image. | |
Property< ReadOnly > | ShortName |
The filename of the image without a path. | |
Property< ReadOnly > | Filename |
The filename of the image with the complete path. | |
Property< ReadOnly > | OriginalFilename |
ORIGINALFILENAME. | |
Property< ReadOnly > | IsDefined |
ISDEFINED. | |
Property< ReadOnly > | id |
Property< ReadOnly > | connection |
The Vinci.Connect object used to communicate with Vinci. | |
Property< ReadOnly > | target |
The target name of the Vinci.VinciObject. |
Instances of this class represent one image within Vinci.
Most image properties, as well as the image volume itself can be queried from Vinci using this class. Some properties and the image volume can be set to new values, as well.
One can create Vinci.Image object in different ways:
function Image | ( | in | connection, |
in | imageId | ||
) |
Creates a new proxy for an image within Vinci.
connection | An object of type Vinci.Connect. This object is used to communicate with Vinci. |
imageId | Either the target name of the image or the number of the image buffer. |
obj | An object of type Vinci.Image. |
function clearImage | ( | in | obj | ) |
Clears image buffer and unloads the image.
obj | The Vinci.Image object, you want to clear. |
function cloneImage | ( | in | obj, |
in | newVolume, | ||
in | varargin | ||
) |
Creates a copy of the image and replaces the image volume.
Several other properties of the image can be modified as well. The meta data of the original image is copied to the new image.
obj | The Vinci.Image object, which is copied. |
newVolume | An n*m*p matrix of float values. The image volume of the cloned image. |
varargin | Additional key-value pairs. Keys must be from the following list:
|
image | A Vinci.Image object. The cloned image. |
function createAnnotation | ( | in | obj, |
in | varargin | ||
) |
Creates a new text annotation associated with this image object.
Properties of the annotation, such as the position, color or rotation can be supplied as well. If these parameters are not given, default values will be used.
obj | A Vinci.Image object. |
varargin | Additional key-value pairs. Keys must be from the following list:
|
annotation | A Vinci.Annotation object, which represents the new annotation. |
function createDisplayGroup | ( | in | obj, |
in | varargin | ||
) |
Creates a new display group associated with this image object.
Properties of the display group, such as the geometry, color or rotation can be supplied as well. If these parameters are not given, default values will be used.
obj | A Vinci.Image object. |
varargin | Additional key-value pairs. Keys must be from the following list:
|
group | A Vinci.DisplayGroup object, which represents the new roi. |
static function createImageFromMemory | ( | in | connection, |
in | volume, | ||
in | varargin | ||
) | [static] |
Creates a new image.
The image volume is not read from a file, but must already be available as a 3d float array. You can use this function to create a new image in Vinci base on a computed image in Matlab.
connection | A Vinci.Connect object. |
volume | An n*m*p float matrix. Stores the image volume of the new image. |
varargin | Additional key-value pairs. Keys must be from the following list:
|
image | A Vinci.Image object. The newly created image. |
function createMeasure | ( | in | obj, |
in | varargin | ||
) |
Creates a new measure associated with this image object.
Properties of the measure, such as the geometry, color or rotation can be supplied as well. If these parameters are not given, default values will be used.
obj | A Vinci.Image object. |
varargin | Additional key-value pairs. Keys must be from the following list:
|
measure | A Vinci.Measure object, which represents the new measure. |
function createProfile | ( | in | obj, |
in | varargin | ||
) |
Creates a new profile associated with this image object.
Properties of the profile, such as the geometry, color or rotation can be supplied as well. If these parameters are not given, default values will be used.
obj | A Vinci.Image object. |
varargin | Additional key-value pairs. Keys must be from the following list:
|
profile | A Vinci.Profile object, which represents the new profile. |
function createRoiEllipse | ( | in | obj, |
in | varargin | ||
) |
Creates a new ellipsoid roi associated with this image object.
Properties of the roi, such as the geometry, color or rotation can be supplied as key-value pairs. If these parameters are not given, default values will be used.
obj | A Vinci.Image object. |
varargin | Additional key-value pairs. Keys must be from the following list:
|
roi | A Vinci.RoiEllipse object, which represents the new roi. |
function createRoiPolygon | ( | in | obj, |
in | varargin | ||
) |
Creates a new polygonal roi associated with this image object.
Properties of the roi, such as the geometry, color or rotation can be supplied as key-value pairs. If these parameters are not given, default values will be used.
obj | A Vinci.Image object. |
varargin | Additional key-value pairs. Keys must be from the following list:
|
roi | A Vinci.RoiPolygon object, which represents the new roi. |
function createRoiRect | ( | in | obj, |
in | varargin | ||
) |
Creates a new rectangular roi associated with this image object.
Properties of the roi, such as the geometry, color or rotation can be supplied as key-value pairs. If these parameters are not given, default values will be used.
obj | A Vinci.Image object. |
varargin | Additional key-value pairs. Keys must be from the following list:
|
roi | A Vinci.RoiRect object, which represents the new roi. |
static function getAllImages | ( | in | connection, |
in | includeUndefined | ||
) | [static] |
Returns a list containing Vinci.Image objects for all images in Vinci.
connection | A Vinci.Connect object. Used to communicate with Vinci. |
includeUndefined | optional. A logical. If includeUndefined is set to true , image buffers, which do not contain valid images are returned as well. Otherwise, only valid image buffers are returned. The default is false . |
images | A vector of Vinci.Image objects. |
function getDObjects | ( | in | obj | ) |
Returns a vector of all display objects associated with this image.
obj | A Vinci.Image object. |
dobjects | A vector containing all display objects associated with this image. Each display object is given by a struct containing its target name (field target) and it's type (field type). |
static function getIdFromTarget | ( | in | connect, |
in | target | ||
) | [static, inherited] |
function getImageVolume | ( | in | obj | ) |
Returns the volume of an image as a 3d array.
The elements of the array are 4 byte float values. The dimension matches the value of the property Dim. The size of each voxel can be queried using the property PixelSize.
obj | Vinci.Image object. |
volume | An n*m*p matrix of type float. The image volume. |
function getMetaInformation | ( | in | obj | ) |
GETMETAINFORMATION Returns metainformation about the image.
metainfo = vi.getMetaInformation() returns a struct containing meta information about the image.
function getResliceParameters | ( | in | obj | ) |
GETRESLICEPARAMETERS Returns the reslicing parameters of the image.
reslice = vi.getResliceParameters() returns a struct containing the reslicing parameters of the image. The struct contans the the fields 'Pos' (cutposition in mm), 'Offset' (translation of the image in mm), 'RotAngles' (rotation around the x, y and z axis in degree), 'RotCenter' (center of rotation in mm), 'SmplDimension' (sampling dimensions in voxels) and SmplPixelSize (sampling pixelsize).
See also setResliceParameters().
function getRois | ( | in | obj | ) |
Returns a cell array containing all rois of this image.
obj | A Vinci.Image object. |
rois | A cell array of all roi objects (Vinci.Roi2DRect, Vinci.Roi2DEllipse or Vinci.Roi2DPolygon) associated with this image. |
function getSamplingMode | ( | in | obj | ) |
Returns the sampling mode used when rendering this image.
obj | A Vinci.Image object. |
samplingMode | The sampling mode used by Vinci. Must be one of the values in Vinci.Constants.SamplingMode. |
static function getTargetFromId | ( | in | connect, |
in | id | ||
) | [static, inherited] |
static function getTargetNameQuery | ( | in | id | ) | [static, inherited] |
function getTargetPartNumber | ( | in | obj, |
in | partName | ||
) | [inherited] |
Returns the number specified in a part of a target name.
Target names consist of a hierarchy of numbered objects, e.g. '::Project_0::Image_3'. This function returns the number to a given object.
obj | The Vinci.VinciObject instance. The target property of this object is used as target name. |
partName | A substring of the target name for which the number should be returned. Examples are 'Project_' or 'Image'. The trailing _ can be left out. |
number | The number extracted from the target name of the object. |
>> obj = Vinci.VinciObject(connection, '::Project_0::Image_3'); >> imageNumber = obj.getTargetPartNumber('Image') % imageNumber is 3 (as an float)
static function loadFlatImage | ( | in | connection, |
in | filename, | ||
in | dims, | ||
in | pixelsize, | ||
in | headerSize, | ||
in | varargin | ||
) | [static] |
Loads an image from a flat file.
You have to specify the number of voxels in x, y and z direction, the pixel size in mm as well as the byte offset within the file, at which the image data is located. You can further specify whether the data is stored in big or little endian and the datatype used to store each voxel value.
connection | A Vinci.Connect object. Used to communicate with Vinci. |
filename | A string. The name of the image file. |
dims | A 3x1 matrix with the number of pixels in x, y and z direction. |
pixelsize | A 3x1 matrix with the size (in mm) of each voxel in x, y and z direction. |
headerSize | An integer. The location in the file, at which the image data starts. The value is 0-based. If the image data starts with the first byte, set headerSize to 0. |
varargin | Additional key-value pairs. Keys must be from the following list:
|
image | A Vinci.Image object. |
function loadFlatImageIntoBuffer | ( | in | obj, |
in | filename, | ||
in | dims, | ||
in | pixelsize, | ||
in | headerSize, | ||
in | varargin | ||
) |
Loads an image from a flat file into the image buffer specified by this Vinci.Image object.
See Vinci.Image.loadFlatImage() for more information.
obj | A Vinci.Image object. The new image will be stored in the image buffer referenced by this object. |
filename | A string. The name of the image file. |
dims | A 3x1 matrix with the number of pixels in x, y and z direction. |
pixelsize | A 3x1 matrix with the size (in mm) of each voxel in x, y and z direction. |
headerSize | An integer. The location in the file, at which the image data starts. The value is 0-based. If the image data starts with the first byte, set headerSize to 0. |
varargin | Additional key-value pairs. Keys must be from the following list:
|
static function loadImage | ( | in | connection, |
in | filename, | ||
in | varargin | ||
) | [static] |
Loads an image from a file into Vinci and returns a Vinci.Image object, which represents this image.
connection | A Vinci.Connect object. Used to communicate with Vinci. |
filename | A string. The name of the image file. |
varargin | Additional key-value pairs. Keys must be from the following list:
|
image | A Vinci.Image object, which represents the loaded image. |
function loadImageIntoBuffer | ( | in | obj, |
in | filename, | ||
in | varargin | ||
) |
Loads an image into the image buffer specified by this Vinci.Image object.
obj | A Vinci.Image object. Vinci will load the image into the image buffer specified by this object. |
filename | A string. The name of the image file. |
varargin | Additional key-value pairs. Keys must be from the following list:
|
function sendMessageToMe | ( | in | obj, |
in | xmlStr | ||
) | [inherited] |
Sends a message to Vinci's counterpart of the VinciObject and receives an answer.
obj | The Vinci.VinciObject instance. |
xmlStr | A string. The message Matlab sends to Vinci. |
answer | A string. The answer returned by Vinci. |
function sendMessageToMeNoAnswer | ( | in | obj, |
in | xmlStr | ||
) | [inherited] |
Sends a message to the VinciObject and tells Vinci to don't send an answer.
obj | The Vinci.VinciObject instance. |
xmlStr | A string. The message Matlab sends to Vinci. |
function sendMessageToTarget | ( | in | obj, |
in | target, | ||
in | xmlStr | ||
) | [inherited] |
Sends a message to some target and receives an answer.
obj | The Vinci.VinciObject instance. |
target | A string. The name of the target. |
xmlStr | A string. The message Matlab sends to Vinci. |
answer | A string. The answer returned by Vinci. |
function sendMessageToTargetNoAnswer | ( | in | obj, |
in | target, | ||
in | xmlStr | ||
) | [inherited] |
Sends a message to some target and tells Vinci to don't send an answer.
obj | The Vinci.VinciObject instance. |
target | A string. The name of the target. |
xmlStr | A string. The message Matlab sends to Vinci. |
function setImageVolume | ( | in | obj, |
in | volume | ||
) |
Sets the image volume to a new value.
obj | a Vinci.Image object. |
volume | An n*m*p matrix of type float. The new image volume. Vinci will automatically resize the image if the new image size does not correspond to the old image size. |
function setLinkChannel | ( | in | obj, |
in | type | ||
) |
Sets the link channel of the image.
obj | A Vinci.Image object. The image, for which you want to set the link channel. |
type | A string. The link channel, you want to use. Must be one of the values in Vinci.Constants.LinkChannels. |
function setPalette | ( | in | obj, |
in | paletteName, | ||
in | minPercent, | ||
in | maxPercent | ||
) |
Sets the color palette used by the image.
obj | A Vinci.Image object. |
paletteName | A string. The name of the color palette. Must be one of the values stored in Vinci.Constants.Palettes. |
minPercent | An integer between 0 and 100. The location in the color palette, which maps to the smallest value in the image volume. |
maxPercent | An integer between 0 and 100. The location in the color palette, which maps to the largest value in the image volume. |
function setResliceParameters | ( | in | obj, |
in | reslice | ||
) |
SETRESLICEPARAMETERS Sets the reslicing parameters of the image.
vi.setResliceParameters(reslice) sets the reslicing parameters of the image. 'reslice' is a struct, which can contain the same fields that are returned by getResliceParameters(). The struct does not have to contain all fields, however.
function setSamplingMode | ( | in | obj, |
in | samplingMode | ||
) |
Sets the sampling mode used by Vinci when rendering this image.
obj | A Vinci.Image object. |
samplingMode | The new sampling mode, Vinci should use. Must be of the values in Vinci.Constants.SamplingMode. |
function writeBackMetaInformation | ( | in | obj, |
in | metainfo | ||
) |
Property Comment |
An additional comment.
Property<ReadOnly> connection [inherited] |
The Vinci.Connect object used to communicate with Vinci.
This object determines, with which instance of Vinci the object will talk.
Property CutPosition |
Pos.
Property<ReadOnly> DataUnits |
The unit of the voxels in the image volume.
If no unit has been defined, this property holds the value 'undefined'.
Property Dim |
DIM.
Property<ReadOnly> Filename |
The filename of the image with the complete path.
Property<ReadOnly> FirstFrame |
The number of the first frame in the time series.
Property<ReadOnly> FormatType |
The fileformat of the image.
Property<ReadOnly> FrameDurationSec |
The duration of the measurement of this frame in seconds.
Property<ReadOnly> FrameNumber |
The number of this frame in the time series.
Property<ReadOnly> FrameStartSec |
The start time of this frame in seconds.
The time is relative to the beginning of the image series.
Property<ReadOnly> id [inherited] |
Property<ReadOnly> IsDefined |
ISDEFINED.
Property<ReadOnly> Max |
The maximum value in the image volume.
Property<ReadOnly> Min |
The minimum value in the image volume.
Property Offset |
Offset.
Property<ReadOnly> OriginalFilename |
ORIGINALFILENAME.
Property<ReadOnly> PatientDOB |
The day of birth of the patient.
Property PatientID |
The Id of the patient in the image.
Property PatientName |
The name of the patient in the image.
Property PixelSize |
The size of a pixel in mm as a triple [x, y, z].
Property<ReadOnly> RadioPharmaceutical |
The radio pharamceutical used.
This value is only relevant for PET measurements.
Property RotAngles |
RotAngles.
Property RotCenter |
RotCenter.
Property<ReadOnly> ShortName |
The filename of the image without a path.
Property SmplDimension |
SamplingDimensions.
Property<ReadOnly> StudyDate |
The date at which the study took place.
Property<ReadOnly> target [inherited] |
The target name of the Vinci.VinciObject.
Target names are strings in the form '::', '::Project_0' or '::Project_0::Image_0'.
Property<ReadOnly> TimeAbsolute |
TIMEABSOLUTE.
Property Zoom |
Zoom.