Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/10376_refl_ui_menu_bar
Refs #10376 Conflicts: Code/Mantid/MantidQt/CustomInterfaces/src/ReflMainViewPresenter.cpp
- Loading branch information
Showing
40 changed files
with
4,240 additions
and
769 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
106 changes: 106 additions & 0 deletions
106
Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/SaveNXTomo.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
#ifndef MANTID_DATAHANDLING_SAVENXTOMO_H_ | ||
#define MANTID_DATAHANDLING_SAVENXTOMO_H_ | ||
|
||
//--------------------------------------------------- | ||
// Includes | ||
//--------------------------------------------------- | ||
#include "vector" | ||
#include "MantidGeometry/Instrument/RectangularDetector.h" | ||
|
||
namespace Mantid | ||
{ | ||
namespace DataHandling | ||
{ | ||
|
||
/** | ||
* Saves a workspace into a NeXus/HDF5 NXTomo file. | ||
* File format is defined here: http://download.nexusformat.org/sphinx/classes/applications/NXtomo.html | ||
* | ||
* Required properties: | ||
* <ul> | ||
* <li> InputWorkspace - The workspace to save. </li> | ||
* <li> Filename - The filename for output </li> | ||
* </ul> | ||
* | ||
* @author John R Hill, RAL | ||
* @date 10/09/2014 | ||
* | ||
* This file is part of Mantid. | ||
* | ||
* Mantid is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* Mantid is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* File change history is stored at: <https://github.com/mantidproject/mantid> | ||
* Code Documentation is available at: <http://doxygen.mantidproject.org> | ||
* | ||
*/ | ||
|
||
class DLLExport SaveNXTomo: public API::Algorithm | ||
{ | ||
public: | ||
SaveNXTomo(); | ||
/// Virtual dtor | ||
virtual ~SaveNXTomo() {} | ||
|
||
/// Algorithm's name for identification overriding a virtual method | ||
virtual const std::string name() const { return "SaveNXTomo"; } | ||
|
||
///Summary of algorithms purpose | ||
virtual const std::string summary() const {return "Writes a MatrixWorkspace to a file in the NXTomo format.";} | ||
|
||
/// Algorithm's version | ||
virtual int version() const { return (1); } | ||
|
||
/// Algorithm's category for identification | ||
virtual const std::string category() const { return "DataHandling\\Nexus;DataHandling\\Tomo;Diffraction"; } | ||
|
||
private: | ||
/// Initialisation code | ||
void init(); | ||
/// Execution code | ||
void exec(); | ||
|
||
/// Save all data to file | ||
|
||
/// Save batch of images to the file | ||
|
||
/// Fetch all rectangular Detector objects defined for an instrument | ||
std::vector<boost::shared_ptr<const Mantid::Geometry::RectangularDetector>> getRectangularDetectors(const Geometry::Instrument_const_sptr &instrument); | ||
|
||
/// Populate dims_array with the dimensions defined in the rectangular detector in the instrument | ||
std::vector<int64_t> getDimensionsFromDetector(const std::vector<boost::shared_ptr<const Mantid::Geometry::RectangularDetector>> &rectDetectors, size_t useDetectorIndex = 0); | ||
|
||
// Number of rows to | ||
size_t m_numberOfRows; | ||
|
||
// Include error data in the written file | ||
bool m_includeError; | ||
|
||
///the number of bins in each histogram, as the histogram must have common bins this shouldn't change | ||
//size_t m_nBins; | ||
/// The filename of the output file | ||
std::string m_filename; | ||
|
||
// Some constants to be written for masked values. | ||
/// Value for data if pixel is masked | ||
static const double MASK_FLAG; | ||
/// Value for error if pixel is masked | ||
static const double MASK_ERROR; | ||
/// file format version | ||
static const std::string NXTOMO_VER; | ||
}; | ||
|
||
} // namespace DataHandling | ||
} // namespace Mantid | ||
|
||
#endif // MANTID_DATAHANDLING_SAVENXTOMO_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.