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 QString getModality()
const;
86 virtual void setModality(
const QString& val);
87 virtual QString getImageType()
const;
88 virtual void setImageType(
const QString& 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);
121 virtual bool load(QString path);
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;
153 virtual void save(
const QString &basePath);
155 void startThresholdPreview(
const Eigen::Vector2d& threshold);
156 void stopThresholdPreview();
157 double getVTKMinValue();
158 double getVTKMaxValue();
162 void vtkImageDataChanged(QString uid = QString());
163 void transferFunctionsChanged();
164 void cropBoxChanged();
167 virtual void transformChangedSlot();
195 void resetTransferFunction(
ImageLUT2DPtr imageLookupTable2D);
196 void resetTransferFunction(
ImageTF3DPtr imageTransferFunctions3D);
198 double loadAttribute(QDomNode dataNode, QString name,
double defVal);
200 double computeResampleFactor(
long maxVoxels);
202 ColorMap createPreviewColorMap(
const Eigen::Vector2d &threshold);
203 IntIntMap createPreviewOpacityMap(
const Eigen::Vector2d &threshold);
204 void createThresholdPreviewTransferFunctions3D(
const Eigen::Vector2d &threshold);
205 void createThresholdPreviewLookupTable2D(
const Eigen::Vector2d &threshold);
213 double mInitialWindowWidth;
214 double mInitialWindowLevel;
216 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