GDCM: gdcmSplitMosaicFilter.h Source File

GDCM 3.2.8

gdcmSplitMosaicFilter.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 GDCMSPLITMOSAICFILTER_H
15#define GDCMSPLITMOSAICFILTER_H
16
17#include "gdcmFile.h"
18#include "gdcmImage.h"
19
20namespace gdcm
21{
22
23/*
24 * Everything done in this code is for the sole purpose of writing interoperable
25 * software under Sect. 1201 (f) Reverse Engineering exception of the DMCA.
26 * If you believe anything in this code violates any law or any of your rights,
27 * please contact us (gdcm-developers@lists.sourceforge.net) so that we can
28 * find a solution.
29 */
43 class GDCM_EXPORT SplitMosaicFilter
44{
45public:
46 SplitMosaicFilter();
47 ~SplitMosaicFilter();
48
50 bool Split();
51
54 bool ComputeMOSAICDimensions(unsigned int dims[3]);
55
57 bool ComputeMOSAICSliceNormal( double dims[3], bool & inverted );
58
61 bool ComputeMOSAICSlicePosition( double pos[3], bool inverted );
62
64 bool ComputeMOSAICImagePositionPatient( double pos[3],
65 const double ipp[6],
66 const double dircos[6],
67 const double pixelspacing[3],
68 const unsigned int image_dims[3] ,
69 const unsigned int mosaic_dims[3], bool inverted );
70
71 void SetImage(const Image& image);
72 const Image &GetImage() const { return *I; }
73 Image &GetImage() { return *I; }
74
75 void SetFile(const File& f) { F = f; }
76 File &GetFile() { return *F; }
77 const File &GetFile() const { return *F; }
78
80 static bool GetAcquisitionSize(unsigned int size[2], DataSet const & ds);
81
83 static unsigned int GetNumberOfImagesInMosaic( File const & file );
84
86 static const DataElement& ComputeCSAImageHeaderInfo(const DataSet& ds, bool handleMissingPrivateCreator = true);
87
89 static const DataElement& ComputeCSASeriesHeaderInfo(const DataSet& ds, bool handleMissingPrivateCreator = true);
90
91protected:
92
93private:
94 SmartPointer<File> F;
95 SmartPointer<Image> I;
96};
97
98} // end namespace gdcm
99
100#endif //GDCMSPLITMOSAICFILTER_H
gdcm::DataElement
Class to represent a Data Element either Implicit or Explicit.
Definition gdcmDataElement.h:59
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::SplitMosaicFilter::Split
bool Split()
Split the SIEMENS MOSAIC image.
gdcm::SplitMosaicFilter::GetImage
Image & GetImage()
Definition gdcmSplitMosaicFilter.h:73
gdcm::SplitMosaicFilter::ComputeMOSAICSlicePosition
bool ComputeMOSAICSlicePosition(double pos[3], bool inverted)
gdcm::SplitMosaicFilter::ComputeCSAImageHeaderInfo
static const DataElement & ComputeCSAImageHeaderInfo(const DataSet &ds, bool handleMissingPrivateCreator=true)
Return the DataElement for the CSA Image Header.
gdcm::SplitMosaicFilter::SetFile
void SetFile(const File &f)
Definition gdcmSplitMosaicFilter.h:75
gdcm::SplitMosaicFilter::ComputeCSASeriesHeaderInfo
static const DataElement & ComputeCSASeriesHeaderInfo(const DataSet &ds, bool handleMissingPrivateCreator=true)
Return the DataElement for the CSA Series Header.
gdcm::SplitMosaicFilter::ComputeMOSAICSliceNormal
bool ComputeMOSAICSliceNormal(double dims[3], bool &inverted)
Extract the value for SliceNormalVector (CSA header).
gdcm::SplitMosaicFilter::GetNumberOfImagesInMosaic
static unsigned int GetNumberOfImagesInMosaic(File const &file)
Return the value for NumberOfImagesInMosaic, or compute it from Acquisition Size.
gdcm::SplitMosaicFilter::ComputeMOSAICImagePositionPatient
bool ComputeMOSAICImagePositionPatient(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::SplitMosaicFilter::SplitMosaicFilter
SplitMosaicFilter()
gdcm::SplitMosaicFilter::ComputeMOSAICDimensions
bool ComputeMOSAICDimensions(unsigned int dims[3])
gdcm::SplitMosaicFilter::SetImage
void SetImage(const Image &image)
gdcm::SplitMosaicFilter::~SplitMosaicFilter
~SplitMosaicFilter()
gdcm::SplitMosaicFilter::GetImage
const Image & GetImage() const
Definition gdcmSplitMosaicFilter.h:72
gdcm::SplitMosaicFilter::GetAcquisitionSize
static bool GetAcquisitionSize(unsigned int size[2], DataSet const &ds)
Get the Acquisition Matrix (non zero value):
gdcm::SplitMosaicFilter::GetFile
File & GetFile()
Definition gdcmSplitMosaicFilter.h:76
gdcm::SplitMosaicFilter::GetFile
const File & GetFile() const
Definition gdcmSplitMosaicFilter.h:77
gdcmFile.h
gdcmImage.h
GDCM_EXPORT
#define GDCM_EXPORT
Definition gdcmWin32.h:34
gdcm
Definition gdcmASN1.h:21