IPPSorter Implement a simple Image Position (Patient) sorter, along the Image Orientation (Patient) direction. This algorithm does NOT support duplicate and will FAIL in case of duplicate IPP. More...
#include <gdcmIPPSorter.h>
Public Member Functions | |
IPPSorter () | |
~IPPSorter () | |
double | GetZSpacing () const |
double | GetZSpacingTolerance () const |
void | SetComputeZSpacing (bool b) |
void | SetZSpacingTolerance (double tol) |
virtual bool | Sort (std::vector< std::string > const &filenames) |
Protected Attributes | |
bool | ComputeZSpacing |
double | ZSpacing |
double | ZTolerance |
IPPSorter Implement a simple Image Position (Patient) sorter, along the Image Orientation (Patient) direction. This algorithm does NOT support duplicate and will FAIL in case of duplicate IPP.
For more information on Spacing, and how it is defined in DICOM, advanced users may refers to:
http://sourceforge.net/apps/mediawiki/gdcm/index.php?title=Imager_Pixel_Spacing
gdcmorthoplanes.cxx, reslicesphere.cxx, and VolumeSorter.cxx.
gdcm::IPPSorter::IPPSorter | ( | ) |
gdcm::IPPSorter::~IPPSorter | ( | ) |
double gdcm::IPPSorter::GetZSpacing | ( | ) | const [inline] |
Read-only function to provide access to the computed value for the Z-Spacing The ComputeZSpacing must have been set to true before execution of sort algorithm. Call this function *after* calling Sort(); Z-Spacing will be 0 on 2 occasions:
double gdcm::IPPSorter::GetZSpacingTolerance | ( | ) | const [inline] |
void gdcm::IPPSorter::SetComputeZSpacing | ( | bool | b ) | [inline] |
Functions related to Z-Spacing computation Set to true when sort algorithm should also perform a regular Z-Spacing computation using the Image Position (Patient) Potential reason for failure: 1. ALL slices are taken into account, if one slice if missing then ZSpacing will be set to 0 since the spacing will not be found to be regular along the Series
void gdcm::IPPSorter::SetZSpacingTolerance | ( | double | tol ) | [inline] |
2. Another reason for failure is that that Z-Spacing is only slightly changing (eg 1e-3) along the serie, a human can determine that this is ok and change the tolerance from its default value: 1e-6
virtual bool gdcm::IPPSorter::Sort | ( | std::vector< std::string > const & | filenames ) | [virtual] |
Main entry point to the sorter. It will execute the filter, option should be set before running this function (SetZSpacingTolerance, ...) Return value indicate if sorting could be achived. Warning this does *NOT* imply that spacing is consistant, it only means the file are sorted according to IPP You should check if ZSpacing is 0 or not to deduce if file are actually a 3D volume
Reimplemented from gdcm::Sorter.
bool gdcm::IPPSorter::ComputeZSpacing [protected] |
double gdcm::IPPSorter::ZSpacing [protected] |
double gdcm::IPPSorter::ZTolerance [protected] |