26#ifndef ARBITRARYSINGLEIMAGEVOLUMECOMPONENT_H
27#define ARBITRARYSINGLEIMAGEVOLUMECOMPONENT_H
117 virtual void setSlice(
int)
override;
120 virtual void setSlice(
double,
double,
double)
override;
124 virtual int getSlice()
const override;
151 return arbitraryTransformation.get();
156 return arbitraryFrame.get();
167 void setFrame(
const std::shared_ptr<FrameOfReference>& fr)
override;
172 virtual QMultiMap<const FrameOfReference*, Component*> getAllFrames(
bool includeChildrenFrames)
override;
177 virtual QMultiMap<const Transformation*, Component*> getAllTransformations(
bool includeChildrenTransformations)
override;
189 void initArbitraryTransformation(
const std::shared_ptr<FrameOfReference>& arbitraryFrame,
const std::shared_ptr<FrameOfReference>& dataFrame,
const std::shared_ptr<Transformation>& tr =
nullptr);
192 void resetArbitraryTransformationMatrix();
198 virtual void updateTranslation();
203 virtual void updateRotation();
210 double computeTranslationRatio()
const;
222 void computeIntersectionsWithImageBorders(QVector3D& Cz_min, QVector3D& Cz_max)
const;
238 void computeIntersectionsWithImageBorders(
const QVector3D& origin,
const QVector3D& upVector, QVector3D& intersectionMin, QVector3D& intersectionMax)
const;
241 bool checkCenter(vtkSmartPointer<vtkMatrix4x4>)
const;
244 bool pointInsideVolume(QVector3D)
const;
253 std::shared_ptr<FrameOfReference> arbitraryFrame;
256 std::shared_ptr<Transformation> arbitraryTransformation;
279 template<
typename T>
static vtkSmartPointer<vtkMatrix4x4> Multiply4x4(T, T);
280 template<
typename T,
typename... Args>
static vtkSmartPointer<vtkMatrix4x4> Multiply4x4(T a, T b, Args... args);
290 static bool linePlaneIntersectionPoint(QVector3D, QVector3D, QVector3D, QVector3D, QVector3D&);
294 static float roundTo4Decimals(
float);
298 static QVector3D roundTo4Decimals(QVector3D);
303 static void cleanMatrix(vtkSmartPointer<vtkMatrix4x4> matrixToClean,
double epsilon = 1e-5);
#define CAMITK_API
Definition CamiTKAPI.h:66
virtual void setSlice(int) override
set slice as a percentage on the z axis translation
Definition ArbitrarySingleImageComponent.cpp:459
ArbitrarySingleImageComponent(Component *parentComponent, const QString &name, vtkSmartPointer< vtkWindowLevelLookupTable > lut)
Constructor.
Definition ArbitrarySingleImageComponent.cpp:92
virtual int getNumberOfSlices() const override
always return 100 (as getSlice() gives a percentage value, the max number of slices is 100.
Definition ArbitrarySingleImageComponent.cpp:515
vtkSmartPointer< vtkActor > get3DCursor() override
Returns a 3D cross cursor vtkActor to show the picked voxel (override to give it in the right frame).
Definition ArbitrarySingleImageComponent.cpp:435
virtual void propertyValueChanged(QString name) override
propertyValueChanged: when "Translation" and "Rotation" properties are modify, this will update the s...
Definition ArbitrarySingleImageComponent.cpp:193
virtual void updatePropertyFromTransformation()
update the property values from the current arbitrary transformation (this can be called for instance...
Definition ArbitrarySingleImageComponent.cpp:208
const Transformation * getArbitraryTransformation() const
Returns the arbitrary transformation (from arbitraryFrame to main frame of this component,...
Definition ArbitrarySingleImageComponent.h:150
void setArbitraryFrame(const std::shared_ptr< FrameOfReference > &fr)
Set the ArbitraryFrame.
Definition ArbitrarySingleImageComponent.h:161
virtual int getSlice() const override
return the slice as the percentage of translation (between 0 and 100)
Definition ArbitrarySingleImageComponent.cpp:510
virtual void resetTransform()
reset the transformation to the image component parent so that the frame of the arbitrary slice is in...
Definition ArbitrarySingleImageComponent.cpp:219
void getArbitraryCenter(double center[4]) const
Compute the current position of the cutting plane center in the image coordinate system (i....
Definition ArbitrarySingleImageComponent.cpp:409
void getArbitraryPlaneNormal(double normalVector[4]) const
Compute the current z-direction (normal vector) in the image coordinate system (i....
Definition ArbitrarySingleImageComponent.cpp:418
const FrameOfReference * getArbitraryFrame() const
Get the arbitrary frame that is located in the chosen arbitrary position.
Definition ArbitrarySingleImageComponent.h:155
A Component represents something that could be included in the explorer view, the interactive 3D view...
Definition sdk/libraries/core/component/Component.h:304
FrameOfReference is only a label for an abstract coordinate system.
Definition FrameOfReference.h:69
virtual void fromVariant(const QVariant &) override
Load data from a QVariant to initialize the current object.
Definition ImageComponent.cpp:1028
This Component manages sub-component of the image component seen as a single orientation only (axial ...
Definition SingleImageComponent.h:62
vtkSmartPointer< vtkWindowLevelLookupTable > lut
Look up table used for this image.
Definition SingleImageComponent.h:95