NorMIT-nav  22.09
An IGT application
cxUsReconstructionFileReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 #ifndef CXUSRECONSTRUCTIONFILEREADER_H_
12 #define CXUSRECONSTRUCTIONFILEREADER_H_
13 
14 #include "cxResourceExport.h"
15 
16 #include <boost/shared_ptr.hpp>
17 #include <QString>
18 #include "cxTransform3D.h"
20 #include "cxProbeSector.h"
21 #include "cxForwardDeclarations.h"
23 
24 namespace cx
25 {
26 
126 class cxResource_EXPORT UsReconstructionFileReader
127 {
128 public:
129 
130 public:
132 
140  USReconstructInputData readAllFiles(QString fileName, QString calFilesPath = "");
141 
142  std::vector<TimedPosition> readFrameTimestamps(QString fileName);
147  static std::pair<QString, ProbeDefinition> readProbeDefinitionFromFile(QString mhdFileName);
148 
149 private:
150  bool valid(USReconstructInputData input);
151  std::vector<TimedPosition> readPositions(QString fileName);
152  bool readMaskFile(QString mhdFileName, ImagePtr mask);
153  USFrameDataPtr readUsDataFile(QString mhdFileName);
154 
155  void readPositionFile(QString posFile, bool alsoReadTimestamps, std::vector<TimedPosition>* timedPos);
156  void readTimeStampsFile(QString fileName, std::vector<TimedPosition>* timedPos);
157  void readCustomMhdTags(QString mhdFileName, QStringList* probeConfigPath, QString* calFileName);
158  ProbeXmlConfigParser::Configuration readProbeConfiguration(QString calFilesPath, QStringList probeConfigPath);
159  std::pair<QString, ProbeDefinition> readProbeDefinitionBackwardsCompatible(QString mhdFileName, QString calFilesPath);
160 
161 // ImagePtr createMaskFromConfigParams(USReconstructInputData data);
162  ImagePtr generateMask(USReconstructInputData data);
163 
164  FileManagerServicePtr mFileManagerService;
165 };
166 
167 typedef boost::shared_ptr<UsReconstructionFileReader> UsReconstructionFileReaderPtr;
168 
173 } // namespace cx
174 
175 #endif /* CXUSRECONSTRUCTIONFILEREADER_H_ */
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cx::USFrameDataPtr
boost::shared_ptr< class USFrameData > USFrameDataPtr
Definition: cxForwardDeclarations.h:59
cxForwardDeclarations.h
cx::FileManagerServicePtr
boost::shared_ptr< class FileManagerService > FileManagerServicePtr
Definition: cxLogicManager.h:31
cxUSReconstructInputData.h
ProbeXmlConfigParserImpl.h
cx::ImagePtr
boost::shared_ptr< class Image > ImagePtr
Definition: cxDicomWidget.h:27
cx::UsReconstructionFileReader
Reader class for the US Acquisition files.
Definition: cxUsReconstructionFileReader.h:126
cx::USReconstructInputData
Definition: cxUSReconstructInputData.h:48
cxProbeSector.h
ProbeXmlConfigParser::Configuration
< a easy-to-work-with struct for a specific xml configuration
Definition: ProbeXmlConfigParser.h:35
cx::UsReconstructionFileReaderPtr
boost::shared_ptr< class UsReconstructionFileReader > UsReconstructionFileReaderPtr
Definition: cxForwardDeclarations.h:165
cxTransform3D.h