1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
|
/*=========================================================================
Program: DICOM for VTK
Copyright (c) 2012-2024 David Gobbi
All rights reserved.
See Copyright.txt or http://dgobbi.github.io/bsd3.txt 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.
=========================================================================*/
/**
* \class vtkDICOMAlgorithm
* \brief Superclass for DICOM image filters
*
* This class allows the DICOM meta data to be carried by the VTK pipeline.
* Subclasses should always call Superclass::RequestInformation() and
* Superclass::RequestData within their own RequestInformation and
* RequestData methods.
*/
#ifndef vtkDICOMAlgorithm_h
#define vtkDICOMAlgorithm_h
#include "vtkThreadedImageAlgorithm.h"
#include "vtkDICOMModule.h" // For export macro
#include "vtkDICOMConfig.h" // For configuration details
// Declare VTK classes within VTK's optional namespace
#if defined(VTK_ABI_NAMESPACE_BEGIN)
VTK_ABI_NAMESPACE_BEGIN
#endif
class vtkLookupTable;
class vtkInformationDataObjectKey;
class vtkInformationDoubleVectorKey;
#if defined(VTK_ABI_NAMESPACE_BEGIN)
VTK_ABI_NAMESPACE_END
#endif
class vtkDICOMMetaData;
class vtkDICOMPerFilePalette;
//----------------------------------------------------------------------------
class VTKDICOM_EXPORT vtkDICOMAlgorithm : public vtkThreadedImageAlgorithm
{
public:
vtkTypeMacro(vtkDICOMAlgorithm, vtkThreadedImageAlgorithm);
//@{
//! Static method for construction.
static vtkDICOMAlgorithm *New();
//! Print information about this object.
void PrintSelf(ostream& os, vtkIndent indent) VTK_DICOM_OVERRIDE;
//@}
//@{
//! The information key for the meta data.
static vtkInformationDataObjectKey *META_DATA();
//! A key to get the patient matrix from the VTK pipeline.
static vtkInformationDoubleVectorKey *PATIENT_MATRIX();
//@}
protected:
vtkDICOMAlgorithm();
~vtkDICOMAlgorithm() VTK_DICOM_OVERRIDE;
//@{
//! Get the information object that holds the meta data for the given input.
vtkInformation *GetMetaDataInformation(
vtkInformationVector** inputVector, int inputPort, int inputConnection);
//! Copy the meta data from an input connection to an output port.
/*!
* This is called by RequestInformation. To copy the meta data to
* all output ports, use "-1" as the output port.
*/
virtual void CopyMetaDataToOutputInformation(
vtkInformationVector** inputVector, int inputPort, int inputConnection,
vtkInformationVector* outputVector, int outputPort);
//! Copy the meta data from the output information to the output data.
/*!
* This is called by RequestData.
*/
virtual void CopyMetaDataToOutputData(
vtkInformation *outInfo, vtkDataObject *outData);
//@}
int RequestInformation(
vtkInformation* request, vtkInformationVector** inputVector,
vtkInformationVector* outputVector) VTK_DICOM_OVERRIDE;
int RequestData(
vtkInformation* request, vtkInformationVector** inputVector,
vtkInformationVector* outputVector) VTK_DICOM_OVERRIDE;
void ThreadedRequestData(
vtkInformation *request, vtkInformationVector **inputVector,
vtkInformationVector *outputVector, vtkImageData ***inData,
vtkImageData **outData, int ext[6], int id) VTK_DICOM_OVERRIDE;
private:
#ifdef VTK_DICOM_DELETE
vtkDICOMAlgorithm(const vtkDICOMAlgorithm&) VTK_DICOM_DELETE;
void operator=(const vtkDICOMAlgorithm&) VTK_DICOM_DELETE;
#else
vtkDICOMAlgorithm(const vtkDICOMAlgorithm&) = delete;
void operator=(const vtkDICOMAlgorithm&) = delete;
#endif
};
#endif // vtkDICOMAlgorithm_h
|