16 #include "cxResourceExport.h"
21 #include <boost/shared_ptr.hpp>
59 void addXml(QDomNode dataNode);
60 void parseXml(QDomNode dataNode);
63 double loadAttribute(QDomNode dataNode, QString name,
double defVal);
66 static ImagePtr create(
const QString& uid,
const QString& name);
74 virtual void intitializeFromParentImage(
ImagePtr parentImage);
75 virtual void setVtkImageData(
const vtkImageDataPtr& data,
bool resetTransferFunctions =
true);
85 virtual IMAGE_MODALITY getModality()
const;
86 virtual void setModality(
const IMAGE_MODALITY &val);
87 virtual IMAGE_SUBTYPE getImageType()
const;
88 virtual void setImageType(
const IMAGE_SUBTYPE &val);
91 virtual void setTransferFunctions3D(
ImageTF3DPtr transferFuntion);
93 virtual void setLookupTable2D(
ImageLUT2DPtr imageLookupTable2D);
95 virtual void setInitialWindowLevel(
double width,
double level);
100 virtual Eigen::Array3d getSpacing()
const;
102 virtual int getMax();
103 virtual int getMin();
104 virtual int getRange();
105 virtual int getMaxAlphaValue();
106 virtual void setShadingOn(
bool on);
107 virtual bool getShadingOn()
const;
108 virtual void setShadingAmbient(
double ambient);
109 virtual void setShadingDiffuse(
double diffuse);
110 virtual void setShadingSpecular(
double specular);
111 virtual void setShadingSpecularPower(
double specularPower);
112 virtual double getShadingAmbient();
113 virtual double getShadingDiffuse();
114 virtual double getShadingSpecular();
115 virtual double getShadingSpecularPower();
119 void addXml(QDomNode& dataNode);
120 virtual void parseXml(QDomNode& dataNode);
124 return getTypeName();
130 virtual QIcon
getIcon() {
return QIcon(
":/icons/volume.png");}
133 virtual void setCropping(
bool on);
134 virtual bool getCropping()
const;
138 void mergevtkSettingsIntosscTransform();
140 void resetTransferFunctions(
bool _2D=
true,
bool _3D=
true);
142 void moveThisAndChildrenToThread(QThread* thread);
144 static vtkImageDataPtr createDummyImageData(
int axisSize,
int maxVoxelValue);
148 void setInterpolationType(
int val);
149 int getInterpolationType()
const;
155 void startThresholdPreview(
const Eigen::Vector2d& threshold);
156 void stopThresholdPreview();
157 double getVTKMinValue();
158 double getVTKMaxValue();
160 void setDicomSeriesNumber(QString seriesNumber);
161 QString getDicomSeriesNumber();
164 void vtkImageDataChanged(QString uid = QString());
165 void transferFunctionsChanged();
166 void cropBoxChanged();
169 virtual void transformChangedSlot();
197 void resetTransferFunction(
ImageLUT2DPtr imageLookupTable2D);
198 void resetTransferFunction(
ImageTF3DPtr imageTransferFunctions3D);
200 double loadAttribute(QDomNode dataNode, QString name,
double defVal);
202 double computeResampleFactor(
long maxVoxels);
204 ColorMap createPreviewColorMap(
const Eigen::Vector2d &threshold);
205 IntIntMap createPreviewOpacityMap(
const Eigen::Vector2d &threshold);
206 void createThresholdPreviewTransferFunctions3D(
const Eigen::Vector2d &threshold);
207 void createThresholdPreviewLookupTable2D(
const Eigen::Vector2d &threshold);
215 double mInitialWindowWidth;
216 double mInitialWindowLevel;
218 bool mThresholdPreview;
222 QString mDicomSeriesNumber;