Skip to content

Commit

Permalink
Removed code that does not work yet to link python to c++. This refs #…
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanBilheux committed Sep 26, 2012
1 parent 1eefd50 commit e49d587
Show file tree
Hide file tree
Showing 5 changed files with 546 additions and 29 deletions.
29 changes: 0 additions & 29 deletions Code/Mantid/MantidQt/Python/mantidqt.sip
Original file line number Diff line number Diff line change
Expand Up @@ -1039,35 +1039,6 @@ void SliceViewer::refreshRebin()



namespace MantidQt
{
namespace RefDetectorViewer
{


//*WIKI* == Classes ==
//*WIKI* Here follows a list of the classes exposed to python and the methods you can execute on them.


/***************************************************************************/
/***************************************************************************/
/***************************************************************************/
class MatrixWSDataSource
{
%TypeHeaderCode
#include "MantidQtRefDetectorViewer/MatrixWSDataSource.h"
%end

public:
MatrixWSDataSource ( Mantid::API::MatrixWorkspace_sptr mat_ws);
}


}; // end namespace
}; // end namespace





namespace MantidQt
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
#ifndef REF_MATRIX_WS_DATA_SOURCE_H
#define REF_MATRIX_WS_DATA_SOURCE_H

#include <cstddef>

#include "MantidQtRefDetectorViewer/DataArray.h"
#include "MantidQtRefDetectorViewer/ImageDataSource.h"
#include "MantidQtRefDetectorViewer/DllOptionIV.h"

#include "MantidAPI/MatrixWorkspace.h"

/**
@class RefMatrixWSDataSource
This class provides a concrete implementation of an ImageDataSource
that gets it's data from a matrix workspace.
@author Dennis Mikkelson
@date 2012-05-08
Copyright © 2012 ORNL, STFC Rutherford Appleton Laboratories
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/>.
Code Documentation is available at
<http://doxygen.mantidproject.org>
*/

namespace MantidQt
{
namespace RefDetectorViewer
{

class EXPORT_OPT_MANTIDQT_IMAGEVIEWER RefMatrixWSDataSource: public ImageDataSource
{
public:

/// Construct a DataSource object around the specifed MatrixWorkspace
RefMatrixWSDataSource( Mantid::API::MatrixWorkspace_sptr mat_ws );

~RefMatrixWSDataSource();

/// OVERRIDES: Get the smallest 'x' value covered by the data
virtual double GetXMin();

/// OVERRIDES: Get the largest 'x' value covered by the data
virtual double GetXMax();

/// OVERRIDES: Get the largest 'y' value covered by the data
virtual double GetYMax();

/// OVERRIDES: Get the total number of rows of data
virtual size_t GetNRows();

/// Get DataArray covering full range of data in x, and y directions
DataArray * GetDataArray( bool is_log_x );

/// Get DataArray covering restricted range of data
DataArray * GetDataArray( double xmin,
double xmax,
double ymin,
double ymax,
size_t n_rows,
size_t n_cols,
bool is_log_x );

/// Get a list containing pairs of strings with information about x,y
void GetInfoList( double x,
double y,
std::vector<std::string> &list );
private:
Mantid::API::MatrixWorkspace_sptr mat_ws;

};

} // namespace MantidQt
} // namespace ImageView

#endif // REF_MATRIX_WS_DATA_SOURCE_H
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#ifndef REF_MATRIX_WS_IMAGE_VIEW_H
#define REF_MATRIX_WS_IMAGE_VIEW_H

#include "MantidQtRefDetectorViewer/DllOptionIV.h"
#include "MantidAPI/MatrixWorkspace.h"

#include "MantidQtRefDetectorViewer/ImageView.h"

/**
@class RefMatrixWSImageView
This is the top level class for showing a matrix workspace
using an ImageViewer.
@author Dennis Mikkelson
@date 2012-05-08
Copyright © 2012 ORNL, STFC Rutherford Appleton Laboratories
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/>.
Code Documentation is available at
<http://doxygen.mantidproject.org>
*/

namespace MantidQt
{
namespace RefDetectorViewer
{

class EXPORT_OPT_MANTIDQT_IMAGEVIEWER RefMatrixWSImageView
{
public:

/// Construct an image viewer for the specifed MatrixWorkspace
RefMatrixWSImageView( Mantid::API::MatrixWorkspace_sptr mat_ws );

~RefMatrixWSImageView();

private:
ImageView *image_view;
};

} // namespace MantidQt
} // namespace ImageView

#endif // REF_MATRIX_WS_IMAGE_VIEW_H

0 comments on commit e49d587

Please sign in to comment.