36 #ifndef REGULARGRID_HPP_ 37 #define REGULARGRID_HPP_ 40 #define _BACKWARD_BACKWARD_WARNING_H 1 //Cut out the vtk deprecated warning for now (gcc4.3) 41 #include <vtkImageData.h> 42 #include <vtkSmartPointer.h> 43 #include "UblasIncludes.hpp" 44 #include "SmartPointers.hpp" 45 #include "VesselNetwork.hpp" 46 #include "VesselSegment.hpp" 47 #include "VesselNode.hpp" 48 #include "AbstractCellPopulation.hpp" 49 #include "CaBasedCellPopulation.hpp" 51 #include "UnitCollection.hpp" 52 #include "DimensionalChastePoint.hpp" 58 template<
unsigned DIM>
99 std::vector<std::vector<boost::shared_ptr<VesselNode<DIM> > > >
mPointNodeMap;
147 static boost::shared_ptr<RegularGrid<DIM> >
Create();
173 unsigned Get1dGridIndex(
unsigned xIndex,
unsigned yIndex,
unsigned zIndex);
214 std::vector<DimensionalChastePoint<DIM> >
GetLocations();
240 const std::vector<std::vector<CellPtr> >&
GetPointCellMap(
bool update =
true);
247 const std::vector<std::vector<boost::shared_ptr<VesselNode<DIM> > > >&
GetPointNodeMap(
bool update =
true);
255 std::vector<std::vector<boost::shared_ptr<VesselSegment<DIM> > > >
GetPointSegmentMap(
bool update =
true,
bool useVesselSurface =
false);
294 std::vector<double> values,
bool useVtk =
false);
318 bool IsOnBoundary(
unsigned xIndex,
unsigned yIndex,
unsigned zIndex);
324 void SetCellPopulation(AbstractCellPopulation<DIM>& rCellPopulation, units::quantity<unit::length> cellPopulationLengthScale);
330 void SetExtents(std::vector<unsigned> extents);
348 void SetSpacing(units::quantity<unit::length> spacing);
365 void Write(boost::shared_ptr<OutputFileHandler> pFileHandler);
boost::shared_ptr< VesselNetwork< DIM > > mpNetwork
AbstractCellPopulation< DIM > * mpCellPopulation
void Write(boost::shared_ptr< OutputFileHandler > pFileHandler)
std::vector< unsigned > GetExtents()
std::vector< unsigned > mExtents
units::quantity< unit::length > mCellPopulationReferenceLength
const std::vector< std::vector< CellPtr > > & GetPointCellMap(bool update=true)
unsigned GetNumberOfPoints()
void SetOrigin(DimensionalChastePoint< DIM > origin)
const std::vector< std::vector< boost::shared_ptr< VesselNode< DIM > > > > & GetPointNodeMap(bool update=true)
vtkSmartPointer< vtkImageData > mpVtkGrid
void SetCellPopulation(AbstractCellPopulation< DIM > &rCellPopulation, units::quantity< unit::length > cellPopulationLengthScale)
DimensionalChastePoint< DIM > mOrigin
units::quantity< unit::length > mReferenceLength
void SetPointValues(std::vector< double > pointSolution)
std::vector< double > InterpolateGridValues(std::vector< DimensionalChastePoint< DIM > > locations, std::vector< double > values, bool useVtk=false)
const std::vector< std::vector< unsigned > > & GetNeighbourData()
std::vector< std::vector< boost::shared_ptr< VesselSegment< DIM > > > > GetPointSegmentMap(bool update=true, bool useVesselSurface=false)
std::vector< DimensionalChastePoint< DIM > > GetLocations()
DimensionalChastePoint< DIM > GetLocation(unsigned xIndex, unsigned yIndex, unsigned zIndex)
std::vector< std::vector< unsigned > > GetPointPointMap(std::vector< DimensionalChastePoint< DIM > > inputPoints)
void CalculateNeighbourData()
void SetSpacing(units::quantity< unit::length > spacing)
static boost::shared_ptr< RegularGrid< DIM > > Create()
void SetExtents(std::vector< unsigned > extents)
std::vector< std::vector< CellPtr > > mPointCellMap
unsigned Get1dGridIndex(unsigned xIndex, unsigned yIndex, unsigned zIndex)
DimensionalChastePoint< DIM > GetLocationOf1dIndex(unsigned gridIndex)
std::vector< double > mPointSolution
vtkSmartPointer< vtkImageData > GetVtkGrid()
std::vector< std::vector< unsigned > > mNeighbourData
std::vector< std::vector< boost::shared_ptr< VesselSegment< DIM > > > > mPointSegmentMap
bool IsSegmentAtLatticeSite(unsigned index, bool update)
std::vector< std::vector< boost::shared_ptr< VesselNode< DIM > > > > mPointNodeMap
units::quantity< unit::length > mSpacing
bool IsLocationInPointVolume(DimensionalChastePoint< DIM > point, unsigned gridIndex)
DimensionalChastePoint< DIM > GetOrigin()
units::quantity< unit::length > GetSpacing()
bool IsOnBoundary(unsigned gridIndex)
void GenerateFromPart(boost::shared_ptr< Part< DIM > > pPart, units::quantity< unit::length > gridSize)
units::quantity< unit::length > GetReferenceLengthScale()
unsigned GetNearestGridIndex(const DimensionalChastePoint< DIM > &rLocation)
void SetVesselNetwork(boost::shared_ptr< VesselNetwork< DIM > > pNetwork)