gdcmSplitMosaicFilter.h
Go to the documentation of this file.
/*=========================================================================
Program: GDCM (Grassroots DICOM). A DICOM library
Copyright (c) 2006-2011 Mathieu Malaterre
All rights reserved.
See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#ifndef GDCMSPLITMOSAICFILTER_H
#define GDCMSPLITMOSAICFILTER_H
#include "gdcmFile.h"
#include "gdcmImage.h"
namespace gdcm
{
/*
* Everything done in this code is for the sole purpose of writing interoperable
* software under Sect. 1201 (f) Reverse Engineering exception of the DMCA.
* If you believe anything in this code violates any law or any of your rights,
* please contact us (gdcm-developers@lists.sourceforge.net) so that we can
* find a solution.
*/
class GDCM_EXPORT SplitMosaicFilter
{
public:
SplitMosaicFilter();
~SplitMosaicFilter();
bool Split();
bool ComputeMOSAICDimensions(unsigned int dims[3]);
bool ComputeMOSAICSliceNormal( double dims[3], bool & inverted );
bool ComputeMOSAICSlicePosition( double pos[3], bool inverted );
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 );
void SetImage(const Image& image);
const Image &GetImage() const { return *I; }
Image &GetImage() { return *I; }
void SetFile(const File& f) { F = f; }
File &GetFile() { return *F; }
const File &GetFile() const { return *F; }
static bool GetAcquisitionSize(unsigned int size[2], DataSet const & ds);
static unsigned int GetNumberOfImagesInMosaic( File const & file );
protected:
private:
SmartPointer<File> F;
SmartPointer<Image> I;
};
} // end namespace gdcm
#endif //GDCMSPLITMOSAICFILTER_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::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::SetFile
void SetFile(const File &f)
Definition gdcmSplitMosaicFilter.h:75
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