Slicer  5.1
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkClosedSurfaceToFractionalLabelmapConversionRule.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 Kyle Sunderland, 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 __vtkClosedSurfaceToFractionalLabelmapConversionRule_h
22 #define __vtkClosedSurfaceToFractionalLabelmapConversionRule_h
23 
24 // SegmentationCore includes
27 #include <vtkSegmentationCoreConfigure.h>
29 
30 // DicomRtImportExport includes
31 #include "vtkSegmentationCoreConfigure.h"
32 
33 // VTK includes
34 #include <vtkPolyDataToImageStencil.h>
35 
36 class vtkPolyData;
37 
44 {
45 
46 public:
50 
54  vtkDataObject* ConstructRepresentationObjectByRepresentation(std::string representationName) override;
55 
59  vtkDataObject* ConstructRepresentationObjectByClass(std::string className) override;
60 
62  bool Convert(vtkSegment* segment) override;
63 
65  bool PostConvert(vtkSegmentation* vtkNotUsed(segmentation)) override { return true; };
66 
68  unsigned int GetConversionCost(vtkDataObject* sourceRepresentation=nullptr, vtkDataObject* targetRepresentation=nullptr) override;
69 
71  const char* GetName() override { return "Closed surface to fractional labelmap (simple image stencil)"; };
72 
75 
78 
79 protected:
80  // Oversampling factor that will be used to calculate the size of the binary labelmap
81  int NumberOfOffsets;
82 
83 protected:
84 
87 
88 private:
90  void operator=(const vtkClosedSurfaceToFractionalLabelmapConversionRule&) = delete;
91 };
92 
93 #endif // __vtkClosedSurfaceToFractionalLabelmapConversionRule_h
This class encapsulates a segment that is part of a segmentation.
Definition: vtkSegment.h:45
static vtkClosedSurfaceToBinaryLabelmapConversionRule * New()
bool PostConvert(vtkSegmentation *vtkNotUsed(segmentation)) override
Overridden to prevent vtkClosedSurfaceToBinaryLabelmapConversionRule::PostConvert.
Abstract converter rule class. Subclasses perform conversions between specific representation types...
Convert closed surface representation (vtkPolyData type) to binary labelmap representation (vtkOrient...
static const char * GetSegmentationClosedSurfaceRepresentationName()
static const char * GetSegmentationFractionalLabelmapRepresentationName()
vtkSegmentationConverterRule * CreateRuleInstance() override
This class encapsulates a segmentation that can contain multiple segments and multiple representation...
vtkDataObject * ConstructRepresentationObjectByClass(std::string className) override
vtkDataObject * ConstructRepresentationObjectByRepresentation(std::string representationName) override
const char * GetTargetRepresentationName() override
Human-readable name of the target representation.
bool Convert(vtkSegment *segment) override
Update the target representation based on the source representation.
Convert closed surface representation (vtkPolyData type) to fractional labelmap representation (vtkOr...
unsigned int GetConversionCost(vtkDataObject *sourceRepresentation=nullptr, vtkDataObject *targetRepresentation=nullptr) override
Get the cost of the conversion.
const char * GetSourceRepresentationName() override
Human-readable name of the source representation.
const char * GetName() override
Human-readable name of the converter rule.