GDCM: gdcmSplitGridFilter.h Source File

GDCM 3.2.10

gdcmSplitGridFilter.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: GDCM (Grassroots DICOM). A DICOM library
4
5 Copyright (c) 2006-2011 Mathieu Malaterre
6 All rights reserved.
7 See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
8
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notice for more information.
12
13=========================================================================*/
14#ifndef GDCMSPLITGRIDFILTER_H
15#define GDCMSPLITGRIDFILTER_H
16
17#include "gdcmFile.h"
18#include "gdcmImage.h"
19
20namespace gdcm
21{
22
33 class GDCM_EXPORT SplitGridFilter
34{
35public:
36 SplitGridFilter();
37 ~SplitGridFilter();
38
40 bool Split();
41
44 bool ComputeGRIDDimensions(unsigned int dims[3]);
45
47 bool ComputeGRIDSliceNormal( double dims[3], bool & inverted );
48
50 bool GetGRIDSlicePosition( unsigned int index, double pos[3]);
51
53 bool ComputeGRIDImagePositionPatient( double pos[3],
54 const double ipp[6],
55 const double dircos[6],
56 const double pixelspacing[3],
57 const unsigned int image_dims[3] ,
58 const unsigned int mosaic_dims[3], bool inverted );
59
60 void SetImage(const Image& image);
61 const Image &GetImage() const { return *I; }
62 Image &GetImage() { return *I; }
63
64 void SetFile(const File& f) { F = f; }
65 File &GetFile() { return *F; }
66 const File &GetFile() const { return *F; }
67
69 static bool GetAcquisitionSize(unsigned int size[2], DataSet const & ds);
70
72 static unsigned int GetNumberOfImagesInGrid( File const & file );
73
74private:
75 SmartPointer<File> F;
76 SmartPointer<Image> I;
77};
78
79} // end namespace gdcm
80
81#endif // GDCMSPLITGRIDFILTER_H
gdcm::DataSet
Class to represent a Data Set (which contains Data Elements).
Definition gdcmDataSet.h:56
gdcm::File
a DICOM File
Definition gdcmFile.h:34
gdcm::Image
Image.
Definition gdcmImage.h:47
gdcm::SmartPointer
Class for Smart Pointer.
Definition gdcmSmartPointer.h:40
gdcm::SplitGridFilter::SplitGridFilter
SplitGridFilter()
gdcm::SplitGridFilter::~SplitGridFilter
~SplitGridFilter()
gdcm::SplitGridFilter::Split
bool Split()
Split the UIH GRID image.
gdcm::SplitGridFilter::ComputeGRIDDimensions
bool ComputeGRIDDimensions(unsigned int dims[3])
gdcm::SplitGridFilter::ComputeGRIDImagePositionPatient
bool ComputeGRIDImagePositionPatient(double pos[3], const double ipp[6], const double dircos[6], const double pixelspacing[3], const unsigned int image_dims[3], const unsigned int mosaic_dims[3], bool inverted)
Extract the value for ImagePositionPatient.
gdcm::SplitGridFilter::GetNumberOfImagesInGrid
static unsigned int GetNumberOfImagesInGrid(File const &file)
Return the value for NumberOfImagesInGrid, or compute it from Acquisition Size.
gdcm::SplitGridFilter::SetFile
void SetFile(const File &f)
Definition gdcmSplitGridFilter.h:64
gdcm::SplitGridFilter::ComputeGRIDSliceNormal
bool ComputeGRIDSliceNormal(double dims[3], bool &inverted)
Extract the value for SliceNormalVector (UIH header).
gdcm::SplitGridFilter::SetImage
void SetImage(const Image &image)
gdcm::SplitGridFilter::GetImage
const Image & GetImage() const
Definition gdcmSplitGridFilter.h:61
gdcm::SplitGridFilter::GetGRIDSlicePosition
bool GetGRIDSlicePosition(unsigned int index, double pos[3])
Extract the value for ImagePositionPatient at index.
gdcm::SplitGridFilter::GetAcquisitionSize
static bool GetAcquisitionSize(unsigned int size[2], DataSet const &ds)
Get the Acquisition Matrix (non zero value):
gdcm::SplitGridFilter::GetFile
File & GetFile()
Definition gdcmSplitGridFilter.h:65
gdcm::SplitGridFilter::GetFile
const File & GetFile() const
Definition gdcmSplitGridFilter.h:66
gdcm::SplitGridFilter::GetImage
Image & GetImage()
Definition gdcmSplitGridFilter.h:62
gdcmFile.h
gdcmImage.h
GDCM_EXPORT
#define GDCM_EXPORT
Definition gdcmWin32.h:34
gdcm
Definition gdcmASN1.h:21