BRISC::Core::Util Class Reference

Contains miscellaneous static methods and constants, primarily dealing with DICOM file interaction. More...

List of all members.

Public Member Functions

delegate double[][,] FeatureMethod (int[,] data)
 Delegate for use with FindHistCutoff. Will point to the function which performs feature extraction. Only works for feature methods which return arrays of feature matrices.

Static Public Member Functions

static void SetDataPath (string path)
 Sets the current data path.
static void LoadDataPath ()
 Load the data path from the standard file.
static void LoadDataPath (string filename)
 Loads the data path from a given file.
static void SaveDataPath ()
 Save the data path to the standard file.
static void SaveDataPath (string filename)
 Save the data path to a given file.
static int[,] LoadDICOMPixelData (string filename)
 Loads pixel data from a DICOM file into a 2-dimensional integer array.
static DicomFile LoadDICOMFile (string filename)
 Loads a DicomFile object from a .dcm file.
static object[] LoadDICOMHeaderInfo (string filename, string header1, string header2)
 Loads value from a DICOM file header.
static Bitmap LoadDICOMBitmap (string filename)
 Loads pixel data from a DICOM file and converts it to a Bitmap object, windowing according to WINDOWING, WINDOW_LOWER and WINDOW_UPPER.
static Bitmap ConvertPixelDataToBitmap (int[,] image)
 Converts raw pixel data to a Bitmap object, windowing according to WINDOWING, WINDOW_LOWER and WINDOW_UPPER.
static int[,] SegmentNodule (int[,] data, LIDCNodule nodule, int ybuff, int xbuff)
 Segments a nodule from original data with padding.
static double ComputeMean (double[,] data)
 Computes the mean value from the NxN matrix.
static double ComputeStdDev (double[,] data)
 Computes the standard deviation from the NxN matrix.
static double[] ComputeHistogram (double[,] data, int histBins, double histMinVal, double histMaxVal)
 Computes a histogram of the NxN matrix.
static double[] FindHistMeanStd (LIDCNoduleDB noduleDB, System.Windows.Forms.ProgressBar pbar, FeatureMethod featureMethod)
 Function to find a good max/min value for a histogram. Runs a feature extraction method on every nodule in the DB and finds the mean and standard deviation from all the responses.

Static Public Attributes

static string DATA_PATH = "../../../data/"
 Relative path to data files.
static string ORIGINAL_IMAGES_PATH = Util.DATA_PATH + "original-images-dicom/"
 Relative path to original dicom images.
static string NODULE_IMAGE_PATH = Util.DATA_PATH + "nodules-images/"
 Relative path to segmented nodule images.
static string PRIMARY_XML = "nodules-primary.xml"
 Filename of primary XML data file.
static string DATAPATH_FILE = "datapath.txt"
 Standard data path filename.
static bool GLOBAL_DICT_SET = false
 Has the global DICOM dictionary been created yet?
static Int16 BG_VALUE = -2000
 Signal value that represents the background intensity in a DICOM image.
static bool WINDOWING = true
 Turns on/off custom linear window leveling.
static int WINDOW_LOWER = 0
 Specifies lower bound for custom window leveling.
static int WINDOW_UPPER = 850
 Specifies upper bound for custom window leveling.

Static Private Member Functions

static double[] normalizeHistogram (double[] hist, int n)
 Normalizes the histogram so that each bin has values between 0 and 1.
static double findStdHist (LIDCNoduleDB noduleDB, double mean, System.Windows.Forms.ProgressBar pbar, FeatureMethod featureMethod)
 Finds the standard deviation of all the features from every nodule in the database. Requires mean to be already computed.
static double findMeanHist (LIDCNoduleDB noduleDB, System.Windows.Forms.ProgressBar pbar, FeatureMethod featureMethod)
 Finds the mean of all the features from every nodule in the database.


Detailed Description

Contains miscellaneous static methods and constants, primarily dealing with DICOM file interaction.


Member Function Documentation

static double [] BRISC::Core::Util::ComputeHistogram ( double  data[,],
int  histBins,
double  histMinVal,
double  histMaxVal 
) [inline, static]

Computes a histogram of the NxN matrix.

Parameters:
data Matrix to create the histogram from
histBins Number of bins to use
histMinVal Minimum cutoff value for the histogram
histMaxVal Maximum cutoff value for the histogram
Returns:
Histogram of the intensity values

static double BRISC::Core::Util::ComputeMean ( double  data[,]  )  [inline, static]

Computes the mean value from the NxN matrix.

Parameters:
data Input matrix
Returns:
Mean

static double BRISC::Core::Util::ComputeStdDev ( double  data[,]  )  [inline, static]

Computes the standard deviation from the NxN matrix.

Parameters:
data Input matrix
Returns:
Standard deviation

static Bitmap BRISC::Core::Util::ConvertPixelDataToBitmap ( int  image[,]  )  [inline, static]

Converts raw pixel data to a Bitmap object, windowing according to WINDOWING, WINDOW_LOWER and WINDOW_UPPER.

Parameters:
image 2-dimensional matrix of signed integer pixel data
Returns:
24-bit bitmap object with the same size as the input image matrix

delegate double [][,] BRISC::Core::Util::FeatureMethod ( int  data[,]  ) 

Delegate for use with FindHistCutoff. Will point to the function which performs feature extraction. Only works for feature methods which return arrays of feature matrices.

Parameters:
data Array to extract feature from
Returns:
Array of feature matrices

static double [] BRISC::Core::Util::FindHistMeanStd ( LIDCNoduleDB  noduleDB,
System.Windows.Forms.ProgressBar  pbar,
FeatureMethod  featureMethod 
) [inline, static]

Function to find a good max/min value for a histogram. Runs a feature extraction method on every nodule in the DB and finds the mean and standard deviation from all the responses.

Parameters:
noduleDB The nodule database
pbar Progress bar
featureMethod Feature extraction method to use
Returns:
mean: ret[0] standard deviation: ret[1]

static double BRISC::Core::Util::findMeanHist ( LIDCNoduleDB  noduleDB,
System.Windows.Forms.ProgressBar  pbar,
FeatureMethod  featureMethod 
) [inline, static, private]

Finds the mean of all the features from every nodule in the database.

Parameters:
noduleDB The nodule database
pbar Progress bar
featureMethod Feature extraction method to use
Returns:
Mean

static double BRISC::Core::Util::findStdHist ( LIDCNoduleDB  noduleDB,
double  mean,
System.Windows.Forms.ProgressBar  pbar,
FeatureMethod  featureMethod 
) [inline, static, private]

Finds the standard deviation of all the features from every nodule in the database. Requires mean to be already computed.

Parameters:
noduleDB The nodule database
mean Mean
pbar Progress Bar
featureMethod feature extraction method to use
Returns:
Standard deviation

static void BRISC::Core::Util::LoadDataPath ( string  filename  )  [inline, static]

Loads the data path from a given file.

Parameters:
filename Name of file (first line should contain path to data directory)

static Bitmap BRISC::Core::Util::LoadDICOMBitmap ( string  filename  )  [inline, static]

Loads pixel data from a DICOM file and converts it to a Bitmap object, windowing according to WINDOWING, WINDOW_LOWER and WINDOW_UPPER.

This function is equivalent to calling ConvertPixelDataToBitmap(LoadDICOMPixelData(filename)), but is theoretically a bit faster because it converts directly between the 1-dimensional DICOM data and the 1-dimensional pixel data; ie. it doesn't convert to a 2-dimensional structure in between, as LoadDICOMPixelData() does.

Parameters:
filename Filename of .dcm data file
Returns:
24-bit bitmap object

static DicomFile BRISC::Core::Util::LoadDICOMFile ( string  filename  )  [inline, static]

Loads a DicomFile object from a .dcm file.

Parameters:
filename DICOM file
Returns:
DicomFile object (null if filename is invalid)

static object [] BRISC::Core::Util::LoadDICOMHeaderInfo ( string  filename,
string  header1,
string  header2 
) [inline, static]

Loads value from a DICOM file header.

Parameters:
filename DICOM filename
header1 First header ID
header2 Second header ID
Returns:

static int [,] BRISC::Core::Util::LoadDICOMPixelData ( string  filename  )  [inline, static]

Loads pixel data from a DICOM file into a 2-dimensional integer array.

Parameters:
filename Filename of .dcm data file
Returns:
2-dimensional matrix of signed integer pixel data

static double [] BRISC::Core::Util::normalizeHistogram ( double[]  hist,
int  n 
) [inline, static, private]

Normalizes the histogram so that each bin has values between 0 and 1.

Parameters:
hist The histogram to normalize
n Total number of intensity values in the origional image
Returns:
Normalized histogram

static void BRISC::Core::Util::SaveDataPath ( string  filename  )  [inline, static]

Save the data path to a given file.

Parameters:
filename Name of file

static int [,] BRISC::Core::Util::SegmentNodule ( int  data[,],
LIDCNodule  nodule,
int  ybuff,
int  xbuff 
) [inline, static]

Segments a nodule from original data with padding.

Parameters:
data Original data
nodule Nodule to segment out
ybuff row padding
xbuff column padding
Returns:
Segmented nodule data

static void BRISC::Core::Util::SetDataPath ( string  path  )  [inline, static]

Sets the current data path.

Parameters:
path Data folder


The documentation for this class was generated from the following file:
Generated on Wed Aug 16 17:13:32 2006 by  doxygen 1.4.7