Read Image Express VI

LabVIEW 2013 Biomedical Toolkit Help

Edition Date: June 2013

Part Number: 373696B-01

»View Product Info
Download Help (Windows Only)

Owning Palette: Biomedical File I/O Express VIs

Requires: Biomedical Toolkit

Reads images from different file types, such as BMP, JPEG, PNG, and DICOM.

Examples

Dialog Box Options
Block Diagram Inputs
Block Diagram Outputs

Dialog Box Options

ParameterDescription
Read ActionSpecifies whether to read images from one image file, from multiple image files, or from a DICOMDIR/IMGDIR.
  • Read single/multiframe image file—Specifies to read images from one image file.
  • Read multiple image files—Specifies to read images from multiple image files.
  • Read DICOMDIR/IMGDIR—Specifies to read images from a directory containing DICOMDIR files or IMGDIR files.
File Path ConfigurationSpecifies settings for the file path.
  • File path—Specifies the path to the image file from which you want to read images. This option is available only when you select Read single file in Read Action.
  • Folder path—Specifies the path to the folder that contains multiple image files, from which you want to read images. This option is available only when you select Read multiple files in Read Action.
  • IMGDIR path—Specifies the path to the DICOMDIR/IMGDIR directory from which you want to read images. This option is available only when you select Read DICOMDIR / IMGDIR in Read Action.
  • Image Name Format—Specifies the format of the image filenames. The options in Image Name Format are available only when you select Read multiple files in Read Action.
    • String prefix—Specifies the string prefix of image filenames. For example, if brain_001 is the image filename, brain_ is the string prefix.
    • Number suffix width—Specifies the width of number suffix for image filenames. For example, if brain_001 is the filename, 001 is the number suffix and the width of number suffix is 3.
  • Image Index—Specifies the start and end indexes of a series of image files that you want to read. The options in Image Index are available only when you select Read multiple files in Read Action or if you select a single DICOM image containing multiple images.
    • File start—Specifies the first number of the image index. This option is only available when you select Read multiple files in Read Action.
    • File end—Specifies the last number of the image index. This option is only available when you select Read multiple files in Read Action.
    • Frame start—Specifies the first number of the frame index. This option is only available when you select a single DICOM image containing multiple image.
    • Frame end—Specifies the last number of the frame index. This option is only available when you select a single DICOM image containing multiple image.
  • File type—Specifies the format of the image that this VI reads. You can choose from the following options:
    • BMP (.bmp) (default)
    • JPEG (.jpg,.jpeg)
    • PNG (.png)
    • DICOM (.dcm)
  • Save Paths to IMGDIR—Chooses the directory where this VI saves the images as an IMGDIR.
  • File path preview—Displays a preview of the path to the files from which you want to read images.
  • Show file path terminals?—Specifies whether to show the file path in and file path out block diagram controls of this VI. The default is FALSE. When you set this option to TRUE, you must select the correct data type in Data type. This option is available only when you select Read single file in Read Action.
  • Show folder path terminals?—Specifies whether to show the folder path in and folder path out block diagram controls for this VI. The default is FALSE. When you set this option to TRUE, you must select the correct data type in Data type. This option is available only when you select Read multiple files in Read Action.
  • Show IMGDIR path terminals?—Specifies whether to show the Series index, IMGDIR path in, and Image file paths out block diagram controls for this VI. The default is FALSE. When you set this option to TRUE, you must select the correct data type in Output Data Type. This option is available only when you select Read DICOMDIR / IMGDIR in Read Action.
  • IMGDIR structure—Displays the file structure of the DICOMDIR/IMGDIR directory.
Image PreviewContains an image preview, preview controls, and image information for the image that you specify.
  • Image index—Specifies the index of the image file that you want to preview.
  • Image preview information—Displays the file information about the image file that you select to preview.
  • Image preview—Displays a preview of the image that you specify.
Output OptionsContains the following output options:
  • Data type—Specifies the data type for this VI to return image data.
  • Scale factor—Specifies the scale factor to downsample an image when the size of the image is larger than 1 GB. The default is 1, which specifies not to downsample the images.
  • DICOM tags—Specifies the DICOM tag names to use when reading from the image files. The specified tag names must be from the DICOM 2011 standard.

Block Diagram Inputs

ParameterDescription
error in (no error)Describes error conditions that occur before this node runs.
file path inSpecifies the path to the image file from which you want to read images.
folder path inSpecifies the path to the folder that contains multiple image files, from which you want to read images.
IMGDIR path inSpecifies the path of the IMGDIR or DICOMDIR from which you want to read images.
DICOM tag namesSpecifies the DICOM tag names to use when reading from the image files. The specified tag names must be from the DICOM 2011 standard.
scale factorSpecifies the scale factor for downsampling images.
series indexSpecifies which image series to read from an indexed DICOMDIR directory.
startSpecifies the first image file or frame index you would like the Read Image Express VI to read.
endSpecifies the last image file or frame index you would like the Read Image Express VI to read.

Block Diagram Outputs

ParameterDescription
2D arrayReturns image data for a single image.
3D arrayReturns image data for multiple images.
attributes outReturns the image attributes of the image file or image files.
error outContains error information. This output provides standard error out functionality.
file path outReturns the output file path.
folder path outReturns the output folder path.
image file paths outReturns the file paths for the image series.
DICOM tags outReturns the DICOM tags of a single image file. Each cluster in the array contains five elements, which are tag name, tag value array, group ID, tag ID, and tag type.
multiple DICOM tags outReturns the DICOM tags of multiple image files. Each row of the array contains the DICOM tags for each DICOM file. Each cluster in the array contains five elements, which are tag name, tag value array, group ID, tag ID, and tag type.

Examples

Refer to the following VIs for examples of using the Read Image VI:

  • Medical Image File Format Converter VI: labview\examples\Biomedical\Medical Image
  • 3D Image Reconstructor VI: labview\examples\Biomedical\Medical Image
  • Write and Read DICOM Tags VI: labview\examples\Biomedical\Medical Image

WAS THIS ARTICLE HELPFUL?

Not Helpful