33 #ifndef CXIMAGEALGORITHMS_H_
34 #define CXIMAGEALGORITHMS_H_
36 #include "cxResourceExport.h"
79 typedef std::multimap<QDateTime,T> SortedMap;
82 for (
typename std::map<QString, T>::iterator iter=input.begin(); iter!=input.end(); ++iter)
84 sorted.insert(std::make_pair(iter->second->getAcquisitionTime(), iter->second));
87 std::vector<T> retval;
88 for (
typename SortedMap::iterator iter=sorted.begin(); iter!=sorted.end(); ++iter)
89 retval.push_back(iter->second);
100 typedef std::map<QString, T> DataMap;
101 std::map<QDateTime, DataMap> bin;
103 for (
typename DataMap::iterator iter=input.begin(); iter!=input.end(); ++iter)
106 bin[binTS].insert(*iter);
110 std::vector<T> retval;
112 for (
typename std::map<QDateTime, DataMap>::iterator iter=bin.begin(); iter!=bin.end(); ++iter)
115 std::copy(localSorted.begin(), localSorted.end(), back_inserter(retval));
ImagePtr resampleImage(PatientModelServicePtr dataManager, ImagePtr image, Transform3D qMd)
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
vtkImageDataPtr cropImage(vtkImageDataPtr input, IntBoundingBox3D cropbox)
boost::shared_ptr< class Image > ImagePtr
ImagePtr duplicateImage(PatientModelServicePtr dataManager, ImagePtr image)
std::vector< T > sortOnGroupsAndAcquisitionTime(std::map< QString, T > input)
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
std::vector< T > sortOnAcquisitionTime(std::map< QString, T > input)
QDateTime extractTimestamp(QString text)