Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkClosedSurfaceToBinaryLabelmapConversionRule.h
Go to the documentation of this file.
1 /*==============================================================================
2 
3  Copyright (c) Laboratory for Percutaneous Surgery (PerkLab)
4  Queen's University, Kingston, ON, Canada. All Rights Reserved.
5 
6  See COPYRIGHT.txt
7  or http://www.slicer.org/copyright/copyright.txt for details.
8 
9  Unless required by applicable law or agreed to in writing, software
10  distributed under the License is distributed on an "AS IS" BASIS,
11  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  See the License for the specific language governing permissions and
13  limitations under the License.
14 
15  This file was originally developed by Csaba Pinter, PerkLab, Queen's University
16  and was supported through the Applied Cancer Research Unit program of Cancer Care
17  Ontario with funds provided by the Ontario Ministry of Health and Long-Term Care
18 
19 ==============================================================================*/
20 
21 #ifndef __vtkClosedSurfaceToBinaryLabelmapConversionRule_h
22 #define __vtkClosedSurfaceToBinaryLabelmapConversionRule_h
23 
24 // SegmentationCore includes
27 
28 #include "vtkSegmentationCoreConfigure.h"
29 
30 class vtkPolyData;
31 
36 class vtkSegmentationCore_EXPORT vtkClosedSurfaceToBinaryLabelmapConversionRule
38 {
39 public:
44  static const std::string GetOversamplingFactorParameterName() { return "Oversampling factor"; };
45  static const std::string GetCropToReferenceImageGeometryParameterName() { return "Crop to reference image geometry"; };
46 
47 public:
50  virtual vtkSegmentationConverterRule* CreateRuleInstance() VTK_OVERRIDE;
51 
55  virtual vtkDataObject* ConstructRepresentationObjectByRepresentation(std::string representationName) VTK_OVERRIDE;
56 
60  virtual vtkDataObject* ConstructRepresentationObjectByClass(std::string className) VTK_OVERRIDE;
61 
63  virtual bool Convert(vtkDataObject* sourceRepresentation, vtkDataObject* targetRepresentation) VTK_OVERRIDE;
64 
66  virtual unsigned int GetConversionCost(vtkDataObject* sourceRepresentation=NULL, vtkDataObject* targetRepresentation=NULL) VTK_OVERRIDE;
67 
69  virtual const char* GetName() VTK_OVERRIDE { return "Closed surface to binary labelmap (simple image stencil)"; };
70 
73 
76 
77  vtkSetMacro(UseOutputImageDataGeometry, bool);
78 
79 protected:
85  bool CalculateOutputGeometry(vtkPolyData* closedSurfacePolyData, vtkOrientedImageData* geometryImageData);
86 
92  std::string GetDefaultImageGeometryStringForPolyData(vtkPolyData* polyData);
93 
94 protected:
101 
102 protected:
106 };
107 
108 #endif // __vtkClosedSurfaceToBinaryLabelmapConversionRule_h
virtual const char * GetTargetRepresentationName() VTK_OVERRIDE
Human-readable name of the target representation.
void operator=(const vtkSegmentationConverterRule &)
static const char * GetSegmentationBinaryLabelmapRepresentationName()
LRU Cache.
Abstract converter rule class. Subclasses perform conversions between specific representation types...
Image data containing orientation information.
Convert closed surface representation (vtkPolyData type) to binary labelmap representation (vtkOrient...
static const char * GetSegmentationClosedSurfaceRepresentationName()
virtual vtkSegmentationConverterRule * CreateRuleInstance()=0
virtual const char * GetSourceRepresentationName() VTK_OVERRIDE
Human-readable name of the source representation.