Computer Assited Medical Intervention Tool Kit  version 3.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
DicomTreeSerieComponent.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * $CAMITK_LICENCE_BEGIN$
3  *
4  * CamiTK - Computer Assisted Medical Intervention ToolKit
5  * (c) 2001-2014 UJF-Grenoble 1, CNRS, TIMC-IMAG UMR 5525 (GMCAO)
6  *
7  * Visit http://camitk.imag.fr for more information
8  *
9  * This file is part of CamiTK.
10  *
11  * CamiTK is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * CamiTK is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Lesser General Public License version 3 for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * version 3 along with CamiTK. If not, see <http://www.gnu.org/licenses/>.
22  *
23  * $CAMITK_LICENCE_END$
24  ****************************************************************************/
25 
26 #ifndef DICOMTREESERIECOMPONENT_H
27 #define DICOMTREESERIECOMPONENT_H
28 
29 // CamiTK includes
30 #include <ImageComponent.h>
31 class DicomStudyComponent;
32 namespace camitk {
33 class ImageOrientationHelper;
34 }
35 
36 // Qt includes
37 #include <QObject>
38 
39 // GDCM includes
40 class vtkGDCMImageReader;
41 
60 
61  Q_OBJECT
62 
63 public:
69  DicomTreeSerieComponent(const std::vector < std::string > & fileNames);
70 
72  virtual ~DicomTreeSerieComponent();
73 
74 private:
75 
81  vtkGDCMImageReader* imageReader;
82 
88  void updateLUT();
89 
95  camitk::ImageOrientationHelper::PossibleImageOrientations readDirectCosinesAngle(const std::vector< std::string > & fileNames) const;
96 
102  double roundCosine(const double & value) const;
103 
109  vtkSmartPointer<vtkImageData> translate(vtkSmartPointer<vtkImageData> imageData, double x, double y, double z);
110 
111 
112 };
113 
114 #endif // DICOMTREESERIECOMPONENT_H
115 
void updateLUT()
Update the LUT of the image by reading the good information from the DICOM headers.
Definition: DicomTreeSerieComponent.cpp:139
Definition: Action.cpp:40
vtkGDCMImageReader * imageReader
The image reader using GDCM that allows to read DICOM image as vtkImageData.
Definition: DicomTreeSerieComponent.h:81
DicomTreeSerieComponent(const std::vector< std::string > &fileNames)
Build a ImageComponent representing the volumic image of the acquistion by a specific MODALITY...
Definition: DicomTreeSerieComponent.cpp:49
The manager of the Image Volume data.
Definition: ImageComponent.h:73
PossibleImageOrientations
For each axis (x, y or z), 6 possibilities:
Definition: ImageOrientationHelper.h:52
This component allows you to read DICOM images files of a single SERIE of a given STUDY...
Definition: DicomTreeSerieComponent.h:59
camitk::ImageOrientationHelper::PossibleImageOrientations readDirectCosinesAngle(const std::vector< std::string > &fileNames) const
Read the direct cosines angles from the input image.
Definition: DicomTreeSerieComponent.cpp:151
virtual ~DicomTreeSerieComponent()
Default Destructor.
Definition: DicomTreeSerieComponent.cpp:134
vtkSmartPointer< vtkImageData > translate(vtkSmartPointer< vtkImageData > imageData, double x, double y, double z)
Translate the image data to the frame origin and store the opposite translate as a frame of the compo...
Definition: DicomTreeSerieComponent.cpp:258
double roundCosine(const double &value) const
Round the cosine input to the closest value between -1, 0 or 1.
Definition: DicomTreeSerieComponent.cpp:248