37 #include "cxResourceExport.h" 42 #include <boost/shared_ptr.hpp> 80 void addXml(QDomNode dataNode);
81 void parseXml(QDomNode dataNode);
84 double loadAttribute(QDomNode dataNode, QString name,
double defVal);
87 static ImagePtr create(
const QString& uid,
const QString& name);
95 virtual void intitializeFromParentImage(
ImagePtr parentImage);
96 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();
151 virtual QIcon
getIcon() {
return QIcon(
":/icons/volume.png");}
154 virtual void setCropping(
bool on);
155 virtual bool getCropping()
const;
159 void mergevtkSettingsIntosscTransform();
161 void resetTransferFunctions(
bool _2D=
true,
bool _3D=
true);
163 void moveThisAndChildrenToThread(QThread* thread);
165 static vtkImageDataPtr createDummyImageData(
int axisSize,
int maxVoxelValue);
169 void setInterpolationType(
int val);
170 int getInterpolationType()
const;
174 virtual void save(
const QString &basePath);
176 void startThresholdPreview(
const Eigen::Vector2d& threshold);
177 void stopThresholdPreview();
178 double getVTKMinValue();
179 double getVTKMaxValue();
182 void vtkImageDataChanged();
183 void transferFunctionsChanged();
184 void cropBoxChanged();
187 virtual void transformChangedSlot();
215 void resetTransferFunction(
ImageLUT2DPtr imageLookupTable2D);
216 void resetTransferFunction(
ImageTF3DPtr imageTransferFunctions3D);
218 double loadAttribute(QDomNode dataNode, QString name,
double defVal);
220 double computeResampleFactor(
long maxVoxels);
222 ColorMap createPreviewColorMap(
const Eigen::Vector2d &threshold);
223 IntIntMap createPreviewOpacityMap(
const Eigen::Vector2d &threshold);
224 void createThresholdPreviewTransferFunctions3D(
const Eigen::Vector2d &threshold);
225 void createThresholdPreviewLookupTable2D(
const Eigen::Vector2d &threshold);
233 double mInitialWindowWidth;
234 double mInitialWindowLevel;
236 bool mThresholdPreview;
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.
std::map< int, QColor > ColorMap
boost::shared_ptr< class ImageLUT2D > ImageLUT2DPtr
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::map< int, int > IntIntMap
vtkImageDataPtr mBaseImageData
image data in data space
int mInterpolationType
mirror the interpolationType in vtkVolumeProperty
boost::shared_ptr< class ImageTF3D > ImageTF3DPtr
Namespace for all CustusX production code.
vtkImageDataPtr mBaseGrayScaleImageData
image data in data space