RTK  1.4.0
Reconstruction Toolkit
rtkMatlabSparseMatrix.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright RTK Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 
19 #ifndef rtkMatlabSparseMatrix_h
20 #define rtkMatlabSparseMatrix_h
21 
22 #include <vnl/vnl_sparse_matrix.h>
23 
24 namespace rtk
25 {
35 {
36 public:
37  template <class TOutputImage> MatlabSparseMatrix(const vnl_sparse_matrix<double>& sparseMatrix, TOutputImage* output);
38  void Save(std::ostream& out);
39  void Print();
40 
42  unsigned char s_headerMatlab[116];
43  unsigned char s_headerOffset[8];
44  unsigned short int s_headerVersion;
45  unsigned char s_headerEndian[2];
46  unsigned long int s_mainTag;
47  unsigned long int s_dataLength;
48  unsigned long int s_arrayTag;
49  unsigned long int s_arrayLength;
50  unsigned short int s_arrayUndefined;
51  unsigned char s_arrayFlags;
52  unsigned char s_arrayClass;
53  unsigned long int s_arrayNzmax;
54  unsigned long int s_dimensionTag;
55  unsigned long int s_dimensionLength;
56  unsigned long int s_dimensionNbRow;
57  unsigned long int s_dimensionNbColumn;
58  unsigned short int s_nameLength;
59  unsigned short int s_nameTag;
60  unsigned char s_nameChar;
61  unsigned char s_namePadding[3];
62  unsigned long int s_rowIndexTag;
63  unsigned long int s_rowIndexLength;
64  unsigned long int *s_rowIndex;
65  unsigned long int s_rowIndexPadding;
66  unsigned long int s_columnIndexTag;
67  unsigned long int s_columnIndexLength;
68  unsigned long int *s_columnIndex;
69  unsigned long int s_columnIndexPadding;
70  unsigned long int s_valueTag;
71  unsigned long int s_valueLength;
72  double *s_value;
73  };
74 
75 protected:
77 
78 };
79 } // end namespace
80 
81 #ifndef ITK_MANUAL_INSTANTIATION
82 #include "rtkMatlabSparseMatrix.hxx"
83 #endif
84 
85 #endif
void Save(std::ostream &out)
MatlabSparseMatrix(const vnl_sparse_matrix< double > &sparseMatrix, TOutputImage *output)
MatlabSparseMatrixStruct m_MatlabSparseMatrix