54 node->Parent = parent;
59 node->DataBase = dataBase;
61 node->fillChildrenUids();
142 std::advance(iter, index);
151 for (
int i=0; i<siblings.size(); ++i)
152 if (siblings[i].
get()==
this)
184 QString retval = reader->getPatientName();
185 if (retval.isEmpty())
195 return reader->item()->GetElementAsDate(DCM_PatientBirthDate).toString(this->
format_date());
200 QStringList studies =
DataBase->studiesForPatient(this->
UID);
203 QStringList series =
DataBase->seriesForStudy(studies[0]);
206 QStringList files =
DataBase->filesForSeries(series[0]);
226 QString retval = reader->item()->GetElementAsString(DCM_StudyDescription);
227 if (retval.isEmpty())
237 QString date = reader->item()->GetElementAsDate(DCM_StudyDate).toString(this->
format_date());
238 QString time = reader->item()->GetElementAsTime(DCM_StudyTime).toString(this->
format_time());
239 return QString(
"%1 %2").arg(date).arg(time);
244 QStringList series =
DataBase->seriesForStudy(this->
UID);
247 QStringList files =
DataBase->filesForSeries(series[0]);
263 QString retval = reader->item()->GetElementAsString(DCM_SeriesDescription);
264 if (retval.isEmpty())
274 QString date = reader->item()->GetElementAsDate(DCM_SeriesDate).toString(this->
format_date());
275 QString time = reader->item()->GetElementAsTime(DCM_SeriesTime).toString(this->
format_time());
276 return QString(
"%1 %2").arg(date).arg(time);
284 return reader->item()->GetElementAsString(DCM_Modality);
289 return QString(
"%1").arg(this->getFrameCountForSeries(this->
UID));
294 QStringList files =
DataBase->filesForSeries(this->
UID);
302 QString seriesDescription;
304 QStringList files =
DataBase->filesForSeries(series);
305 for (
unsigned i=0; i<files.size(); ++i)
310 frameCount += reader->getNumberOfFrames();
311 seriesDescription = reader->item()->GetElementAsString(DCM_SeriesDescription);
static DicomImageReaderPtr createFromFile(QString filename)
std::vector< NodePtr > FetchedChildren
all children currently loaded (filled by fetchMore())
QString format_time() const
QSharedPointer< ctkDICOMDatabase > DataBase
boost::shared_ptr< class DicomModelNode > NodePtr
virtual QVariant getModality() const
virtual QString getFirstDICOMFilename() const
void removeChild(int index)
virtual QVariant getImageCount() const
DicomImageReaderPtr createReader() const
QStringList getHeaders() const
QVariant getDefaultName() const
virtual QVariant getName() const
QVariant getUncachedValue(int column) const
virtual QString getFirstDICOMFilename() const
QStringList ChildrenUID
uids of all loaded and unloaded children.
virtual void fillChildrenUids()
const std::vector< NodePtr > & getFetchedChildren() const
all children currently loaded (filled by fetchMore())
static NodePtr createNode(int row, DicomModelNode *parent, QSharedPointer< ctkDICOMDatabase > dataBase)
virtual QVariant getTimestamp() const
virtual DICOMModel::IndexType getType() const =0
virtual void fillChildrenUids()
boost::shared_ptr< class DicomImageReader > DicomImageReaderPtr
virtual QVariant getTimestamp() const
virtual QVariant getTimestamp() const
virtual QVariant getName() const
static NodePtr getNullNode()
virtual QVariant getImageCount() const
int getFrameCountForSeries(QString series) const
virtual QVariant getName() const
std::map< int, QVariant > CachedValues
virtual QString getFirstDICOMFilename() const
virtual QString getFirstDICOMFilename() const
virtual void fillChildrenUids()
NodePtr getFetchedChildForRow(int row) const
virtual QVariant getName() const
QString format_date() const
bool canFetchMore() const
QVariant getValue(int column) const
virtual QVariant getModality() const
Namespace for all CustusX production code.
virtual QVariant getTimestamp() const