Computer Assited Medical Intervention Tool Kit  version 5.0
DicomComponent.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * $CAMITK_LICENCE_BEGIN$
3  *
4  * CamiTK - Computer Assisted Medical Intervention ToolKit
5  * (c) 2001-2021 Univ. Grenoble Alpes, CNRS, Grenoble INP, TIMC, 38000 Grenoble, France
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 DICOMCOMPONENT_H
27 #define DICOMCOMPONENT_H
28 
29 #include <QObject>
30 
31 #include <ImageComponent.h>
32 
33 class DicomSeries;
34 class vtkGDCMImageReader;
35 
46 
47  Q_OBJECT
48 
49 public:
55  DicomComponent(DicomSeries* dSeries);
56 
61  return series;
62  }
63 
65  virtual ~DicomComponent();
66 
67 private:
73  vtkSmartPointer<vtkGDCMImageReader> imageReader;
74 
80  void updateLUT();
81 
87  camitk::ImageOrientationHelper::PossibleImageOrientations readDirectCosinesAngle(const std::vector< std::string >& fileNames) const;
88 
94  double roundCosine(const double& value) const;
95 
100 };
101 
102 #endif // DICOMCOMPONENT_H
103 
CAMITK_WARNING
#define CAMITK_WARNING(MSG)
Log for warning verbosity (the most common one) Will appear by default.
Definition: Log.h:266
DicomParser::getZSpacing
static double getZSpacing(const std::vector< std::string > &seriesFileNames)
Retrieve the DICOM image file Z spacing attribute (commonly known as spacing between slices)
Definition: DicomParser.cpp:219
DicomComponent.h
DicomSeries::getStdFileNames
std::vector< std::string > getStdFileNames() const
Definition: DicomSeries.cpp:59
DicomComponent::DicomComponent
DicomComponent(DicomSeries *dSeries)
Create a new Component that handles DICOM images This method may throw an AbortException if a problem...
Definition: DicomComponent.cpp:48
DicomComponent::imageReader
vtkSmartPointer< vtkGDCMImageReader > imageReader
The image reader using GDCM that allows to read DICOM image as vtkImageData.
Definition: DicomComponent.h:73
camitk::ImageComponent
The manager of the Image Volume data. An image volume data has no concrete 3D representation,...
Definition: ImageComponent.h:77
Log.h
camitk::ImageComponent::getLut
virtual vtkSmartPointer< vtkWindowLevelLookupTable > getLut()
get the current lookup table
Definition: ImageComponent.cpp:742
DicomComponent::updateLUT
void updateLUT()
Update the LUT of the image by reading the good information from the DICOM headers.
Definition: DicomComponent.cpp:160
DicomComponent::roundCosine
double roundCosine(const double &value) const
Round the cosine input to the closest value between -1, 0 or 1.
Definition: DicomComponent.cpp:298
DicomComponent::readDirectCosinesAngle
camitk::ImageOrientationHelper::PossibleImageOrientations readDirectCosinesAngle(const std::vector< std::string > &fileNames) const
Read the direct cosines angles from the input image.
Definition: DicomComponent.cpp:171
CAMITK_ERROR
#define CAMITK_ERROR(MSG)
Log for error verbosity (the minimum verbosity) Will always appear.
Definition: Log.h:276
DicomComponent::series
DicomSeries * series
The associated DicomSeries to this component.
Definition: DicomComponent.h:99
DicomComponent::~DicomComponent
virtual ~DicomComponent()
Default Destructor.
Definition: DicomComponent.cpp:153
DicomComponent
DICOM Component represents a volumic image of a DICOM SERIES with its corresponding tags information ...
Definition: DicomComponent.h:45
DicomParser.h
ImageOrientationHelper.h
camitk::Component::setName
void setName(const QString &) override
set the name to be displayed
Definition: sdk/libraries/core/component/Component.h:932
DicomComponent::getSeries
DicomSeries * getSeries()
Get the DicomSeries associated to this component.
Definition: DicomComponent.h:60
camitk::ImageComponent::setImageData
void setImageData(vtkSmartPointer< vtkImageData > anImageData, bool copy, ImageOrientationHelper::PossibleImageOrientations initialOrientation=ImageOrientationHelper::RAI, vtkSmartPointer< vtkMatrix4x4 > initialTransformMatrix=nullptr)
Set the image data of the volumic images with the given orientation options.
Definition: ImageComponent.cpp:251
CAMITK_ERROR_IF
#define CAMITK_ERROR_IF(COND, MSG)
Definition: Log.h:327
camitk::ImageOrientationHelper::PossibleImageOrientations
PossibleImageOrientations
For each axis (x, y or z), 6 possibilities:
Definition: ImageOrientationHelper.h:52
ImageComponent.h
DicomSeries
DicomSeries is a CamiTK high level class to represent a DICOM SERIES This class encapsulates GDCM obj...
Definition: DicomSeries.h:49
camitk
Definition: Action.cpp:35