X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FKernel%2FITKVTK%2Fitkvtkcolortransferfunction.h;fp=lib%2FKernel%2FITKVTK%2Fitkvtkcolortransferfunction.h;h=aaba3b47caafa246a7dde00f0ae8e3933362ecc2;hb=0d47d470f614b02b3fb6d06b7688585bf535b6a7;hp=0000000000000000000000000000000000000000;hpb=aa3ed5b53d8c30782368846b90e1b3df057e1648;p=creaMaracasVisu.git diff --git a/lib/Kernel/ITKVTK/itkvtkcolortransferfunction.h b/lib/Kernel/ITKVTK/itkvtkcolortransferfunction.h new file mode 100644 index 0000000..aaba3b4 --- /dev/null +++ b/lib/Kernel/ITKVTK/itkvtkcolortransferfunction.h @@ -0,0 +1,79 @@ +#ifndef ITKVTKCOLORTRANSFERFUNCTION_H +#define ITKVTKCOLORTRANSFERFUNCTION_H + + +#include + +#include + +#include +#include + +namespace itk{ + +template< class TypeImage> +class VTKColorTransferFunction : +public ProcessObject +{ + + public: + + /** Standard class typedefs. */ + typedef VTKColorTransferFunction Self; + + /** Standard "Superclass" typedef */ + typedef ProcessObject Superclass; + + /** Smart pointer typedef support. */ + typedef SmartPointer Pointer; + typedef SmartPointer ConstPointer; + + /** Method for creation through the object factory. */ + itkNewMacro(Self); + + /** Run-time type information (and related methods). */ + itkTypeMacro( VTKColorTransferFunction, ProcessObject ); + + /** InputImageType typedef support. */ + typedef TypeImage InputImageType; + typedef typename InputImageType::Pointer InputImagePointerType; + typedef typename InputImageType::PixelType PixelType; + typedef typename InputImageType::IndexType IndexType; + + + /** + * set the rgb image to create the transfer function + */ + itkSetMacro(Input, InputImagePointerType) + /** + * set the rgb image to create the transfer function + */ + itkGetConstMacro(Input, InputImagePointerType) + + /** + get the color transfer created from the image + */ + itkGetMacro(Output, vtkColorTransferFunction*) + + virtual void Update(); + +protected: + VTKColorTransferFunction(); + ~VTKColorTransferFunction(); + + virtual void GenerateData (); + + virtual void GenerateOutputInformation(); + +private: + vtkColorTransferFunction* m_Output; + InputImagePointerType m_Input; +}; + +} + +#ifndef ITK_MANUAL_INSTANTIATION +#include "itkvtkcolortransferfunction.txx" +#endif + +#endif // ITKVTKCOLORTRANSFERFUNCTION_H