11 #ifndef __itkMeshFromTensorImageFilter_h 12 #define __itkMeshFromTensorImageFilter_h 14 #include <vtkPolyData.h> 15 #include <vtkTensorGlyph.h> 16 #include <vtkDataArray.h> 33 template <
class TInputImage,
class TOutputMesh=vtkPolyData>
119 void SetGlyphResolution(
int res);
120 itkGetMacro(GlyphResolution,
int);
122 void SetGlyphShape (GlyphShapeType i);
125 void SetGlyphShapeToLine();
128 void SetGlyphShapeToDisk();
131 void SetGlyphShapeToArrow();
134 void SetGlyphShapeToCube();
137 void SetGlyphShapeToCylinder();
140 void SetGlyphShapeToSphere();
143 void SetGlyphShapeToSuperquadric();
146 static double GetScalarCodeFromTensor(
const DiffusionTensor<double>& tensor, TensorColorSchemeType colorScheme);
159 void PrintSelf(std::ostream& os, Indent indent)
const ITK_OVERRIDE
165 typename LightObject::Pointer loPtr = Superclass::InternalClone();
167 typename Self::Pointer rval =
dynamic_cast<Self *
>(loPtr.GetPointer());
170 itkExceptionMacro(<<
"downcast to type " << this->GetNameOfClass()<<
" failed.");
173 rval->m_TensorColorScheme = m_TensorColorScheme;
180 if (m_TensorColorScheme==COLOR_BY_IMAGE)
184 InputImageConstPointer inputPtr = this->GetInput();
186 .msg(
"m_ScalarImage and input need to have the same size");
191 TensorColorSchemeType m_TensorColorScheme=COLOR_BY_DIRECTION;
193 GlyphShapeType m_ShapeMode = GLYPH_SPHERE;
195 vtkSmartPointer<vtkPolyDataAlgorithm> m_Shape = vtkPolyDataAlgorithm::New();
197 vtkSmartPointer<TensorGlyphType> m_Glyph = TensorGlyphType::New();
202 int m_GlyphResolution=10;
204 ScalarImagePointer m_ScalarImage = ScalarImageType::New();
209 void operator=(
const Self&);
215 #if !defined(ITK_MANUAL_INSTANTIATION) && !defined(__itkMeshFromTensorImageFilter_hxx) void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
Superclass::OutputMeshRGBType OutputMeshRGBType
InputImageType::SizeValueType InputImageSizeValueType
InputImageType::PixelType InputImagePixelType
Superclass::MatrixPointer MatrixPointer
InputImageType::Pointer InputImagePointer
bool IsImageEmpty(const SmartPointer< ImageType > &image)
Superclass::OutputMeshPolyDataPointer OutputMeshPolyDataPointer
MeshFromTensorImageFilter Self
#define utlSAGlobalException(expr)
InputImageType::IndexType InputImageIndexType
Image< double, 3 > ScalarImageType
Superclass::STDVectorType STDVectorType
InputImageType::RegionType InputImageRegionType
Superclass::OutputMeshScalarType OutputMeshScalarType
~MeshFromTensorImageFilter()
Superclass::OutputMeshCellArrayType OutputMeshCellArrayType
LightObject::Pointer InternalClone() const ITK_OVERRIDE
Compute mesh from SH coefficients.
Superclass::VectorPointer VectorPointer
SmartPointer< const Self > ConstPointer
TOutputMesh OutputMeshPolyDataType
Superclass::STDVectorPointer STDVectorPointer
Compute mesh from a tensor image.
InputImageType::SizeType InputImageSizeType
#define itkSetGetMacro(name, type)
void VerifyInputParameters() const ITK_OVERRIDE
InputImageType::PointType InputImagePointType
Superclass::OutputMeshPointsType OutputMeshPointsType
vtkTensorGlyph TensorGlyphType
ScalarImageType::Pointer ScalarImagePointer
bool VerifyImageSize(const SmartPointer< Image1Type > &image1, const SmartPointer< Image2Type > &image2, const bool isMinimalDimension=false)
SmartPointer< Self > Pointer
InputImageType::ConstPointer InputImageConstPointer
Superclass::VectorType VectorType
Superclass::MatrixType MatrixType
tensor with some useful functions
MeshFromImageImageFilter< TInputImage, TOutputMesh > Superclass
SmartPointer< Self > Pointer
InputImageType::SpacingType InputImageSpacingType
TInputImage InputImageType