37 #include "cxResourceExport.h"
42 #include <boost/shared_ptr.hpp>
78 void addXml(QDomNode dataNode);
79 void parseXml(QDomNode dataNode);
82 double loadAttribute(QDomNode dataNode, QString name,
double defVal);
85 static ImagePtr create(
const QString& uid,
const QString& name);
93 virtual void intitializeFromParentImage(
ImagePtr parentImage);
94 virtual void setVtkImageData(
const vtkImageDataPtr& data,
bool resetTransferFunctions =
true);
106 virtual QString getModality()
const;
107 virtual void setModality(
const QString& val);
108 virtual QString getImageType()
const;
109 virtual void setImageType(
const QString& val);
112 virtual void setTransferFunctions3D(
ImageTF3DPtr transferFuntion);
114 virtual void setLookupTable2D(
ImageLUT2DPtr imageLookupTable2D);
116 virtual void setInitialWindowLevel(
double width,
double level);
121 virtual Eigen::Array3d getSpacing()
const;
123 virtual int getMax();
124 virtual int getMin();
125 virtual int getRange();
126 virtual int getMaxAlphaValue();
127 virtual void setShadingOn(
bool on);
128 virtual bool getShadingOn()
const;
129 virtual void setShadingAmbient(
double ambient);
130 virtual void setShadingDiffuse(
double diffuse);
131 virtual void setShadingSpecular(
double specular);
132 virtual void setShadingSpecularPower(
double specularPower);
133 virtual double getShadingAmbient();
134 virtual double getShadingDiffuse();
135 virtual double getShadingSpecular();
136 virtual double getShadingSpecularPower();
140 void addXml(QDomNode& dataNode);
141 virtual void parseXml(QDomNode& dataNode);
142 virtual bool load(QString path);
145 return getTypeName();
153 virtual void setCropping(
bool on);
154 virtual bool getCropping()
const;
159 virtual void addPersistentClipPlane(
vtkPlanePtr plane);
160 virtual std::vector<vtkPlanePtr> getAllClipPlanes();
161 virtual void clearPersistentClipPlanes();
162 virtual void setInteractiveClipPlane(
vtkPlanePtr plane);
164 void mergevtkSettingsIntosscTransform();
166 void resetTransferFunctions(
bool _2D=
true,
bool _3D=
true);
168 void moveThisAndChildrenToThread(QThread* thread);
170 static vtkImageDataPtr createDummyImageData(
int axisSize,
int maxVoxelValue);
172 void setInterpolationTypeToNearest();
173 void setInterpolationTypeToLinear();
174 void setInterpolationType(
int val);
175 int getInterpolationType()
const;
179 virtual void save(
const QString &basePath);
181 void vtkImageDataChanged();
182 void transferFunctionsChanged();
183 void clipPlanesChanged();
184 void cropBoxChanged();
187 virtual void transformChangedSlot();
216 void resetTransferFunction(
ImageLUT2DPtr imageLookupTable2D);
217 void resetTransferFunction(
ImageTF3DPtr imageTransferFunctions3D);
219 double loadAttribute(QDomNode dataNode, QString name,
double defVal);
221 double computeResampleFactor(
long maxVoxels);
226 double mInitialWindowWidth;
227 double mInitialWindowLevel;
bool mUseCropping
image should be cropped using mCroppingBox
double getInitialWindowLevel() const
QString mImageType
type of the image, defined as DICOM tag (0008,0008) (mainly value 3, but might be a merge of value 4)...
vtkSmartPointer< class vtkImageAccumulate > vtkImageAccumulatePtr
virtual QString getType() const
boost::shared_ptr< class Image > ImagePtr
double getInitialWindowWidth() const
DoubleBoundingBox3D mCroppingBox_d
box defining the cropping size.
ImagePtr mUnsigned
version of this containing unsigned data.
boost::shared_ptr< class ImageLUT2D > ImageLUT2DPtr
vtkPlanePtr mInteractiveClipPlane
QString mModality
modality of the image, defined as DICOM tag (0008,0060), Section 3, C.7.3.1.1.1
boost::shared_ptr< std::map< int, int > > HistogramMapPtr
static QString getTypeName()
Representation of a floating-point bounding box in 3D. The data are stored as {xmin,xmax,ymin,ymax,zmin,zmax}, in order to simplify communication with vtk.
vtkImageAccumulatePtr mHistogramPtr
Histogram.
Superclass for all data objects.
std::vector< vtkPlanePtr > mPersistentClipPlanes
vtkImageDataPtr mBaseImageData
image data in data space
int mInterpolationType
mirror the interpolationType in vtkVolumeProperty
vtkSmartPointer< class vtkPlane > vtkPlanePtr
boost::shared_ptr< class ImageTF3D > ImageTF3DPtr
vtkImageDataPtr mBaseGrayScaleImageData
image data in data space